Commit 529bf751 authored by lixy's avatar lixy

通用设置富文本

parent b3457f91
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
<!-- banner modal弹窗 --> <!-- banner modal弹窗 -->
<el-dialog :title="modalTitle" :visible.sync="dialogVisible"> <el-dialog :title="modalTitle" :visible.sync="dialogVisible" :before-close="handleDialogClose">
<el-form :model="dialogFrom" :rules="rules" ref="dialogFrom" label-width="90px"> <el-form :model="dialogFrom" :rules="rules" ref="dialogFrom" label-width="90px">
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input v-model="dialogFrom.title" placeholder="请输入标题"></el-input> <el-input v-model="dialogFrom.title" placeholder="请输入标题"></el-input>
...@@ -205,15 +205,22 @@ ...@@ -205,15 +205,22 @@
}); });
}, },
/**
* 点击 X 关闭对话框的回调
**/
handleDialogClose() {
this.activeName2 = "";
this.dialogVisible = false;
},
/** /**
* 操作-编辑 * 操作-编辑
* */ * */
handleUpdate(row) { handleUpdate(row) {
this.modalTitle = '编辑'; this.modalTitle = '编辑';
this.dialogVisible = true; this.dialogVisible = true;
this.activeName2 = "first";
this.cleanDialogFrom(); this.cleanDialogFrom();
this.dialogFrom = row; this.dialogFrom = row;
this.activeName2 = "first";
}, },
/** /**
* 弹框-取消 * 弹框-取消
...@@ -221,6 +228,7 @@ ...@@ -221,6 +228,7 @@
cancelHandel(){ cancelHandel(){
this.cleanDialogFrom(); this.cleanDialogFrom();
this.dialogVisible = false; this.dialogVisible = false;
this.activeName2 = "";
}, },
/** /**
* 新建、编辑清空表单 * 新建、编辑清空表单
...@@ -230,7 +238,8 @@ ...@@ -230,7 +238,8 @@
title: "", title: "",
type: undefined, type: undefined,
value:"" value:""
} };
this.activeName2 = "";
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment