fix submit button position

This commit is contained in:
Timi
2026-08-20 17:06:16 +08:00
parent a67ca759e4
commit e1fc007a67
5 changed files with 107 additions and 62 deletions
+10 -14
View File
@@ -96,17 +96,6 @@
</template>
导出
</t-button>
<t-button
v-can="permissionCodes.customer.create"
theme="primary"
class="create"
@click="toCreate"
>
<template #icon>
<t-icon name="add" />
</template>
添加
</t-button>
</div>
<tag-selector
v-model="selectedTagIdList"
@@ -124,6 +113,7 @@ import CustomerAPI from "@/api/CustomerAPI";
import GenderIcon from "@/components/GenderIcon.vue";
import TagSelector from "@/components/TagSelector.vue";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import { useNavBarStore } from "@/store/navBarStore";
import type { Customer } from "@/types/Customer";
import type { Tag } from "@/types/Tag";
import { getCustomerPhotoURL } from "@/utils/customer";
@@ -136,6 +126,7 @@ defineOptions({
const router = useRouter();
const userStore = useUserStore();
const currentStoreStore = useCurrentStoreStore();
const navBarStore = useNavBarStore();
const isRefreshing = ref(false);
const isExporting = ref(false);
const isGlobalManager = computed(() => userStore.hasRoles(gaoRoleCodes.globalManager));
@@ -239,6 +230,13 @@ async function loadData(): Promise<void> {
onMounted(loadData);
onMounted(() => {
navBarStore.clearRight();
if (userStore.hasPermissions(permissionCodes.customer.create)) {
navBarStore.setRightText("添加", "var(--td-brand-color)", toCreate);
}
});
watch(keyword, async () => {
window.clearTimeout(keywordTimer);
keywordTimer = window.setTimeout(async () => {
@@ -247,6 +245,7 @@ watch(keyword, async () => {
});
onUnmounted(() => {
navBarStore.clearRight();
window.clearTimeout(keywordTimer);
});
@@ -371,9 +370,6 @@ async function doExport(): Promise<void> {
flex: 1;
}
.create {
flex: 2;
}
}
}