|
@@ -1014,6 +1014,7 @@
|
|
|
<div class="py-8">
|
|
|
<CodeEditor
|
|
|
:json="true"
|
|
|
+ :language="'json'"
|
|
|
v-model="propsDialog.value"
|
|
|
style="height: 300px"
|
|
|
/>
|
|
@@ -1055,6 +1056,7 @@ import { getCookie } from '@/services/cookie';
|
|
|
import { useSelection } from '@/services/selections';
|
|
|
import { autoSave, fonts, inTreePanel } from '@/services/common';
|
|
|
import { updatePen } from './pen';
|
|
|
+import { MessagePlugin } from 'tdesign-vue-next';
|
|
|
|
|
|
const headers = {
|
|
|
Authorization: 'Bearer ' + (localStorage.token || getCookie('token') || ''),
|
|
@@ -1261,6 +1263,10 @@ const showPropsEdit = (item: any) => {
|
|
|
};
|
|
|
|
|
|
const onOkPropsEdit = () => {
|
|
|
+ if (!propsDialog.value) {
|
|
|
+ MessagePlugin.error('数据不满足json格式');
|
|
|
+ return;
|
|
|
+ }
|
|
|
data.pen[propsDialog.key] = propsDialog.value;
|
|
|
updatePen(data.pen, propsDialog.key);
|
|
|
propsDialog.show = false;
|