You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.5 KiB

3 years ago
<template>
<div>
3 years ago
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增政策' : '编辑政策'" :form="form" :rules="rules">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入名称" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:items>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>政策
</div>
<div class="xy-table-item-content">
3 years ago
<el-form-item v-for="(item,index) in form.items">
<div>{{'政策'+index}}</div>
</el-form-item>
3 years ago
</div>
</div>
</template>
3 years ago
</xy-dialog>
</div>
</template>
<script>
export default {
data() {
return {
id:'',
isShow:false,
type:'',
form:{
name:'',
3 years ago
items:[]
3 years ago
},
rules:{
}
}
},
3 years ago
methods: {
},
watch:{
isShow(newVal){
if(newVal){
3 years ago
3 years ago
}else{
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
}
}
}
3 years ago
}
</script>
<style scoped lang="scss">
</style>