property.vue 1.06 KB
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<template>
  <Collapse v-model="value1" class="property">
    <Panel name="1">
      列表设置
    </Panel>
  </Collapse>
</template>

<script>
export default {
  watch: {
  },
  props: {
    itemSetting: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      value1: null,
      properties: { configList: [] },
			configList: [],
      functionList: [],
25
      
wangcong committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
    }
  },
  computed: {
    id() {
      return this.itemSetting.id
    },
    type() {
      return this.itemSetting.type
    },
  },
  methods: {
    addItem() {
      this.properties.configList.push({
        title: '',
        query: '',
        SQL: '',
        description: '',
      })
    },
    removeItem(index) {
      this.properties.configList.splice(index, 1)
    },
    addFunction(l = []) {
      for (let o of l) {
        if (o.type == 'ROUTE') {
          this.functionList.push(o)
        }
        else if (o.type == 'GROUP') {
          this.addFunction(o.children)
        }
      }
    },
  },
  created() {
  },
}
</script>
<style scoped lang="scss">
</style>