|
|
@@ -400,11 +400,13 @@
|
|
|
v-model="serviceForm.kaifabao_rate"></el-input> %
|
|
|
</el-form-item>
|
|
|
<el-form-item label="服务协议" prop="content">
|
|
|
- <quill-editor ref="myTextEditor"
|
|
|
- v-model="serviceForm.content"
|
|
|
- :config="editorOption"
|
|
|
- >
|
|
|
- </quill-editor>
|
|
|
+ <quill-editor
|
|
|
+ v-model="serviceForm.content"
|
|
|
+ ref="myTextEditor"
|
|
|
+ class="editer"
|
|
|
+ :options="editorOption"
|
|
|
+ @ready="onEditorReady($event)"
|
|
|
+ ></quill-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
<el-radio-group v-model="serviceForm.status">
|
|
|
@@ -436,8 +438,23 @@
|
|
|
tab: "service",
|
|
|
accountType: '1',
|
|
|
editorOption: {
|
|
|
- theme: 'snow',
|
|
|
- placeholder: '请输入正文'
|
|
|
+ modules: {
|
|
|
+ toolbar: [
|
|
|
+ ['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
|
+ ['blockquote', 'code-block'],
|
|
|
+ [{ 'header': 1 }, { 'header': 2 }], // custom button values
|
|
|
+ [{ 'list': 'ordered' }, { 'list': 'bullet' }],
|
|
|
+ [{ 'script': 'sub' }, { 'script': 'super' }], // superscript/subscript
|
|
|
+ [{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
|
|
|
+ [{ 'direction': 'rtl' }], // text direction
|
|
|
+ [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
|
+ [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
|
+ [{ 'font': [] }],
|
|
|
+ ['clean'], // remove formatting button
|
|
|
+ ['link', 'image'],
|
|
|
+ ],
|
|
|
+ imageResize: {}
|
|
|
+ }
|
|
|
},
|
|
|
pageInfo: {
|
|
|
page: 1,
|
|
|
@@ -531,6 +548,7 @@
|
|
|
},
|
|
|
async onServiceSave() {
|
|
|
let data = this.serviceForm;
|
|
|
+ data.content = data.content.replace(/ /ig,'');
|
|
|
let res = await this.$post("/api/admin/kaifabao/saveBuckleConfig", data);
|
|
|
if (res && res.status === 1) {
|
|
|
this.$message({
|
|
|
@@ -614,6 +632,9 @@
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
|
+ onEditorReady(editor) {
|
|
|
+
|
|
|
+ },
|
|
|
formatDate(time, format = '') {
|
|
|
if (time === "0") {
|
|
|
return "--";
|