uview-plus 3.8.32 → 3.8.39
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/README.md +2 -0
- package/changelog.md +43 -0
- package/components/u-button/u-button.vue +60 -16
- package/components/u-calendar/calendar.js +4 -3
- package/components/u-calendar/header.vue +74 -32
- package/components/u-calendar/month.vue +9 -0
- package/components/u-calendar/props.js +5 -0
- package/components/u-calendar/u-calendar.vue +46 -0
- package/components/u-input/u-input.vue +3 -1
- package/components/u-parse/node/node.vue +50 -20
- package/components/u-parse/u-parse.vue +38 -8
- package/components/u-tabbar/props.js +35 -0
- package/components/u-tabbar/tabbar.js +8 -1
- package/components/u-tabbar/u-tabbar.vue +82 -4
- package/components/u-tabbar-item/props.js +51 -1
- package/components/u-tabbar-item/tabbarItem.js +11 -1
- package/components/u-tabbar-item/u-tabbar-item.vue +327 -58
- package/index.scss +1 -0
- package/libs/css/theme-legacy-bridge.scss +6 -0
- package/libs/i18n/locales/de.json +1 -0
- package/libs/i18n/locales/en.json +1 -0
- package/libs/i18n/locales/es.json +1 -0
- package/libs/i18n/locales/fr.json +1 -0
- package/libs/i18n/locales/ja.json +1 -0
- package/libs/i18n/locales/ko.json +1 -0
- package/libs/i18n/locales/ru.json +1 -0
- package/libs/i18n/locales/th.json +1 -0
- package/libs/i18n/locales/zh-Hans.json +1 -0
- package/libs/i18n/locales/zh-Hant.json +1 -0
- package/libs/root/LICENSE +21 -0
- package/libs/theme/runtime.js +51 -3
- package/libs/theme/theme.js +7 -8
- package/package.json +1 -1
- package/theme.scss +0 -5
- package/types/comps/calendar.d.ts +5 -0
package/index.scss
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "Datumsauswahl",
|
|
35
35
|
"up.calendar.disabled": "Dieses Datum ist deaktiviert",
|
|
36
36
|
"up.calendar.daysExceed": "Die Anzahl der ausgewählten Tage darf {days} Tage nicht überschreiten",
|
|
37
|
+
"up.calendar.today": "Heute",
|
|
37
38
|
"up.cityLocate.locateCity": "Stadt lokalisieren",
|
|
38
39
|
"up.cityLocate.fail": "Lokalisierung fehlgeschlagen, bitte klicken Sie zum Wiederholen.",
|
|
39
40
|
"up.cityLocate.locating": "Lokalisierung läuft",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "Date selection",
|
|
35
35
|
"up.calendar.disabled": "This date is disabled",
|
|
36
36
|
"up.calendar.daysExceed": "The number of selected days cannot exceed {days} days",
|
|
37
|
+
"up.calendar.today": "Today",
|
|
37
38
|
"up.cityLocate.locateCity": "Locate city",
|
|
38
39
|
"up.cityLocate.fail": "Location failed, please click to retry.",
|
|
39
40
|
"up.cityLocate.locating": "Locating",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "Selección de fecha",
|
|
35
35
|
"up.calendar.disabled": "Esta fecha está deshabilitada",
|
|
36
36
|
"up.calendar.daysExceed": "Los días seleccionados no pueden exceder {days} días",
|
|
37
|
+
"up.calendar.today": "Hoy",
|
|
37
38
|
"up.cityLocate.locateCity": "Localizar ciudad",
|
|
38
39
|
"up.cityLocate.fail": "Error de localización, haga clic para reintentar.",
|
|
39
40
|
"up.cityLocate.locating": "Localizando",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "Sélection de dates",
|
|
35
35
|
"up.calendar.disabled": "Cette date est désactivée",
|
|
36
36
|
"up.calendar.daysExceed": "Le nombre de jours sélectionnés ne peut pas dépasser {days} jours",
|
|
37
|
+
"up.calendar.today": "Aujourd'hui",
|
|
37
38
|
"up.cityLocate.locateCity": "Localiser la ville",
|
|
38
39
|
"up.cityLocate.fail": "Échec de localisation, veuillez cliquer pour réessayer.",
|
|
39
40
|
"up.cityLocate.locating": "Localisation en cours",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "日付選択",
|
|
35
35
|
"up.calendar.disabled": "この日付は無効です",
|
|
36
36
|
"up.calendar.daysExceed": "選択日数は{days}日を超えることはできません",
|
|
37
|
+
"up.calendar.today": "今日",
|
|
37
38
|
"up.cityLocate.locateCity": "都市の位置を特定",
|
|
38
39
|
"up.cityLocate.fail": "位置特定に失敗しました。再試行するにはクリックしてください。",
|
|
39
40
|
"up.cityLocate.locating": "位置特定中",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "날짜 선택",
|
|
35
35
|
"up.calendar.disabled": "해당 날짜는 사용할 수 없습니다",
|
|
36
36
|
"up.calendar.daysExceed": "선택한 날짜 수가 {days}일을 초과할 수 없습니다",
|
|
37
|
+
"up.calendar.today": "오늘",
|
|
37
38
|
"up.cityLocate.locateCity": "도시 위치 찾기",
|
|
38
39
|
"up.cityLocate.fail": "위치 찾기 실패, 다시 시도하려면 클릭하세요.",
|
|
39
40
|
"up.cityLocate.locating": "위치 찾는 중",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "Выбор даты",
|
|
35
35
|
"up.calendar.disabled": "Эта дата отключена",
|
|
36
36
|
"up.calendar.daysExceed": "Количество выбранных дней не может превышать {days} дней",
|
|
37
|
+
"up.calendar.today": "Сегодня",
|
|
37
38
|
"up.cityLocate.locateCity": "Определение города",
|
|
38
39
|
"up.cityLocate.fail": "Ошибка определения местоположения, нажмите для повтора.",
|
|
39
40
|
"up.cityLocate.locating": "Определение местоположения",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "เลือกวันที่",
|
|
35
35
|
"up.calendar.disabled": "วันที่นี้ถูกปิดการใช้งาน",
|
|
36
36
|
"up.calendar.daysExceed": "จำนวนวันที่เลือกต้องไม่เกิน {days} วัน",
|
|
37
|
+
"up.calendar.today": "วันนี้",
|
|
37
38
|
"up.cityLocate.locateCity": "ระบุตำแหน่งเมือง",
|
|
38
39
|
"up.cityLocate.fail": "การระบุตำแหน่งล้มเหลว กรุณาคลิกเพื่อลองใหม่",
|
|
39
40
|
"up.cityLocate.locating": "กำลังระบุตำแหน่ง",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "日期选择",
|
|
35
35
|
"up.calendar.disabled": "该日期已禁用",
|
|
36
36
|
"up.calendar.daysExceed": "选择天数不能超过{days}天",
|
|
37
|
+
"up.calendar.today": "今天",
|
|
37
38
|
"up.cityLocate.locateCity": "定位城市",
|
|
38
39
|
"up.cityLocate.fail": "定位失败,请点击重试。",
|
|
39
40
|
"up.cityLocate.locating": "定位中",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"up.calendar.chooseDates": "日期選擇",
|
|
35
35
|
"up.calendar.disabled": "該日期已禁用",
|
|
36
36
|
"up.calendar.daysExceed": "選擇天數不能超過{days}天",
|
|
37
|
+
"up.calendar.today": "今天",
|
|
37
38
|
"up.cityLocate.locateCity": "定位城市",
|
|
38
39
|
"up.cityLocate.fail": "定位失敗,請點擊重試。",
|
|
39
40
|
"up.cityLocate.locating": "定位中",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present, Skiyee (Sky)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/libs/theme/runtime.js
CHANGED
|
@@ -133,6 +133,37 @@ function getRuntimeU(upU) {
|
|
|
133
133
|
return null
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
function normalizeRuntimeRoute(route) {
|
|
137
|
+
if (typeof route !== 'string') return ''
|
|
138
|
+
return route.replace(/^\//, '').split('?')[0]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function getCurrentRuntimeRoute() {
|
|
142
|
+
try {
|
|
143
|
+
if (typeof getCurrentPages !== 'function') return ''
|
|
144
|
+
const pages = getCurrentPages()
|
|
145
|
+
if (!Array.isArray(pages) || pages.length === 0) return ''
|
|
146
|
+
const page = pages[pages.length - 1] || {}
|
|
147
|
+
return normalizeRuntimeRoute(page.route || page.path || '')
|
|
148
|
+
} catch (e) {}
|
|
149
|
+
return ''
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function getRuntimeTabBarRoutes() {
|
|
153
|
+
const routes = []
|
|
154
|
+
try {
|
|
155
|
+
const runtimeConfig = typeof __uniConfig !== 'undefined' ? __uniConfig : null
|
|
156
|
+
const tabBarList = runtimeConfig?.tabBar?.list
|
|
157
|
+
if (Array.isArray(tabBarList)) {
|
|
158
|
+
tabBarList.forEach((item) => {
|
|
159
|
+
const route = normalizeRuntimeRoute(item?.pagePath || '')
|
|
160
|
+
if (route) routes.push(route)
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
} catch (e) {}
|
|
164
|
+
return routes
|
|
165
|
+
}
|
|
166
|
+
|
|
136
167
|
function hasActiveRuntimePage() {
|
|
137
168
|
try {
|
|
138
169
|
if (typeof getCurrentPages === 'function') {
|
|
@@ -154,6 +185,25 @@ function trySetNavigationBarColor(options) {
|
|
|
154
185
|
} catch (e) {}
|
|
155
186
|
}
|
|
156
187
|
|
|
188
|
+
export function isTabBarPage() {
|
|
189
|
+
const route = getCurrentRuntimeRoute()
|
|
190
|
+
if (!route) return false
|
|
191
|
+
const tabBarRoutes = getRuntimeTabBarRoutes()
|
|
192
|
+
if (!tabBarRoutes.length) return false
|
|
193
|
+
return tabBarRoutes.includes(route)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function trySetTabBarStyle(options) {
|
|
197
|
+
if (typeof uni === 'undefined' || typeof uni.setTabBarStyle !== 'function') return
|
|
198
|
+
if (!isTabBarPage()) return
|
|
199
|
+
try {
|
|
200
|
+
const result = uni.setTabBarStyle(options)
|
|
201
|
+
if (result && typeof result.catch === 'function') {
|
|
202
|
+
result.catch(() => {})
|
|
203
|
+
}
|
|
204
|
+
} catch (e) {}
|
|
205
|
+
}
|
|
206
|
+
|
|
157
207
|
function normalizeThemeMode(theme = 'light') {
|
|
158
208
|
return theme === 'dark' ? 'dark' : 'light'
|
|
159
209
|
}
|
|
@@ -377,9 +427,7 @@ export function applyNativeThemeUI(upU) {
|
|
|
377
427
|
backgroundColorBottom: pageBg
|
|
378
428
|
})
|
|
379
429
|
}
|
|
380
|
-
|
|
381
|
-
uni.setTabBarStyle(getThemeTabBarStyle(runtimeU))
|
|
382
|
-
}
|
|
430
|
+
trySetTabBarStyle(getThemeTabBarStyle(runtimeU))
|
|
383
431
|
}
|
|
384
432
|
|
|
385
433
|
export function applyNativeThemeUIDeferred(upU, delay = 30) {
|
package/libs/theme/theme.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import config from '../config/config.js'
|
|
2
2
|
import color from '../config/color.js'
|
|
3
3
|
import index from '../function/index.js'
|
|
4
|
+
import { trySetTabBarStyle } from './runtime.js'
|
|
4
5
|
|
|
5
6
|
const DEFAULT_LIGHT_THEME_COLORS = Object.freeze({
|
|
6
7
|
primary: '#3c9cff',
|
|
@@ -562,14 +563,12 @@ function applyNativeThemeUI(mode, themeColors, themeVars = {}) {
|
|
|
562
563
|
backgroundColorBottom: pageBg
|
|
563
564
|
})
|
|
564
565
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
})
|
|
572
|
-
}
|
|
566
|
+
trySetTabBarStyle({
|
|
567
|
+
color: isDark ? '#8e8e93' : '#909399',
|
|
568
|
+
selectedColor: isDark ? '#f2f2f7' : '#303133',
|
|
569
|
+
backgroundColor: isDark ? '#111111' : '#ffffff',
|
|
570
|
+
borderStyle: isDark ? 'white' : 'black'
|
|
571
|
+
})
|
|
573
572
|
}
|
|
574
573
|
|
|
575
574
|
function applyTheme(mode = 'light') {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-plus",
|
|
3
3
|
"name": "uview-plus",
|
|
4
4
|
"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
|
|
5
|
-
"version": "3.8.
|
|
5
|
+
"version": "3.8.39",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|
package/theme.scss
CHANGED
|
@@ -111,11 +111,6 @@ $up-legacy-light-theme-map: (
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
@include up-export-legacy-light-vars(':root');
|
|
115
|
-
@include up-export-legacy-light-vars('page');
|
|
116
|
-
@include up-export-legacy-light-vars('body');
|
|
117
|
-
@include up-export-legacy-light-vars("[data-up-theme='light']");
|
|
118
|
-
|
|
119
114
|
// scss混入,为了少写几行#ifndef
|
|
120
115
|
@mixin flex($direction: row) {
|
|
121
116
|
/* #ifndef APP-NVUE */
|