property.vue 1.06 KB
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9
<template>
  <Collapse v-model="value1" class="property">
    <Panel name="1">
      列表设置
      <div slot="content">
        <Form :model="config" :label-width="80">
          <FormItem label="每行个数">
            <Input v-model="config.num" type="number"></Input>
          </FormItem>
袁成 committed
10 11 12
          <FormItem label="标题">
            <Input v-model="config.fileTitle"></Input>
          </FormItem>
wangcong committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
        </Form>
      </div>
    </Panel>
  </Collapse>
</template>

<script>
export default {
  watch: {
    // configList: {
    //   handler(newVal) {
    //     this.itemSetting.properties = newVal
    //   },
    //   deep: true,
    // },
  },
  props: {
    itemSetting: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      value1: '1',
			config: {
        num: 1,
袁成 committed
40
        fileTitle: '通知公告'
wangcong committed
41 42 43 44
      }
    }
  },
  created() {
袁成 committed
45
    let prop = this.itemSetting.properties
wangcong committed
46 47
		if (prop) {
			this.config = prop
袁成 committed
48 49 50
		} else {
      this.itemSetting.properties = this.config
    }
wangcong committed
51 52 53 54 55
  },
}
</script>
<style scoped lang="scss">
</style>