diff --git a/src/views/modules/xieyi/add-update.vue b/src/views/modules/xieyi/add-update.vue index 854ffe9..41ed62e 100644 --- a/src/views/modules/xieyi/add-update.vue +++ b/src/views/modules/xieyi/add-update.vue @@ -22,14 +22,14 @@ - + - 取消 + 取消 确 定 @@ -49,34 +49,43 @@ // visible: { // type: Boolean, // value: false - // }, + // }, // details: { // type: Object, // value: {} - // }, + // }, }, data () { - return { - visible:false, + return { + visible:false, dataForm:{ content:'', title:'', id: 0, type:'' - }, + }, dataRule: { title: [{ required: true, message: '请填写标题', trigger: 'blur' - }],}, + }],}, options: [{ value: 'member', label: '会员协议' }, { value: 'pay', label: '充值协议' - }], + }, + { + value: 'user', + label: '用户协议' + }, + { + value: 'privacy', + label: '隐私协议' + } + ], editorOption: { modules: { toolbar: [ @@ -131,16 +140,16 @@ init(row){ this.dataForm = row this.visible = true - }, - handlereset() { + }, + handlereset() { this.visible = false - this.$refs['dataForm'].resetFields() - this.$emit('refreshDataList') + this.$refs['dataForm'].resetFields() + this.$emit('refreshDataList') // this.$refs['dataForm'].reset() - }, + }, subMit(){ - // 表单提交 - this.$refs['dataForm'].validate((valid) => { + // 表单提交 + this.$refs['dataForm'].validate((valid) => { if (valid) { this.$http({ url: this.$http.adornUrl(`/sys/agreement/${!this.dataForm.id ? 'save' : 'update'}`), @@ -149,7 +158,7 @@ 'id': this.dataForm.id || undefined, 'title': this.dataForm.title, 'content': this.dataForm.content, - 'type': this.dataForm.type + 'type': this.dataForm.type }) }).then(({ data }) => { if (data && data.code === 0) { @@ -171,7 +180,7 @@ }) } }) - + }, handleClose(){ this.$emit("Close", false) @@ -180,7 +189,7 @@ }, // 失去焦点事件 onEditorBlur(quill) { - console.log('editor blur!', quill) + console.log('editor blur!', quill) }, // 获得焦点事件 onEditorFocus(quill) { @@ -190,10 +199,10 @@ onEditorReady(quill) { // console.log('editor ready!', quill) }, - + },components:{ quillEditor } - + } - \ No newline at end of file +