表单样式修改

qianlishi 3 years ago
parent 02df70868a
commit a022f84160

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-form label-width="80px" label-position="left"> <el-form label-width="100px" label-position="left">
<el-form-item label="数据集"> <el-form-item label="数据集">
<el-select <el-select
size="mini" size="mini"

@ -6,7 +6,7 @@
!--> !-->
<template> <template>
<div class="collapse-input-style"> <div class="collapse-input-style">
<el-form label-width="80px" label-position="left"> <el-form label-width="100px" label-position="left">
<template v-for="(item, index) in options"> <template v-for="(item, index) in options">
<div v-if="isShowForm(item, '[object Object]')" :key="index"> <div v-if="isShowForm(item, '[object Object]')" :key="index">
<el-form-item <el-form-item
@ -117,19 +117,21 @@
width="50%" width="50%"
:before-close="handleClose" :before-close="handleClose"
> >
<!-- <codemirror--> <!-- <codemirror-->
<!-- v-model.trim="formData[item.name]"--> <!-- v-model.trim="formData[item.name]"-->
<!-- class="code-mirror"--> <!-- class="code-mirror"-->
<!-- :options="optionsJavascript"--> <!-- :options="optionsJavascript"-->
<!-- style="height: 190px"--> <!-- style="height: 190px"-->
<!-- />--> <!-- />-->
<vue-json-editor v-model="formData[item.name]" <vue-json-editor
:show-btns="false" v-model="formData[item.name]"
:mode="'code'" :show-btns="false"
lang="zh" :mode="'code'"
class="my-editor" lang="zh"
@json-change="onJsonChange" class="my-editor"
@json-save="onJsonSave" /> @json-change="onJsonChange"
@json-save="onJsonSave"
/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisibleStaticData = false" <el-button @click="dialogVisibleStaticData = false"
> </el-button > </el-button
@ -263,7 +265,7 @@
<script> <script>
import ColorPicker from "./colorPicker.vue"; import ColorPicker from "./colorPicker.vue";
import vueJsonEditor from 'vue-json-editor' import vueJsonEditor from "vue-json-editor";
import "codemirror/lib/codemirror.css"; // import "codemirror/lib/codemirror.css"; //
import "codemirror/theme/cobalt.css"; // options import "codemirror/theme/cobalt.css"; // options
// language // language
@ -344,8 +346,8 @@ export default {
} }
} }
}, },
onJsonChange (value) { }, onJsonChange(value) {},
onJsonSave (value) { }, onJsonSave(value) {},
saveData() { saveData() {
this.$emit("onChanged", this.formData); this.$emit("onChanged", this.formData);
this.dialogVisibleStaticData = false; this.dialogVisibleStaticData = false;

Loading…
Cancel
Save