<template>
  <div class="merchant">
    <el-input v-model="value" placeholder="请选择商户">
      <template #append>
        <el-button icon="Plus" />
      </template>
    </el-input>

    <vxe-modal v-model="show" width="70%" height="80%" title="商户列表">
      <template #default>
        <vxe-table show-overflow size="mini" :sync-resize="show" :data="data" v-loading="load">
          <vxe-column type="seq" width="60" title="序号"></vxe-column>
          <vxe-column field="equipmentName" title="设备"></vxe-column>
          <vxe-column field="addrCodeInfo" title="地区"></vxe-column>
          <vxe-column field="addrInfo" title="详细地址"></vxe-column>
          <vxe-column title="操作" fixed width="100">
            <template #default="{row}">
              <el-button type="primary" link @click="addHandle(row)">关联店铺</el-button>
            </template>
          </vxe-column>
        </vxe-table>
      </template>
    </vxe-modal>
  </div>
</template>

<script setup>
  import { computed,getCurrentInstance,nextTick, ref  } from "vue";
  const { proxy } = getCurrentInstance();
  const value = ref('');
  const show = ref(false);
  const data = ref(data);
  const load = ref(false)
  const props = defineProps({
    propConfig:{},
    propValue:{},
    parentValue:{}
  })

  const setValue = v => {
    value.value = v
  }

  defineExpose({
    setValue
  })
  if(props.propValue){
    setValue(props.propValue)
  }
</script>

<style lang="scss" scoped>
.merchant{
  width: 100%;
}
</style>