新增聊天模块

This commit is contained in:
gxwebsoft
2024-04-28 01:36:43 +08:00
parent 16e38b6f31
commit d4713ad3e4
14 changed files with 1611 additions and 22 deletions

View File

@@ -1,19 +1,20 @@
<!-- 搜索表单 -->
<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
v-model:value="where.keywords"
placeholder="请输入关键词"
@search="search"
@pressEnter="search"
/>
</a-space>
</template>
<script lang="ts" setup>
import { PlusOutlined } from '@ant-design/icons-vue';
import type { GradeParam } from '@/api/user/grade/model';
import { watch } from 'vue';
import useSearch from '@/utils/use-search';
import { OrderParam } from '@/api/shop/order/model';
const props = withDefaults(
defineProps<{
@@ -24,15 +25,20 @@
);
const emit = defineEmits<{
(e: 'search', where?: GradeParam): void;
(e: 'search', where?: OrderParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
}>();
// 新增
const add = () => {
emit('add');
// 表单数据
const { where } = useSearch<OrderParam>({
keywords: ''
});
/* 搜索 */
const search = () => {
emit('search', where);
};
watch(