disable form for bound customer code

This commit is contained in:
Timi
2026-08-29 12:06:32 +08:00
parent 04179fa55c
commit 4217fdb71b
4 changed files with 213 additions and 17 deletions
+11
View File
@@ -9,6 +9,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
const rightBadge = ref<number>();
const rightText = ref("");
const rightTextColor = ref("");
const rightDisabled = ref(false);
const rightAction = shallowRef<(() => void | Promise<void>) | undefined>();
const customTitleVisible = ref(false);
const customRightVisible = ref(false);
@@ -35,6 +36,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
function setRightIcon(value?: string, action?: () => void | Promise<void>): void {
rightIcon.value = value || "";
rightBadge.value = undefined;
rightDisabled.value = false;
rightAction.value = action;
if (value) {
rightText.value = "";
@@ -50,6 +52,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
function setRightText(value?: string, color?: string, action?: () => void | Promise<void>): void {
rightText.value = value || "";
rightTextColor.value = color || "";
rightDisabled.value = false;
rightAction.value = action;
if (value) {
rightBadge.value = undefined;
@@ -58,6 +61,10 @@ export const useNavBarStore = defineStore("nav-bar", () => {
}
}
function setRightDisabled(value: boolean): void {
rightDisabled.value = value;
}
function setCustomTitleVisible(value: boolean): void {
customTitleVisible.value = value;
}
@@ -69,6 +76,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
rightBadge.value = undefined;
rightText.value = "";
rightTextColor.value = "";
rightDisabled.value = false;
rightAction.value = undefined;
}
}
@@ -78,6 +86,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
rightBadge.value = undefined;
rightText.value = "";
rightTextColor.value = "";
rightDisabled.value = false;
rightAction.value = undefined;
customRightVisible.value = false;
}
@@ -90,6 +99,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
rightBadge,
rightText,
rightTextColor,
rightDisabled,
rightAction,
customTitleVisible,
customRightVisible,
@@ -100,6 +110,7 @@ export const useNavBarStore = defineStore("nav-bar", () => {
setRightIcon,
setRightBadge,
setRightText,
setRightDisabled,
setCustomTitleVisible,
setCustomRightVisible,
clearRight