diff --git a/uniapp/youjiala/src/components/app-tabbar/app-tabbar.vue b/uniapp/youjiala/src/components/app-tabbar/app-tabbar.vue index 3ba2db7..d818264 100644 --- a/uniapp/youjiala/src/components/app-tabbar/app-tabbar.vue +++ b/uniapp/youjiala/src/components/app-tabbar/app-tabbar.vue @@ -3,7 +3,7 @@ diff --git a/uniapp/youjiala/src/components/help-doc-preview/help-doc-preview.vue b/uniapp/youjiala/src/components/help-doc-preview/help-doc-preview.vue index 83d8420..efd387b 100644 --- a/uniapp/youjiala/src/components/help-doc-preview/help-doc-preview.vue +++ b/uniapp/youjiala/src/components/help-doc-preview/help-doc-preview.vue @@ -126,8 +126,7 @@ const hasContent = computed( + + + + {{ t("HelpPreview.cancel") }} + + diff --git a/uniapp/youjiala/src/components/option-picker/option-picker.vue b/uniapp/youjiala/src/components/option-picker/option-picker.vue index a3e6e26..f89ca64 100644 --- a/uniapp/youjiala/src/components/option-picker/option-picker.vue +++ b/uniapp/youjiala/src/components/option-picker/option-picker.vue @@ -6,7 +6,8 @@ * loading 显示转圈占位,items 空且不在 loading 时显示 emptyText。 */ import { useLocale } from "uview-pro"; -import { ref, watch } from "vue"; +import { computed, ref, watch } from "vue"; +import { useThemeTokens } from "@/composables"; export interface PickerOption { key: string; @@ -14,6 +15,8 @@ export interface PickerOption { label: string; /** 次要说明(如共享路径 / 专辑描述),缺省不占行 */ sub?: string; + /** 行首图标(如相册=photo),缺省不占位 */ + icon?: string; } const props = defineProps({ @@ -41,6 +44,16 @@ const props = defineProps({ type: String, default: "", }, + /** 确认键文案:发布场景传「发布相册」等,缺省仍用「创建」 */ + confirmText: { + type: String, + default: "", + }, + /** 附加「新建」行文案(如 新建相册):非空即渲染,点按 emit create */ + createText: { + type: String, + default: "", + }, }); const emit = defineEmits<{ @@ -48,12 +61,22 @@ const emit = defineEmits<{ (e: "close"): void; /** 确认并带上选中项 key */ (e: "confirm", key: string): void; + /** 点了附加的「新建」行 */ + (e: "create"): void; }>(); const { t } = useLocale(); +// 勾选色与确认钮随主题;确认钮用纯色(渐变浅档在白字下发糊),未选择/提交中用透明度做置灰态 +const { primary } = useThemeTokens(); + const picked = ref(""); +const confirmStyle = computed(() => ({ + background: primary.value, + opacity: picked.value && !props.loading ? 1 : 0.45, +})); + // 每次展开清掉上次选择 watch( () => props.visible, @@ -79,41 +102,52 @@ function onConfirm(): void { {{ props.title }} - - - - - + + + + + + + {{ props.createText }} + + + {{ t("FilePage.folderCancel") }} - + - {{ t("FilePage.folderConfirm") }} + {{ props.confirmText || t("FilePage.folderConfirm") }} @@ -123,17 +157,26 @@ function onConfirm(): void { diff --git a/uniapp/youjiala/src/pages/tab/share.vue b/uniapp/youjiala/src/pages/tab/share.vue index e685cc4..9eeaf9a 100644 --- a/uniapp/youjiala/src/pages/tab/share.vue +++ b/uniapp/youjiala/src/pages/tab/share.vue @@ -12,11 +12,19 @@ import type { FamilyGroupEntity } from "@/data/auto/familyGroupEntity"; import { useLocale } from "uview-pro"; import { computed, ref } from "vue"; -import { useAuthGuard, useFamilyGroups, useThemeGradient } from "@/composables"; +import { useAuthGuard, useFamilyGroups, useThemeGradient, useThemeTokens } from "@/composables"; import { useLoginProfileStore } from "@/stores"; const { t } = useLocale(); const { themeBackground } = useThemeGradient(); +// 主题派生色经 CSS 变量下发(与媒体页同套):头卡/徽章/主按钮/链接全部跟主题 +const { primary, accentGradient, accentSoft, accentShadow } = useThemeTokens(); +const themeVars = computed(() => ({ + "--fg-primary": primary.value, + "--fg-gradient": accentGradient.value, + "--fg-soft": accentSoft.value, + "--fg-shadow": accentShadow.value, +})); const profile = useLoginProfileStore(); const { @@ -74,6 +82,20 @@ const navTitle = computed(() => { return t("SharePage.title"); }); +/** 详情区分区卡折叠态(与媒体页同款交互):默认全展开,点标题行切换 */ +type FoldKey = "info" | "folders" | "requests" | "members" | "permissions"; +const folded = ref>({ + info: false, + folders: false, + requests: false, + members: false, + permissions: false, +}); + +function toggleFold(key: FoldKey): void { + folded.value[key] = !folded.value[key]; +} + /** 申请加入入口:非新建、非管理员、非成员,且群开启了「可申请」 */ const canApply = computed(() => !creating.value @@ -291,7 +313,7 @@ function groupDesc(group: FamilyGroupEntity): string {