From 43a14b2f211f72fc15d33ad70699190b68bc4a8d Mon Sep 17 00:00:00 2001
From: "@fawn-nine" <1271023382@qq.com>
Date: Mon, 26 Jun 2023 10:21:58 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/xieyi/add-update.vue | 55 +++++++++++++++-----------
1 file changed, 32 insertions(+), 23 deletions(-)
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
+