abpcoder 21 часов назад
Родитель
Сommit
fed871a8e3

+ 2 - 2
src/pagesOther/pages/voluntary/list/components/voluntary-majors-draggable.vue

@@ -43,10 +43,10 @@
         >
             <view class="bg-back-light rounded-lg p-20 flex justify-between items-center gap-20">
                 <!-- 主内容:阻断触摸,确保只能手柄拖 -->
-                <view class="flex-1 flex items-center gap-20" @touchstart.stop @touchmove.stop>
+                <view class="flex-1 flex items-center gap-20" @touchmove.stop>
                     <view class="text-32 text-fore-placeholder font-bold">{{ toFixedLen(i) }}</view>
                     <view class="flex-1 w-0 text-28 text-fore-title font-bold truncate">{{ m.majorName }}</view>
-                    <uv-icon name="trash" size="18" color="error" @click="$emit('delete', m)" />
+                    <uv-icon name="trash" size="18" color="error" @tap.stop="$emit('delete', m)" />
                 </view>
 
                 <!-- 手柄:不 stop / prevent -->

+ 4 - 6
src/pagesOther/pages/voluntary/list/list.vue

@@ -138,15 +138,13 @@ const handleActionSelect = async (e: ActionItem) => {
             paging.value?.reload() // 发生异常时,重新加载列表
         }
     } else if (e.id === 'delete') {
-        const confirm = await uni.$ie.showConfirm({
+        await uni.$ie.showConfirm({
             title: '志愿删除提醒',
             content: `删除'${record.universityName}',将同时删除该院校下所有意向专业。\n确认删除?!`
         })
-        if (confirm) {
-            await removeVoluntaryByUniversity(record.universityId)
-            uni.$ie.showSuccess('删除成功')
-            paging.value?.reload()
-        }
+        await removeVoluntaryByUniversity(record.universityId)
+        uni.$ie.showSuccess('删除成功')
+        paging.value?.reload()
     } else {
         throw new Error('Unsupported action id: ' + e.id)
     }

+ 1 - 1
src/pagesSystem/pages/setting/setting.vue

@@ -61,7 +61,7 @@ const settings = computed(() => [
     icon: 'trash',
     isLink: true,
     handler: async () => {
-      uni.$ie.showConfirm({
+      uni.$ie.showModal({
         title: '注销账号',
         content: '是否注销账号,注销后卡号将不能再注册使用系统且永久失效。请谨慎操作!'
       }).then(confirm => {

+ 4 - 1
src/utils/uni-tool.ts

@@ -173,7 +173,10 @@ const tool: IeTool = {
         cancelColor,
         confirmColor,
         success: (res) => {
-          resolve(res.confirm)
+          /* 这里不要动,就是这样的。形成await showConfirm的效果 2026.1.13 */
+          /* 如果有必须接收true/false的写法,请使用showModal */
+          if(res.confirm)(resolve(true))
+          else reject(false)
         },
         fail: reject
       });