Commit 4ad51720 authored by huai.li's avatar huai.li

修复编辑问题

parent 9e76b2de
export default {
data () {
return {
item: '',
timeItem: '',
inputSelectItem: 'rmb'
}
},
computed: {
item: {
get () {
return this.formItem
},
set (val) {
this.$emit('update:item', val)
}
}
},
props: {
formItem: {
type: String
type: Number
},
formTimeItem: {
type: String
......@@ -51,19 +63,12 @@ export default {
}
},
watch: {
'formItem' (val) {
console.log(val)
this.item = val
},
'formTimeItem' (val) {
this.timeItem = val
},
'formInputSelect' (val) {
this.inputSelectItem = val
},
'item' (val) {
this.$emit('update:item', val)
},
'timeItem' (val) {
this.$emit('update:item', val)
},
......
<template>
<section>
<el-radio-group size="small" v-model="item">
<el-radio-button v-for="(radio, key) in optionsList" :key="key" :label="radio.name" :value="radio.value"></el-radio-button>
<el-radio-button v-for="(radio, key) in optionsList" :key="key" :label="radio.name" :value="radio.value">{{ radio.value }}</el-radio-button>
</el-radio-group>
</section>
</template>
<script>
import itemMixin from './singleItemMixin'
import singleItemMixin from './singleItemMixin'
export default {
name: 'single-radio',
mixins: [itemMixin]
mixins: [singleItemMixin]
}
</script>
......
......@@ -122,12 +122,12 @@ export default {
},
is_public_array: [
{
'name': '共享',
'value': 1
'name': 1,
'value': '共享'
},
{
'name': '私人',
'value': 0
'name': 0,
'value': '私人'
}
],
rules: {},
......
......@@ -38,6 +38,7 @@ export default {
description: '',
time_type: '',
repeat_type: '',
is_public: '',
created_by: '' // 负责人
}
}
......@@ -45,7 +46,9 @@ export default {
methods: {
show (model) {
console.log(model)
model && UTIL.flatten(this.model, model)
this.model.client_name = model.client.name
this.diaVis = true
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment