<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>
        </Form>
      </div>
    </Panel>
  </Collapse>
</template>

<script>
export default {
  watch: {
    'config.num': {
      handler(newVal) {
        this.itemSetting.properties.num = newVal;
      },
      deep: true,
    },
  },
  props: {
    itemSetting: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      value1: '1',
			config: {
        num: 7,
      }
    }
  },
  created() {
    let prop = this.itemSetting.properties
		if (prop && prop.num) {
			this.config.num = prop.num;
		}
  },
}
</script>
<style scoped lang="scss">
</style>
