Browse Source

修改动态表单方法

master
maguoqiang 6 years ago
parent
commit
cdd03ecc72
  1. 11
      src/views/modules/case/typicalcase-add-or-update.vue

11
src/views/modules/case/typicalcase-add-or-update.vue

@ -30,7 +30,7 @@
<!-- 实际案例-->
<div v-for="(item, index) in dataForm1.dynamicItem" :key="index">
<div style="text-align: left">{{"案例"+dataForm1.number}}</div>
<div style="text-align: left">{{"案例"+(index+1)}}</div>
<el-form :model="dataForm1" :rules="dataRule" ref="dataForm1" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="案例来源" style="width: 40rem;">
<el-cascader v-model="ids"
@ -55,9 +55,9 @@
</el-form>
<!-- 发布按钮-->
<el-form>
<template slot="footer">
<!-- <template slot="footer">-->
<el-button type="primary" @click="dataFormSubmitHandle()">{{"发布案例"}}</el-button>
</template>
<!-- </template>-->
</el-form>
</div>
</el-card>
@ -74,6 +74,7 @@ import 'quill/dist/quill.bubble.css'
export default {
created () {
this.addItem()
this.addItem()
},
components: {
quillEditor
@ -179,9 +180,7 @@ export default {
},
//
addItem () {
let num = this.dataForm1.number
num = num + 1
this.dataForm1.number = num
this.dataForm1.number++
this.dataForm1.dynamicItem.push({
number: this.dataForm1.number,
ids: '',

Loading…
Cancel
Save