uniky 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -47,11 +47,11 @@ src/component/icon.vue 基础示例如下
|
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
49
|
<script lang="ts" setup>
|
|
50
|
+
// created by zhuxietong on 2026-02-25 16:52
|
|
50
51
|
import { ref, watch } from "vue";
|
|
51
52
|
|
|
52
53
|
let IconMap = {
|
|
53
54
|
delete: "",
|
|
54
|
-
addFill: "",
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
type IconName = keyof typeof IconMap;
|
|
@@ -60,19 +60,15 @@ const props = defineProps<{
|
|
|
60
60
|
name: IconName;
|
|
61
61
|
}>();
|
|
62
62
|
|
|
63
|
-
let value = IconMap[props.name] || "&#
|
|
64
|
-
value = value.replace("&#x", "
|
|
65
|
-
value = unescape(value);
|
|
63
|
+
let value = IconMap[props.name] || "";
|
|
64
|
+
value = String.fromCodePoint(parseInt(value.replace("&#x", "").replace(";", ""), 16));
|
|
66
65
|
const icon = ref(value);
|
|
67
66
|
|
|
68
67
|
watch(
|
|
69
68
|
() => props.name,
|
|
70
69
|
(val) => {
|
|
71
70
|
let iconStr = IconMap[val];
|
|
72
|
-
|
|
73
|
-
iconStr = iconStr.replace("&#x", "%u").replace(";", "");
|
|
74
|
-
iconStr = unescape(iconStr);
|
|
75
|
-
icon.value = iconStr;
|
|
71
|
+
icon.value = String.fromCodePoint(parseInt(iconStr.replace("&#x", "").replace(";", ""), 16));
|
|
76
72
|
},
|
|
77
73
|
);
|
|
78
74
|
</script>
|
|
@@ -81,24 +77,16 @@ watch(
|
|
|
81
77
|
@font-face {
|
|
82
78
|
font-family: "iconfont";
|
|
83
79
|
/* #ifdef H5 */
|
|
84
|
-
src: url("/
|
|
80
|
+
src: url("/static/iconfont.woff2") format("woff2");
|
|
85
81
|
/* #endif */
|
|
86
82
|
/* #ifdef MP-WEIXIN */
|
|
87
|
-
//src: url('//at.alicdn.com/t/c/font_2942740_av9lw25yela.woff2?t=1707276070685') format('woff2');
|
|
88
83
|
src: url("/static/iconfont.woff2") format("woff2");
|
|
89
|
-
|
|
90
84
|
/* #endif */
|
|
91
85
|
/* #ifdef APP-PLUS */
|
|
92
86
|
src: url("/static/iconfont.woff2") format("woff2");
|
|
93
87
|
/* #endif */
|
|
94
88
|
}
|
|
95
89
|
|
|
96
|
-
/*!* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 *!*/
|
|
97
|
-
/*@font-face {*/
|
|
98
|
-
/* font-family: 'iconfont'; !* Project id 2942740 *!*/
|
|
99
|
-
/* src: url('//at.alicdn.com/t/c/font_2942740_oa0mdid0yx.woff2?t=1694135753186') format('woff2');*/
|
|
100
|
-
/*}*/
|
|
101
|
-
|
|
102
90
|
.me-font {
|
|
103
91
|
font-family: iconfont;
|
|
104
92
|
text-align: center;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zed-editor-compatible
|
|
3
|
+
description: zed编辑器适配尝试
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 如果编辑中vue路径不能完整适配查找问题的修复
|
|
7
|
+
如果编辑器中光标移动到vue文件路径时按住cmd ,弹出:module "*.vue" 而非完整路径则可进行以下尝试【试过有效】
|
|
8
|
+
|
|
9
|
+
1. 升级 `typescript` 从 4.9 → 5.9,`vue-tsc` 从 1.x → 2.x
|
|
10
|
+
2. 移除已废弃的 `preserveValueImports` / `importsNotUsedAsValues`,改用 `verbatimModuleSyntax
|
|
11
|
+
3. 安装 `@vue/typescript-plugin` 使 Volar v2 能正确推导 `.vue` 模块类型
|
|
@@ -171,25 +171,54 @@ const buildUrl = (path: string, query?: Record<string, any>, json?: Record<strin
|
|
|
171
171
|
return params.length > 0 ? \`\${fullPath}?\${params.join('&')}\` : fullPath;
|
|
172
172
|
};
|
|
173
173
|
|
|
174
|
+
// 导航锁:修复安卓小程序下 @tap 重复触发导致的重复跳转
|
|
175
|
+
let isNavigating = false;
|
|
176
|
+
let navResetTimer: ReturnType<typeof setTimeout> | null = null;
|
|
177
|
+
|
|
178
|
+
const beginNavigate = (): boolean => {
|
|
179
|
+
if (isNavigating) return false;
|
|
180
|
+
isNavigating = true;
|
|
181
|
+
if (navResetTimer) clearTimeout(navResetTimer);
|
|
182
|
+
// 兜底:异常情况下(complete 未回调)自动释放锁
|
|
183
|
+
navResetTimer = setTimeout(() => {
|
|
184
|
+
isNavigating = false;
|
|
185
|
+
navResetTimer = null;
|
|
186
|
+
}, 1000);
|
|
187
|
+
return true;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const endNavigate = () => {
|
|
191
|
+
if (navResetTimer) {
|
|
192
|
+
clearTimeout(navResetTimer);
|
|
193
|
+
navResetTimer = null;
|
|
194
|
+
}
|
|
195
|
+
isNavigating = false;
|
|
196
|
+
};
|
|
197
|
+
|
|
174
198
|
const ToRoute: ToRouteInterface = {
|
|
175
199
|
navigate: (path, options) => {
|
|
200
|
+
if (!beginNavigate()) return;
|
|
176
201
|
const url = buildUrl(path, options?.query, options?.json);
|
|
177
|
-
uni.navigateTo({ url });
|
|
202
|
+
uni.navigateTo({ url, complete: endNavigate });
|
|
178
203
|
},
|
|
179
204
|
redirect: (path, options) => {
|
|
205
|
+
if (!beginNavigate()) return;
|
|
180
206
|
const url = buildUrl(path, options?.query, options?.json);
|
|
181
|
-
uni.redirectTo({ url });
|
|
207
|
+
uni.redirectTo({ url, complete: endNavigate });
|
|
182
208
|
},
|
|
183
209
|
switchTab: (path, options) => {
|
|
210
|
+
if (!beginNavigate()) return;
|
|
184
211
|
const url = buildUrl(path, options?.query, options?.json);
|
|
185
|
-
uni.switchTab({ url });
|
|
212
|
+
uni.switchTab({ url, complete: endNavigate });
|
|
186
213
|
},
|
|
187
214
|
reLaunch: (path, options) => {
|
|
215
|
+
if (!beginNavigate()) return;
|
|
188
216
|
const url = buildUrl(path, options?.query, options?.json);
|
|
189
|
-
uni.reLaunch({ url });
|
|
217
|
+
uni.reLaunch({ url, complete: endNavigate });
|
|
190
218
|
},
|
|
191
219
|
back: (delta = 1) => {
|
|
192
|
-
|
|
220
|
+
if (!beginNavigate()) return;
|
|
221
|
+
uni.navigateBack({ delta, complete: endNavigate });
|
|
193
222
|
}
|
|
194
223
|
};
|
|
195
224
|
|