From 7679e973d0a678b69ca17e3f7fde881ac5a83782 Mon Sep 17 00:00:00 2001 From: Peanut Date: Wed, 24 Jun 2026 22:51:12 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A1=AE=E8=AE=A4=E6=8E=A5=E5=85=A5=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=BC=B9=E7=AA=97=EF=BC=8C=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=96=87=E5=AD=97=E4=B8=8D=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/onboarding/tag-manage.vue | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/mini-program/src/pages/onboarding/tag-manage.vue b/mini-program/src/pages/onboarding/tag-manage.vue index 56e65a2..203d77a 100644 --- a/mini-program/src/pages/onboarding/tag-manage.vue +++ b/mini-program/src/pages/onboarding/tag-manage.vue @@ -42,6 +42,15 @@ + + @@ -49,11 +58,16 @@ import { computed, onMounted, reactive, ref } from 'vue' import { useAppStore } from '../../stores/app.js' import { useMenuButtonSafeArea } from '../../composables/useMenuButtonSafeArea.js' +import TagDialog from '../../components/TagDialog.vue' const store = useAppStore() const { capsuleTopReservePx } = useMenuButtonSafeArea({ extraTopPx: 2 }) const type = ref('personality') +const dialogVisible = ref(false) +const dialogTitle = ref('确认删除') +const dialogContent = ref('') +const pendingTag = ref(null) const library = ref([]) const selected = ref([]) const swipeOffsets = reactive({}) @@ -125,17 +139,31 @@ const onTouchEnd = (event, index) => { } /** - * 删除确认 + * 打开删除确认弹窗 */ const confirmDelete = (tag) => { - uni.showModal({ - title: '确认删除', - content: `确定删除「${tag}」吗?删除后不可恢复`, - success: (res) => { - if (!res.confirm) return - deleteTag(tag) - } - }) + pendingTag.value = tag + dialogContent.value = `确定删除「${tag}」吗?删除后不可恢复` + dialogVisible.value = true +} + +/** + * 弹窗确认回调 + */ +const onDialogConfirm = () => { + if (pendingTag.value) { + deleteTag(pendingTag.value) + pendingTag.value = null + } + dialogVisible.value = false +} + +/** + * 弹窗取消回调 + */ +const onDialogCancel = () => { + pendingTag.value = null + dialogVisible.value = false } /** @@ -311,6 +339,9 @@ onMounted(() => { .tag-text { color: rgba(255, 255, 255, 0.9); font-size: 26rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .tag-row-delete {