| 
				
			 | 
			
			
				@@ -42,11 +42,14 @@ render() { 
			 | 
		
	
		
			
			| 
				42
			 | 
			
				42
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				43
			 | 
			
				43
			 | 
			
			
				 ### 在非 React.js 项目中使用 ~~作为静态文件引入~~ 
			 | 
		
	
		
			
			| 
				44
			 | 
			
				44
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				45
			 | 
			
				
			 | 
			
			
				-1. 引入通用评论的 css 和 js 文件。在 `./assets/static` 目录。 
			 | 
		
	
		
			
			| 
				
			 | 
			
				45
			 | 
			
			
				+**使用`assets` 分支的 `./assets/static` 目录[https://git.links123.net/npm/comment/src/branch/assets/assets/static](https://git.links123.net/npm/comment/src/branch/assets/assets/static)的静态文件** 
			 | 
		
	
		
			
			| 
				
			 | 
			
				46
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				47
			 | 
			
			
				+1. 引入通用评论的 css 和 js 文件。在 `assets` 分支的 `./assets/static` 目录: [https://git.links123.net/npm/comment/src/branch/assets/assets/static](https://git.links123.net/npm/comment/src/branch/assets/assets/static)。 
			 | 
		
	
		
			
			| 
				46
			 | 
			
				48
			 | 
			
			
				 2. 调用 `window.renderComment` 方法并传入对应参数来渲染通用评论。参数列表: 
			 | 
		
	
		
			
			| 
				47
			 | 
			
				49
			 | 
			
			
				   - `id`: string, 必填, 渲染评论的节点的 ID 
			 | 
		
	
		
			
			| 
				48
			 | 
			
				50
			 | 
			
			
				   - `type`: number, 必填, 评论的 type     
			 | 
		
	
		
			
			| 
				49
			 | 
			
				
			 | 
			
			
				-  - `businessId`: string, 必填, 评论的 businessId     
			 | 
		
	
		
			
			| 
				
			 | 
			
				51
			 | 
			
			
				+  - `businessId`: string, 选填, 评论的 businessId,默认 test 
			 | 
		
	
		
			
			| 
				
			 | 
			
				52
			 | 
			
			
				+  - `API`: string, 选填, 评论的 businessId,默认 http://api.links123.net/comment/v1 
			 | 
		
	
		
			
			| 
				50
			 | 
			
				53
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				51
			 | 
			
				54
			 | 
			
			
				 具体可参考 `./assets/example.html`。 
			 | 
		
	
		
			
			| 
				52
			 | 
			
				55
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -74,10 +77,11 @@ render() { 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				77
			 | 
			
			
				   <script type="text/javascript"> 
			 | 
		
	
		
			
			| 
				75
			 | 
			
				78
			 | 
			
			
				     // 调用 renderComment 这个方法,渲染通用评论 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				79
			 | 
			
			
				     window.renderComment({ 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				
			 | 
			
			
				-      id: 'comment', // 渲染通用评论到 comment 这个节点,id 名称可 自定义 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				
			 | 
			
			
				-      type: 1, // 评论的 type 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				
			 | 
			
			
				-      businessId: 'test' // 评论的 businessId 
			 | 
		
	
		
			
			| 
				80
			 | 
			
				
			 | 
			
			
				-    }) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				80
			 | 
			
			
				+      id: 'comment', // required, 渲染通用评论到 comment 这个节点,id 名称可 自定义 
			 | 
		
	
		
			
			| 
				
			 | 
			
				81
			 | 
			
			
				+      type: 1, // required, 评论的 type 
			 | 
		
	
		
			
			| 
				
			 | 
			
				82
			 | 
			
			
				+      businessId: 'test' // 评论的 businessId, 默认 test 
			 | 
		
	
		
			
			| 
				
			 | 
			
				83
			 | 
			
			
				+      API: 'http://api.links123.net/comment/v1', // API 前缀, 默认 http://api.links123.net/comment/v1  
			 | 
		
	
		
			
			| 
				
			 | 
			
				84
			 | 
			
			
				+    }); 
			 | 
		
	
		
			
			| 
				81
			 | 
			
				85
			 | 
			
			
				   </script> 
			 | 
		
	
		
			
			| 
				82
			 | 
			
				86
			 | 
			
			
				 </body> 
			 | 
		
	
		
			
			| 
				83
			 | 
			
				87
			 | 
			
			
				 </html> 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -98,11 +102,11 @@ render() { 
			 | 
		
	
		
			
			| 
				98
			 | 
			
				102
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				99
			 | 
			
				103
			 | 
			
			
				 ```html 
			 | 
		
	
		
			
			| 
				100
			 | 
			
				104
			 | 
			
			
				 <!-- ... --> 
			 | 
		
	
		
			
			| 
				101
			 | 
			
				
			 | 
			
			
				-  <link rel="stylesheet" type="text/css" media="screen" href="./static/css/comment.0.5.13.css" /> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				105
			 | 
			
			
				+  <link rel="stylesheet" type="text/css" media="screen" href="./static/css/xxx.css" /> 
			 | 
		
	
		
			
			| 
				102
			 | 
			
				106
			 | 
			
			
				 <!-- ... --> 
			 | 
		
	
		
			
			| 
				103
			 | 
			
				107
			 | 
			
			
				   <div id="RENDER_ELEMENT_WRAPPER"></div> 
			 | 
		
	
		
			
			| 
				104
			 | 
			
				108
			 | 
			
			
				 <!-- ... --> 
			 | 
		
	
		
			
			| 
				105
			 | 
			
				
			 | 
			
			
				-  <script type="text/javascript" src="./static/js/comment.0.5.13.js"></script> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				109
			 | 
			
			
				+  <script type="text/javascript" src="./static/js/xxx.js"></script> 
			 | 
		
	
		
			
			| 
				106
			 | 
			
				110
			 | 
			
			
				 <!-- ... --> 
			 | 
		
	
		
			
			| 
				107
			 | 
			
				111
			 | 
			
			
				 ``` 
			 | 
		
	
		
			
			| 
				108
			 | 
			
				112
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -143,7 +147,8 @@ function main() { 
			 | 
		
	
		
			
			| 
				143
			 | 
			
				147
			 | 
			
			
				     window.renderComment({ 
			 | 
		
	
		
			
			| 
				144
			 | 
			
				148
			 | 
			
			
				       id: id, 
			 | 
		
	
		
			
			| 
				145
			 | 
			
				149
			 | 
			
			
				       type: 1, 
			 | 
		
	
		
			
			| 
				146
			 | 
			
				
			 | 
			
			
				-      businessId: 'test' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				150
			 | 
			
			
				+      businessId: 'test', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				151
			 | 
			
			
				+      API: 'http://api.links123.net/comment/v1', 
			 | 
		
	
		
			
			| 
				147
			 | 
			
				152
			 | 
			
			
				     }) 
			 | 
		
	
		
			
			| 
				148
			 | 
			
				153
			 | 
			
			
				   }) 
			 | 
		
	
		
			
			| 
				149
			 | 
			
				154
			 | 
			
			
				    
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -154,23 +159,24 @@ function main() { 
			 | 
		
	
		
			
			| 
				154
			 | 
			
				159
			 | 
			
			
				     window.renderComment({ 
			 | 
		
	
		
			
			| 
				155
			 | 
			
				160
			 | 
			
			
				       id: id, 
			 | 
		
	
		
			
			| 
				156
			 | 
			
				161
			 | 
			
			
				       type: 1, 
			 | 
		
	
		
			
			| 
				157
			 | 
			
				
			 | 
			
			
				-      businessId: 'test1' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				162
			 | 
			
			
				+      businessId: 'test1', 
			 | 
		
	
		
			
			| 
				
			 | 
			
				163
			 | 
			
			
				+      API: 'http://api.links123.net/comment/v1', 
			 | 
		
	
		
			
			| 
				158
			 | 
			
				164
			 | 
			
			
				     }) 
			 | 
		
	
		
			
			| 
				159
			 | 
			
				165
			 | 
			
			
				   }) 
			 | 
		
	
		
			
			| 
				160
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				161
			 | 
			
				166
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				162
			 | 
			
				167
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				163
			 | 
			
				168
			 | 
			
			
				 main(); 
			 | 
		
	
		
			
			| 
				164
			 | 
			
				169
			 | 
			
			
				 ``` 
			 | 
		
	
		
			
			| 
				165
			 | 
			
				170
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				166
			 | 
			
				
			 | 
			
			
				-#### class 样式冲突 
			 | 
		
	
		
			
			| 
				
			 | 
			
				171
			 | 
			
			
				+#### ~~class 样式冲突~~ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				172
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				173
			 | 
			
			
				+> assets 分支已修复。 
			 | 
		
	
		
			
			| 
				167
			 | 
			
				174
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				168
			 | 
			
				
			 | 
			
			
				-`master` 分支的图片预览 `container` 样式和 boostrap 有冲突。在 [`fix/classname`](https://git.links123.net/node/npmcomment/src/branch/fix/classname) 分支对评论的样式名称做了修改,改为了 `comment-image-preview-container`。 
			 | 
		
	
		
			
			| 
				
			 | 
			
				175
			 | 
			
			
				+~~`master` 分支的图片预览 `container` 样式和 boostrap 有冲突。在 [`fix/classname`](https://git.links123.net/node/npmcomment/src/branch/fix/classname) 分支对评论的样式名称做了修改,改为了 `comment-image-preview-container`。~~ 
			 | 
		
	
		
			
			| 
				169
			 | 
			
				176
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				170
			 | 
			
				177
			 | 
			
			
				 解决办法就是使用 [`fix/classname`](https://git.links123.net/node/npmcomment/src/branch/fix/classname) 分支中的静态文件: 
			 | 
		
	
		
			
			| 
				171
			 | 
			
				178
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				172
			 | 
			
				
			 | 
			
			
				-- css: 
			 | 
		
	
		
			
			| 
				173
			 | 
			
				
			 | 
			
			
				-- js: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				179
			 | 
			
			
				+- [https://git.links123.net/node/npmcomment/src/branch/fix/classname](https://git.links123.net/node/npmcomment/src/branch/fix/classname) 
			 | 
		
	
		
			
			| 
				174
			 | 
			
				180
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				175
			 | 
			
				181
			 | 
			
			
				 尝试过使用 CSS Module 进行修改,不过改造量较大,改动的过程中影响了其他样式,所以暂时放弃了。 
			 | 
		
	
		
			
			| 
				176
			 | 
			
				182
			 | 
			
			
				  
			 |