Browse Source

更新 'src/xt_pages/org/README.md'

郑成武 6 years ago
parent
commit
fd5c7e6595
1 changed files with 18 additions and 3 deletions
  1. 18 3
      src/xt_pages/org/README.md

+ 18 - 3
src/xt_pages/org/README.md View File

@@ -1,32 +1,47 @@
1 1
 ### neditor使用:
2 2
 
3 3
 1、引入资源
4
+
4 5
 1.1 在static\neditor
6
+
5 7
 1.2 在根目录下index.html下
8
+
9
+```
6 10
 <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
7 11
 <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.config.js"></script>
8 12
 <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.all.min.js"></script>
9 13
 <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.service.js"></script>
10 14
 <script src="<%= htmlWebpackPlugin.options.path %>/neditor/i18n/zh-cn/zh-cn.js"></script>
11 15
 <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.parse.min.js"></script>
16
+```
12 17
 
13 18
 2、自定义components,在src下新建Neditor/index.vue,具体见src\components\Neditor\index.vue
14 19
 
15
-3、使用:
20
+3、使用
21
+
16 22
 3.1、引入自定义components:
17
-import Neditor from '@/components/Neditor'
23
+
24
+`import Neditor from '@/components/Neditor'`
25
+
18 26
 3.2、注册:
27
+
28
+```
19 29
 components: {
20 30
     Neditor,
21 31
     ......
22 32
 },
33
+```
23 34
 3.3
24 35
 
36
+```
25 37
 <el-form-item label="机构介绍:" prop="org_introduction">
26 38
     <keep-alive><!--网上说用百度ueditor时,要用keep-alive-->
27 39
          <neditor ref="neditor"   id="editor"  v-bind:r_content="form.org_introduction"> </neditor> <!--这里是Neditor-->
28 40
     </keep-alive>
29 41
 </el-form-item>
42
+```
30 43
 3.4
44
+4.
31 45
 提交时,需要获取富文本里的内容:
32
-this.form.org_introduction = this.$refs.neditor.content;
46
+
47
+`this.form.org_introduction = this.$refs.neditor.content;`