|
@@ -26,13 +26,13 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="商品描述" prop="desc" >
|
|
|
<!-- bidirectional data binding(双向数据绑定) -->
|
|
|
- <quill-editor v-model="content"
|
|
|
+ <!-- <quill-editor v-model="content"
|
|
|
ref="myQuillEditor"
|
|
|
:options="editorOption"
|
|
|
@blur="onEditorBlur($event)"
|
|
|
@focus="onEditorFocus($event)"
|
|
|
@ready="onEditorReady($event)">
|
|
|
- </quill-editor>
|
|
|
+ </quill-editor> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button @click="onSubmit('form')" type="primary">立即{{ pageType == "create" ? '创建' : '修改' }}</el-button>
|
|
@@ -48,11 +48,11 @@ import store from '@/store'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
// import E from 'wangeditor'
|
|
|
// require styles
|
|
|
-import 'quill/dist/quill.core.css'
|
|
|
-import 'quill/dist/quill.snow.css'
|
|
|
-import 'quill/dist/quill.bubble.css'
|
|
|
+// import 'quill/dist/quill.core.css'
|
|
|
+// import 'quill/dist/quill.snow.css'
|
|
|
+// import 'quill/dist/quill.bubble.css'
|
|
|
|
|
|
-import { quillEditor } from 'vue-quill-editor'
|
|
|
+// import { quillEditor } from 'vue-quill-editor'
|
|
|
export default {
|
|
|
components: {
|
|
|
quillEditor
|
|
@@ -89,35 +89,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.getList()
|
|
|
- // this.editor = new E(this.$refs.editorElem)
|
|
|
- // this.editor.customConfig.onchange = html => {
|
|
|
- // this.editorContent = html
|
|
|
- // };
|
|
|
- // this.editor.customConfig.menus = [
|
|
|
- // // 菜单配置
|
|
|
- // 'head', // 标题
|
|
|
- // 'bold', // 粗体
|
|
|
- // 'fontSize', // 字号
|
|
|
- // 'fontName', // 字体
|
|
|
- // 'italic', // 斜体
|
|
|
- // 'underline', // 下划线
|
|
|
- // 'strikeThrough', // 删除线
|
|
|
- // 'foreColor', // 文字颜色
|
|
|
- // 'backColor', // 背景颜色
|
|
|
- // 'link', // 插入链接
|
|
|
- // 'list', // 列表
|
|
|
- // 'justify', // 对齐方式
|
|
|
- // 'quote', // 引用
|
|
|
- // 'emoticon', // 表情
|
|
|
- // 'image', // 插入图片
|
|
|
- // 'table', // 表格
|
|
|
- // 'code', // 插入代码
|
|
|
- // 'undo', // 撤销
|
|
|
- // 'redo' // 重复
|
|
|
- // ]
|
|
|
- // this.editor.create() // 创建富文本实例
|
|
|
- console.log('this is current quill instance object', this.editor)
|
|
|
+ // console.log('this is current quill instance object', this.editor)
|
|
|
},
|
|
|
methods: {
|
|
|
onSubmit(formName) {
|
|
@@ -225,25 +197,25 @@ export default {
|
|
|
}
|
|
|
return tempTitle[type]
|
|
|
},
|
|
|
- onEditorBlur(quill) {
|
|
|
- console.log('editor blur!', quill)
|
|
|
- },
|
|
|
- onEditorFocus(quill) {
|
|
|
- console.log('editor focus!', quill)
|
|
|
- },
|
|
|
- onEditorReady(quill) {
|
|
|
- console.log('editor ready!', quill)
|
|
|
- },
|
|
|
- onEditorChange({ quill, html, text }) {
|
|
|
- console.log('editor change!', quill, html, text)
|
|
|
- this.content = html
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- editor() {
|
|
|
- return this.$refs.myQuillEditor.quill
|
|
|
- }
|
|
|
+ // onEditorBlur(quill) {
|
|
|
+ // console.log('editor blur!', quill)
|
|
|
+ // },
|
|
|
+ // onEditorFocus(quill) {
|
|
|
+ // console.log('editor focus!', quill)
|
|
|
+ // },
|
|
|
+ // onEditorReady(quill) {
|
|
|
+ // console.log('editor ready!', quill)
|
|
|
+ // },
|
|
|
+ // onEditorChange({ quill, html, text }) {
|
|
|
+ // console.log('editor change!', quill, html, text)
|
|
|
+ // this.content = html
|
|
|
+ // }
|
|
|
},
|
|
|
+ // computed: {
|
|
|
+ // editor() {
|
|
|
+ // return this.$refs.myQuillEditor.quill
|
|
|
+ // }
|
|
|
+ // },
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|