qianlishi 4 years ago
parent 453fbc1d8d
commit 61d54a15b3

@ -11,7 +11,6 @@
<el-table :data="formData" style="width: 100%"> <el-table :data="formData" style="width: 100%">
<el-table-column prop="name" label="名称" width="80" /> <el-table-column prop="name" label="名称" width="80" />
<el-table-column prop="key" label="key值" width="80" /> <el-table-column prop="key" label="key值" width="80" />
<!-- <el-table-column prop="width" label="宽度" width="80" /> -->
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -39,7 +38,7 @@
<el-form :model="rowFormData" label-width="50px"> <el-form :model="rowFormData" label-width="50px">
<el-form-item label="名称:"> <el-form-item label="名称:">
<el-input <el-input
v-model="rowFormData['name']" v-model.trim="rowFormData['name']"
placeholder="请输入名称" placeholder="请输入名称"
size="mini" size="mini"
> >
@ -47,20 +46,12 @@
</el-form-item> </el-form-item>
<el-form-item label="key值:"> <el-form-item label="key值:">
<el-input <el-input
v-model="rowFormData['key']" v-model.trim="rowFormData['key']"
placeholder="请输入key值" placeholder="请输入key值"
size="mini" size="mini"
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="宽度:">
<el-input
v-model="rowFormData['width']"
placeholder="请输入宽度"
size="mini"
>
</el-input>
</el-form-item> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogVisible = false"> </el-button> <el-button size="mini" @click="dialogVisible = false"> </el-button>
@ -90,40 +81,7 @@ export default {
}, },
flag: true, // true false flag: true, // true false
indexEditor: -1, // indexEditor: -1, //
tableData: [ tableData: []
{
date: "2016-05-02",
name: "王小虎",
province: "上海",
city: "普陀区",
address: "上海市普陀区金沙江路 1518 弄",
zip: 200333
},
{
date: "2016-05-04",
name: "王小虎",
province: "上海",
city: "普陀区",
address: "上海市普陀区金沙江路 1517 弄",
zip: 200333
},
{
date: "2016-05-01",
name: "王小虎",
province: "上海",
city: "普陀区",
address: "上海市普陀区金沙江路 1519 弄",
zip: 200333
},
{
date: "2016-05-03",
name: "王小虎",
province: "上海",
city: "普陀区",
address: "上海市普陀区金沙江路 1516 弄",
zip: 200333
}
]
}; };
}, },
methods: { methods: {

@ -22,7 +22,7 @@
:key="index" :key="index"
:label="item.paramName" :label="item.paramName"
> >
<el-input v-model="item.sampleItem" size="mini" /> <el-input v-model.trim="item.sampleItem" size="mini" />
</el-form-item> </el-form-item>
<el-form-item v-for="item in setParamList" :key="item" :label="item"> <el-form-item v-for="item in setParamList" :key="item" :label="item">
<Dictionary <Dictionary

@ -23,7 +23,7 @@
v-if="item.type == 'el-input-number'" v-if="item.type == 'el-input-number'"
size="mini" size="mini"
style="width:100%" style="width:100%"
v-model="formData[item.name]" v-model.trim="formData[item.name]"
controls-position="right" controls-position="right"
:placeholder="item.placeholder" :placeholder="item.placeholder"
@change="changed($event, item.name)" @change="changed($event, item.name)"
@ -118,12 +118,6 @@
width="50%" width="50%"
:before-close="handleClose" :before-close="handleClose"
> >
<!-- <codemirror-->
<!-- v-model.trim="formData[item.name]"-->
<!-- class="code-mirror"-->
<!-- :options="optionsJavascript"-->
<!-- style="height: 190px"-->
<!-- />-->
<vue-json-editor <vue-json-editor
v-model="formData[item.name]" v-model="formData[item.name]"
:show-btns="false" :show-btns="false"
@ -314,7 +308,6 @@ export default {
optionsJavascript: { optionsJavascript: {
mode: "text/javascript", mode: "text/javascript",
tabSize: 2, // tabSize: 2, //
// theme: 'cobalt', // monokai JS
lineNumbers: true, // lineNumbers: true, //
line: true, line: true,
styleActiveLine: true, // styleActiveLine: true, //
@ -357,8 +350,6 @@ export default {
} }
} }
}, },
onJsonChange(value) {},
onJsonSave(value) {},
saveData() { saveData() {
this.$emit("onChanged", this.formData); this.$emit("onChanged", this.formData);
this.dialogVisibleStaticData = false; this.dialogVisibleStaticData = false;

Loading…
Cancel
Save