Raod 3 years ago
parent b7e330d756
commit 5e9d7dc755

@ -117,12 +117,19 @@
width="50%"
:before-close="handleClose"
>
<codemirror
v-model.trim="formData[item.name]"
class="code-mirror"
:options="optionsJavascript"
style="height: 190px"
/>
<!-- <codemirror-->
<!-- v-model.trim="formData[item.name]"-->
<!-- class="code-mirror"-->
<!-- :options="optionsJavascript"-->
<!-- style="height: 190px"-->
<!-- />-->
<vue-json-editor v-model="formData[item.name]"
:show-btns="false"
:mode="'code'"
lang="zh"
class="my-editor"
@json-change="onJsonChange"
@json-save="onJsonSave" />
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisibleStaticData = false"
> </el-button
@ -255,7 +262,7 @@
<script>
import ColorPicker from "./colorPicker.vue";
import { codemirror } from "vue-codemirror"; // codeMirror
import vueJsonEditor from 'vue-json-editor'
import "codemirror/lib/codemirror.css"; //
import "codemirror/theme/cobalt.css"; // options
// language
@ -269,7 +276,7 @@ export default {
name: "DynamicForm",
components: {
ColorPicker,
codemirror,
vueJsonEditor,
dynamicComponents,
customColorComponents
},
@ -336,6 +343,8 @@ export default {
}
}
},
onJsonChange (value) { },
onJsonSave (value) { },
saveData() {
this.$emit("onChanged", this.formData);
this.dialogVisibleStaticData = false;

@ -2319,7 +2319,8 @@ const widgetTools = [
value: 10,
},
],
}, {
},
{
name: '图例操作',
list: [
{
@ -2391,7 +2392,8 @@ const widgetTools = [
value: ''
},
],
}, {
},
{
name: '自定义配色',
list: [
{
@ -2399,7 +2401,7 @@ const widgetTools = [
label: '',
name: 'customColor',
required: false,
value: [{ color: '#ED0E0E' }, { color: '#6CCD17' }, { color: '#172CCD' }, { color: '#B817CD' }, { color: '#AFCD17' }],
value: [{ color: '#1E90FF' }],
},
],
},

Loading…
Cancel
Save