Skip to content

选择店铺

代码事例
vue
<template>
	<fk-space>
		<fk-button type="primary" @click="handleSelect">选择店铺(多选)</fk-button>
		<fk-button type="primary" @click="handleSingleSelect">选择店铺(单选)</fk-button>
	</fk-space>
	<fk-row>
		<JsonViewer :data="result" />
	</fk-row>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import { cloneDeep } from 'lodash-es';
import { selectShopPop } from '@erp/biz';
import data from '/biz/shop.json';

const result = ref({});

const handleSelect = () => {
	selectShopPop({ ids: [93], status: 2, options: cloneDeep(data.data) }).then(res => {
		result.value = res;
	});
};

const handleSingleSelect = () => {
	selectShopPop({ ids: [93], options: cloneDeep(data.data), multiple: false }).then(res => {
		result.value = res;
	});
};
</script>

店铺选择 API

<select-shop-input> Props

参数名描述类型默认值
disabled是否禁用booleanfalse

SelectShopPopProps

参数名描述类型默认值
ids默认选中的id(string | number)[]-
options数据源Record<string, any>[]-
multiple是否多选booleanfalse

基于 MIT 许可发布