feat: 首页调整

This commit is contained in:
rd
2025-08-20 18:17:23 +08:00
parent 0c941b0c66
commit 6e3158cdb4
19 changed files with 446 additions and 131 deletions

View File

@ -4,8 +4,8 @@ import { Input, Dropdown, Menu } from 'ant-design-vue';
import type { MenuProps } from 'ant-design-vue';
import type { VNode } from 'vue';
import SvgIcon from '@/components/svg-icon';
import TextoverTips from '@/components/text-over-tips';
import SvgIcon from '@/components/svg-icon/index.vue';
import TextoverTips from '@/components/text-over-tips/index.vue';
// 定义对话项类型
interface ConversationItem {
@ -63,10 +63,11 @@ export default defineComponent({
const menuConfigs = ref<ConversationItem[]>(props.menu ?? DEFAULT_MENU_CONFIG);
// 处理选中变更
const handleActiveChange = (value: string) => {
const handleActiveChange = (item: ConversationItem) => {
const { value } = item;
activeKey.value = value;
emit('update:modelValue', value);
emit('activeChange', value);
emit('activeChange', item);
};
const onMenuItemClick = ({ menuInfo, item }) => {
const { key } = menuInfo;
@ -102,7 +103,7 @@ export default defineComponent({
class={`group flex justify-between cursor-pointer items-center p-8px h-40px rounded-8px hover:bg-#F2F3F5 ${
activeKey.value === item.key ? 'bg-#F2F3F5' : ''
}`}
onClick={() => handleActiveChange(item.key)}
onClick={() => handleActiveChange(item)}
>
{item.editing ? (
<Input