<template>
  <div>
    <x-check-list ref="xCheckList"></x-check-list>
  </div>
</template>

<script>
  import XCheckList from './XCheckList.vue'

  export default {
    name: 'XCheckListDemo',
    components: {
        XCheckList
    },
    data () {
      return {}
    },
    mounted () {
        // 模拟接口返回的配置数据
        const mockResponse = {
            leftItems: [
            { value: 'left1', label: '左项1' },
            { value: 'left2', label: '左项2' },
            { value: 'left3', label: '左项3' }
            ],
            rightItems: [
            { value: 'right1', label: '右项1' },
            { value: 'right2', label: '右项2' },
            { value: 'right3', label: '右项3' }
            ]
        }

        // 模拟接口回调
        this.$refs.xCheckList.init({
            leftItems: mockResponse.leftItems,
            rightItems: mockResponse.rightItems
        })
    },
    methods: {}
  }
</script>
