庄逸洲 0b8f486971 添加机构信息模块 4 years ago
..
README.md 添加机构信息模块 4 years ago
orginfo.vue 添加机构信息模块 4 years ago

README.md

neditor使用:

1、引入资源

1.1 在static\neditor

1.2 在根目录下index.html下

<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.config.js"></script>
<script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.all.min.js"></script>
<script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.service.js"></script>
<script src="<%= htmlWebpackPlugin.options.path %>/neditor/i18n/zh-cn/zh-cn.js"></script>
<script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.parse.min.js"></script>

2、自定义components,在src下新建Neditor/index.vue,具体见src\components\Neditor\index.vue

3、使用

3.1、引入自定义components:

import Neditor from '@/components/Neditor'

3.2、注册:

components: {
    Neditor,
    ......
},

3.3

<el-form-item label="机构介绍:" prop="org_introduction">
    <keep-alive><!--网上说用百度ueditor时,要用keep-alive-->
         <neditor ref="neditor"   id="editor"  v-bind:r_content="form.org_introduction"> </neditor> <!--这里是Neditor-->
    </keep-alive>
</el-form-item>

3.4 4. 提交时,需要获取富文本里的内容:

this.form.org_introduction = this.$refs.neditor.content;