|
@@ -192,6 +192,10 @@ export default {
|
|
|
this.contextMenuVisible = true
|
|
this.contextMenuVisible = true
|
|
|
},
|
|
},
|
|
|
handleInsertBusinessDomainClick () {
|
|
handleInsertBusinessDomainClick () {
|
|
|
|
|
+ if (!this.businessDomain?.length) {
|
|
|
|
|
+ this.$snackbar.warning('暂无业务域,请先添加业务域')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.contextMenuVisible = false
|
|
this.contextMenuVisible = false
|
|
|
this.insertDialogSelected = null
|
|
this.insertDialogSelected = null
|
|
|
this.insertDialogVisible = true
|
|
this.insertDialogVisible = true
|
|
@@ -216,8 +220,9 @@ export default {
|
|
|
const useAppend = !this.descriptionCursorTouched && desc.length > 0
|
|
const useAppend = !this.descriptionCursorTouched && desc.length > 0
|
|
|
const insertStart = useAppend ? desc.length : start
|
|
const insertStart = useAppend ? desc.length : start
|
|
|
const insertEnd = useAppend ? desc.length : end
|
|
const insertEnd = useAppend ? desc.length : end
|
|
|
- this.formValues.description = desc.slice(0, insertStart) + val + desc.slice(insertEnd)
|
|
|
|
|
- this.descriptionCursor.start = this.descriptionCursor.end = insertStart + val.length
|
|
|
|
|
|
|
+ const insertValue = ` ${String(val).trim()} `
|
|
|
|
|
+ this.formValues.description = desc.slice(0, insertStart) + insertValue + desc.slice(insertEnd)
|
|
|
|
|
+ this.descriptionCursor.start = this.descriptionCursor.end = insertStart + insertValue.length
|
|
|
},
|
|
},
|
|
|
getValue () {
|
|
getValue () {
|
|
|
if (!this.$refs.form.validate()) {
|
|
if (!this.$refs.form.validate()) {
|