62 lines
1.2 KiB
Vue
62 lines
1.2 KiB
Vue
<!-- 搜索表单 -->
|
|
<template>
|
|
<a-space :size="10" style="flex-wrap: wrap">
|
|
<a-button type="primary" class="ele-btn-icon" @click="add">
|
|
<template #icon>
|
|
<PlusOutlined />
|
|
</template>
|
|
<span>添加</span>
|
|
</a-button>
|
|
<a-input-search
|
|
allow-clear
|
|
placeholder="门店名称"
|
|
style="width: 240px"
|
|
v-model:value="where.keywords"
|
|
@search="reload"
|
|
/>
|
|
</a-space>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { PlusOutlined } from '@ant-design/icons-vue';
|
|
import { watch } from 'vue';
|
|
import useSearch from "@/utils/use-search";
|
|
import {ShopStoreParam} from "@/api/shop/shopStore/model";
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
// 选中的角色
|
|
selection?: [];
|
|
}>(),
|
|
{}
|
|
);
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'search', where?: ShopStoreParam): void;
|
|
(e: 'add'): void;
|
|
(e: 'remove'): void;
|
|
(e: 'batchMove'): void;
|
|
}>();
|
|
|
|
|
|
const reload = () => {
|
|
emit('search', where);
|
|
};
|
|
|
|
// 表单数据
|
|
const { where } = useSearch<ShopStoreParam>({
|
|
keywords: '',
|
|
userId: undefined
|
|
});
|
|
|
|
// 新增
|
|
const add = () => {
|
|
emit('add');
|
|
};
|
|
|
|
watch(
|
|
() => props.selection,
|
|
() => {}
|
|
);
|
|
</script>
|