uview-pro 0.5.15 → 0.5.17
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/changelog.md +58 -6
- package/components/u-action-sheet/types.ts +10 -2
- package/components/u-action-sheet-item/types.ts +10 -2
- package/components/u-alert-tips/types.ts +10 -2
- package/components/u-alert-tips/u-alert-tips.vue +1 -1
- package/components/u-avatar/types.ts +10 -2
- package/components/u-back-top/types.ts +10 -2
- package/components/u-badge/types.ts +10 -2
- package/components/u-button/types.ts +11 -3
- package/components/u-button/u-button.vue +17 -0
- package/components/u-calendar/types.ts +54 -4
- package/components/u-calendar/u-calendar.vue +553 -162
- package/components/u-car-keyboard/types.ts +11 -3
- package/components/u-card/types.ts +10 -2
- package/components/u-cell-group/types.ts +10 -2
- package/components/u-cell-item/types.ts +10 -2
- package/components/u-checkbox/types.ts +12 -4
- package/components/u-checkbox/u-checkbox.vue +73 -9
- package/components/u-checkbox-group/types.ts +14 -6
- package/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/components/u-circle-progress/types.ts +10 -2
- package/components/u-city-select/types.ts +10 -2
- package/components/u-col/types.ts +10 -2
- package/components/u-collapse/types.ts +10 -2
- package/components/u-collapse-item/types.ts +10 -2
- package/components/u-column-notice/types.ts +10 -2
- package/components/u-config-provider/types.ts +10 -2
- package/components/u-count-down/types.ts +10 -2
- package/components/u-count-to/types.ts +10 -2
- package/components/u-divider/types.ts +10 -2
- package/components/u-dropdown/types.ts +10 -2
- package/components/u-dropdown-item/types.ts +10 -2
- package/components/u-empty/types.ts +10 -2
- package/components/u-fab/types.ts +10 -2
- package/components/u-field/types.ts +10 -2
- package/components/u-form/types.ts +14 -4
- package/components/u-form-item/types.ts +16 -3
- package/components/u-form-item/u-form-item.vue +72 -8
- package/components/u-full-screen/types.ts +10 -2
- package/components/u-gap/types.ts +10 -2
- package/components/u-grid/types.ts +10 -2
- package/components/u-grid-item/types.ts +10 -2
- package/components/u-icon/types.ts +10 -2
- package/components/u-image/types.ts +10 -2
- package/components/u-index-anchor/types.ts +10 -2
- package/components/u-input/types.ts +16 -3
- package/components/u-input/u-input.vue +98 -15
- package/components/u-loading/types.ts +10 -2
- package/components/u-loadmore/types.ts +10 -2
- package/components/u-mask/types.ts +10 -2
- package/components/u-message-input/types.ts +10 -2
- package/components/u-modal/types.ts +10 -2
- package/components/u-pagination/types.ts +11 -2
- package/components/u-picker/types.ts +10 -2
- package/components/u-popup/types.ts +10 -2
- package/components/u-popup/u-popup.vue +48 -2
- package/components/u-radio/types.ts +14 -4
- package/components/u-radio/u-radio.vue +78 -10
- package/components/u-radio-group/types.ts +12 -4
- package/components/u-rate/types.ts +10 -2
- package/components/u-read-more/types.ts +10 -2
- package/components/u-row/types.ts +10 -2
- package/components/u-row-notice/types.ts +10 -2
- package/components/u-safe-bottom/types.ts +19 -0
- package/components/u-safe-bottom/u-safe-bottom.vue +1 -1
- package/components/u-search/types.ts +10 -2
- package/components/u-section/types.ts +10 -2
- package/components/u-select/types.ts +10 -2
- package/components/u-skeleton/types.ts +10 -2
- package/components/u-slider/types.ts +10 -2
- package/components/u-status-bar/types.ts +21 -0
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-step/types.ts +10 -2
- package/components/u-steps/types.ts +10 -2
- package/components/u-sticky/types.ts +10 -2
- package/components/u-subsection/types.ts +10 -2
- package/components/u-swipe-action/types.ts +10 -2
- package/components/u-swiper/types.ts +10 -2
- package/components/u-switch/types.ts +12 -4
- package/components/u-switch/u-switch.vue +60 -5
- package/components/u-tabbar/types.ts +10 -2
- package/components/u-table/types.ts +10 -2
- package/components/u-tabs/types.ts +10 -2
- package/components/u-tabs-swiper/types.ts +10 -2
- package/components/u-tag/types.ts +10 -2
- package/components/u-tag/u-tag.vue +5 -0
- package/components/u-td/types.ts +10 -2
- package/components/u-text/types.ts +10 -2
- package/components/u-textarea/types.ts +16 -5
- package/components/u-textarea/u-textarea.vue +85 -5
- package/components/u-th/types.ts +10 -2
- package/components/u-th/u-th.vue +1 -1
- package/components/u-time-line/u-time-line.vue +13 -2
- package/components/u-time-line-item/types.ts +10 -2
- package/components/u-toast/types.ts +10 -2
- package/components/u-top-tips/types.ts +10 -2
- package/components/u-tr/types.ts +11 -3
- package/components/u-transition/types.ts +10 -2
- package/components/u-upload/types.ts +10 -2
- package/components/u-verification-code/types.ts +10 -2
- package/components/u-waterfall/types.ts +10 -2
- package/index.ts +4 -5
- package/libs/config/config.ts +27 -4
- package/libs/hooks/useCompRelation.ts +37 -34
- package/libs/index.ts +0 -1
- package/libs/util/config-provider.ts +24 -25
- package/locale/lang/en-US.ts +3 -1
- package/locale/lang/zh-CN.ts +3 -1
- package/package.json +3 -2
- package/types/global.d.ts +8 -10
- package/components/common/props.ts +0 -22
- package/components/u-safe-bottom/props.ts +0 -11
- package/components/u-status-bar/props.ts +0 -13
- package/libs/util/logger.ts +0 -364
package/changelog.md
CHANGED
|
@@ -1,19 +1,71 @@
|
|
|
1
|
-
## 0.5.
|
|
1
|
+
## 0.5.17(2026-04-15)
|
|
2
2
|
|
|
3
3
|
### 🐛 Bug Fixes | Bug 修复
|
|
4
4
|
|
|
5
|
-
- **
|
|
6
|
-
- **u-
|
|
7
|
-
- **
|
|
5
|
+
- **demo:** 修复topTips组件演示示例在小程序中不弹出的问题,需设置自定义navbar高度 ([0c72d24](https://github.com/anyup/uView-Pro/commit/0c72d24cd77f4ba6b6cb411810fcf5f0bd1d3272))
|
|
6
|
+
- **u-table:** 修复表格表头暗黑模式背景色问题 ([c7fd1a5](https://github.com/anyup/uView-Pro/commit/c7fd1a58e87c4efb84ccf737fe9d1e755908ba8f))
|
|
7
|
+
- **u-alert-tips:** 修复关闭按钮颜色样式问题 ([94001cf](https://github.com/anyup/uView-Pro/commit/94001cf79a03ea75695e414a7971e7ec39f445b6))
|
|
8
8
|
|
|
9
9
|
### ✨ Features | 新功能
|
|
10
10
|
|
|
11
|
-
- **
|
|
11
|
+
- **theme:** 更新主题配置和本地化文本 ([4caa2ed](https://github.com/anyup/uView-Pro/commit/4caa2edf9542f7f2b0a7bb9870585390f0241e80))
|
|
12
|
+
- **u-calendar:** 增强日历组件功能,支持多种日历模式:打卡签到、节假日标记、价格日历等场景,支持自定义插槽功能,动态价格显示;支持选中日期,只读模式设置;修复范围选择背景色样式问题 ([7a9250e](https://github.com/anyup/uView-Pro/commit/7a9250eb49f6694286bb0c3dad7bc9780ae95864))
|
|
13
|
+
- **u-popup:** 新增inline模式支持,允许弹窗组件直接插入页面内容而非传统弹窗形式 ([2e8890c](https://github.com/anyup/uView-Pro/commit/2e8890ca3c9cacb90739b33cb0e38db7e2bdb473))
|
|
14
|
+
- **u-calendar:** 统一日期格式YYYY-MM-DD,确保跨组件日期处理的一致性 ([092cc53](https://github.com/anyup/uView-Pro/commit/092cc5392b64990342c43fcbac9aec1bfa2bf982))
|
|
15
|
+
|
|
16
|
+
### ♻️ Code Refactoring | 代码重构
|
|
17
|
+
|
|
18
|
+
- **u-calendar:** 重构日历组件模板,统一页面和弹窗模式的日历组件结构 ([42894b8](https://github.com/anyup/uView-Pro/commit/42894b850f903e2471ca42e02f0379443139838b))
|
|
12
19
|
|
|
13
20
|
### 👥 Contributors
|
|
14
21
|
|
|
15
|
-
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
22
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
16
23
|
|
|
24
|
+
## 0.5.16(2026-03-26)
|
|
25
|
+
|
|
26
|
+
### ✨ Features | 新功能
|
|
27
|
+
|
|
28
|
+
- **web:** 浏览器平台添加触摸模拟器支持 ([cf96a73](https://github.com/anyup/uView-Pro/commit/cf96a73e09512291143954401aa7850ac59f1207))
|
|
29
|
+
- **u-button:** 新增 large、small 按钮尺寸选项,丰富按钮尺寸规格 ([053d7e8](https://github.com/anyup/uView-Pro/commit/053d7e8ab92af403cdfde36369f38a2aded27288))
|
|
30
|
+
- **u-input:** u-input添加size属性,支持small/default/large预设值以及自定义尺寸(#137) ([afed961](https://github.com/anyup/uView-Pro/commit/afed961f65c86bd84a2b02828bb361480c7f95b3))
|
|
31
|
+
- **u-textarea:** u-textarea组件新增size属性,支持small/default/large预设值以及自定义数值(#137) ([47296e8](https://github.com/anyup/uView-Pro/commit/47296e8669d419d41959dff01de758a610122d34))
|
|
32
|
+
- **u-checkbox:** u-checkbox,u-checkbox-group支持small/default/large预设尺寸配置,优化组件样式(#137) ([e8918e2](https://github.com/anyup/uView-Pro/commit/e8918e28a413d861e05a213d49f9a1b39af17964))
|
|
33
|
+
- **u-radio:** u-radio,u-radio-group支持small/default/large预设尺寸配置(#137) ([51af7f8](https://github.com/anyup/uView-Pro/commit/51af7f8f86eed99ee159738e43d5dc2d5c6747c8))
|
|
34
|
+
- **u-switch:** u-switch支持small/default/large预设尺寸配置(#137) ([6041d52](https://github.com/anyup/uView-Pro/commit/6041d52338172d40957e3ed7af1dde01aa7de074))
|
|
35
|
+
- **u-form:** 新增表单大小配置功能,u-form支持小、中、大三种尺寸设置(#137) ([324adb9](https://github.com/anyup/uView-Pro/commit/324adb99de9dfbb72a0a0c40748c11323d3b9470))
|
|
36
|
+
- **u-tag:** 为深色模式标签添加边框样式,保持统一性 ([84d0ad6](https://github.com/anyup/uView-Pro/commit/84d0ad6c805d570e216beaa2dc586687a5aae848))
|
|
37
|
+
|
|
38
|
+
### ♻️ Code Refactoring | 代码重构
|
|
39
|
+
|
|
40
|
+
- 添加调试模式配置并重构日志系统 ([a52a3f7](https://github.com/anyup/uView-Pro/commit/a52a3f7d6be7d8332a67c1d8458f4e65e0a0204e))
|
|
41
|
+
- **props:** 移除baseProps公共属性并内联到各组件,修复uni_modules引入方式在微信小程序正式打包运行报错的问题 ([f30f779](https://github.com/anyup/uView-Pro/commit/f30f7792a48679afc3cf705a5eb0b182591fe9b5))
|
|
42
|
+
- **form:** 调整表单大小配置位置 ([45ffecd](https://github.com/anyup/uView-Pro/commit/45ffecd3522df85cdaaa62ecb9c33d7839443586))
|
|
43
|
+
|
|
44
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
45
|
+
|
|
46
|
+
- **useChildren:** 修复组件关系工具子组件ID缓存问题,避免同组件多次调用useChildren时重复注册 ([3a8c659](https://github.com/anyup/uView-Pro/commit/3a8c659ce596b483559cf4b061d0b54d784a902b))
|
|
47
|
+
- **u-form:** 修复移除字段时方法不存在的错误 ([58ada99](https://github.com/anyup/uView-Pro/commit/58ada99a8cbd44874eebfd305a4aeb721add8558))
|
|
48
|
+
|
|
49
|
+
### 👥 Contributors
|
|
50
|
+
|
|
51
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
52
|
+
|
|
53
|
+
## 0.5.15(2026-03-25)
|
|
54
|
+
|
|
55
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
56
|
+
|
|
57
|
+
- **u-form:** 修复表单项底部边框默认值逻辑 ([d939fbd](https://github.com/anyup/uView-Pro/commit/d939fbd5df85c266f8a8f5e23ebeca251eee94ec))
|
|
58
|
+
- **u-input:** 修复u-input输入框在某些微信小程序平台下,重新获取焦点时会清空输入框的问题 ([cedecfa](https://github.com/anyup/uView-Pro/commit/cedecfa4bf2142046bb512b1d9e87f6c9d77516d))
|
|
59
|
+
- **demo:** 优化微信小程序首页u-sticky使用配置 ([cc4e9ac](https://github.com/anyup/uView-Pro/commit/cc4e9ac9f022e7713b2eb2746038a8481729c0b4))
|
|
60
|
+
|
|
61
|
+
### ✨ Features | 新功能
|
|
62
|
+
|
|
63
|
+
- **types:** 添加昵称输入类型支持 ([bd15170](https://github.com/anyup/uView-Pro/commit/bd15170d0ccc76098debb9e37b4acfbe43fef043))
|
|
64
|
+
|
|
65
|
+
### 👥 Contributors
|
|
66
|
+
|
|
67
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a> <a href="https://github.com/xaunseus"><img src="https://github.com/xaunseus.png?size=40" width="40" height="40" alt="xaunseus" title="xaunseus"/></a>
|
|
68
|
+
|
|
17
69
|
## 0.5.14(2026-03-23)
|
|
18
70
|
|
|
19
71
|
### 🐛 Bug Fixes | Bug 修复
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { ActionSheetItem, ActionSheetTips } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
import { getColor, useLocale } from '../../';
|
|
5
4
|
|
|
6
5
|
const { t } = useLocale();
|
|
@@ -10,7 +9,16 @@ const { t } = useLocale();
|
|
|
10
9
|
* @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
|
|
11
10
|
*/
|
|
12
11
|
export const ActionSheetProps = {
|
|
13
|
-
|
|
12
|
+
/** 自定义根节点样式 */
|
|
13
|
+
customStyle: {
|
|
14
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
15
|
+
default: () => ({})
|
|
16
|
+
},
|
|
17
|
+
/** 自定义根节点样式类 */
|
|
18
|
+
customClass: {
|
|
19
|
+
type: String as unknown as PropType<string>,
|
|
20
|
+
default: ''
|
|
21
|
+
},
|
|
14
22
|
/** 点击遮罩是否可以关闭actionSheet */
|
|
15
23
|
maskCloseAble: { type: Boolean, default: true },
|
|
16
24
|
/** 按钮的文字数组,可以自定义颜色和字体大小,字体单位为rpx */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import { baseProps } from '../common/props';
|
|
3
2
|
import { getColor } from '../../';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -7,7 +6,16 @@ import { getColor } from '../../';
|
|
|
7
6
|
* @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
|
|
8
7
|
*/
|
|
9
8
|
export const ActionSheetItemProps = {
|
|
10
|
-
|
|
9
|
+
/** 自定义根节点样式 */
|
|
10
|
+
customStyle: {
|
|
11
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
},
|
|
14
|
+
/** 自定义根节点样式类 */
|
|
15
|
+
customClass: {
|
|
16
|
+
type: String as unknown as PropType<string>,
|
|
17
|
+
default: ''
|
|
18
|
+
},
|
|
11
19
|
/** 标题 */
|
|
12
20
|
text: { type: String, default: '' },
|
|
13
21
|
/** 描述 */
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { ThemeType } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* alertTips 警告提示
|
|
7
6
|
* @description 警告提示,展现需要关注的信息
|
|
8
7
|
*/
|
|
9
8
|
export const AlertTipsProps = {
|
|
10
|
-
|
|
9
|
+
/** 自定义根节点样式 */
|
|
10
|
+
customStyle: {
|
|
11
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
},
|
|
14
|
+
/** 自定义根节点样式类 */
|
|
15
|
+
customClass: {
|
|
16
|
+
type: String as unknown as PropType<string>,
|
|
17
|
+
default: ''
|
|
18
|
+
},
|
|
11
19
|
/** 显示文字 */
|
|
12
20
|
title: { type: String, default: '' },
|
|
13
21
|
/** 主题,success/warning/info/error */
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { ImgMode } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
|
|
5
4
|
// u-avatar 组件 props
|
|
6
5
|
export const AvatarProps = {
|
|
7
|
-
|
|
6
|
+
/** 自定义根节点样式 */
|
|
7
|
+
customStyle: {
|
|
8
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
9
|
+
default: () => ({})
|
|
10
|
+
},
|
|
11
|
+
/** 自定义根节点样式类 */
|
|
12
|
+
customClass: {
|
|
13
|
+
type: String as unknown as PropType<string>,
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
8
16
|
/** 背景颜色 */
|
|
9
17
|
bgColor: { type: String, default: 'transparent' },
|
|
10
18
|
/** 头像路径 */
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { Shape } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
|
|
5
4
|
// u-back-top 组件 props
|
|
6
5
|
export const BackTopProps = {
|
|
7
|
-
|
|
6
|
+
/** 自定义根节点样式 */
|
|
7
|
+
customStyle: {
|
|
8
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
9
|
+
default: () => ({})
|
|
10
|
+
},
|
|
11
|
+
/** 自定义根节点样式类 */
|
|
12
|
+
customClass: {
|
|
13
|
+
type: String as unknown as PropType<string>,
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
8
16
|
/** 返回顶部的形状,circle-圆形,square-方形 */
|
|
9
17
|
mode: { type: String as PropType<Shape>, default: 'circle' },
|
|
10
18
|
/** 自定义图标 */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { BadgeSize, ThemeType } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* badge 角标类型定义
|
|
@@ -8,7 +7,16 @@ import { baseProps } from '../common/props';
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
export const BadgeProps = {
|
|
11
|
-
|
|
10
|
+
/** 自定义根节点样式 */
|
|
11
|
+
customStyle: {
|
|
12
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
13
|
+
default: () => ({})
|
|
14
|
+
},
|
|
15
|
+
/** 自定义根节点样式类 */
|
|
16
|
+
customClass: {
|
|
17
|
+
type: String as unknown as PropType<string>,
|
|
18
|
+
default: ''
|
|
19
|
+
},
|
|
12
20
|
/** 使用预设的背景颜色 primary,warning,success,error,info */
|
|
13
21
|
type: { type: String as PropType<ThemeType>, default: 'error' },
|
|
14
22
|
/** Badge的尺寸,default, mini */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { ButtonFormType, ButtonOpenType, ButtonScope, ButtonSize, ButtonType, Shape } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* button 按钮类型定义
|
|
@@ -8,14 +7,23 @@ import { baseProps } from '../common/props';
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
export const ButtonProps = {
|
|
11
|
-
|
|
10
|
+
/** 自定义根节点样式 */
|
|
11
|
+
customStyle: {
|
|
12
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
13
|
+
default: () => ({})
|
|
14
|
+
},
|
|
15
|
+
/** 自定义根节点样式类 */
|
|
16
|
+
customClass: {
|
|
17
|
+
type: String as unknown as PropType<string>,
|
|
18
|
+
default: ''
|
|
19
|
+
},
|
|
12
20
|
/** 按钮文本 */
|
|
13
21
|
text: { type: String, default: '' },
|
|
14
22
|
/** 是否细边框 */
|
|
15
23
|
hairLine: { type: Boolean, default: true },
|
|
16
24
|
/** 按钮的预置样式,default,primary,error,warning,success */
|
|
17
25
|
type: { type: String as PropType<ButtonType>, default: 'default' },
|
|
18
|
-
/** 按钮尺寸,default,medium,mini */
|
|
26
|
+
/** 按钮尺寸,default,large, medium=small,mini */
|
|
19
27
|
size: { type: String as PropType<ButtonSize>, default: 'default' },
|
|
20
28
|
/** 按钮形状,circle(两边为半圆),square(带圆角) */
|
|
21
29
|
shape: { type: String as PropType<Shape>, default: 'square' },
|
|
@@ -498,6 +498,12 @@ function agreeprivacyauthorization(event: any) {
|
|
|
498
498
|
background-color: hsla(0, 0%, 100%, 0.35);
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
+
.u-size-large {
|
|
502
|
+
font-size: 36rpx;
|
|
503
|
+
height: 100rpx;
|
|
504
|
+
line-height: 100rpx;
|
|
505
|
+
}
|
|
506
|
+
|
|
501
507
|
.u-size-default {
|
|
502
508
|
font-size: 30rpx;
|
|
503
509
|
height: 80rpx;
|
|
@@ -515,6 +521,17 @@ function agreeprivacyauthorization(event: any) {
|
|
|
515
521
|
padding: 0 80rpx;
|
|
516
522
|
}
|
|
517
523
|
|
|
524
|
+
.u-size-small {
|
|
525
|
+
/* #ifndef APP-NVUE */
|
|
526
|
+
display: inline-flex;
|
|
527
|
+
/* #endif */
|
|
528
|
+
width: auto;
|
|
529
|
+
font-size: 24rpx;
|
|
530
|
+
height: 60rpx;
|
|
531
|
+
line-height: 60rpx;
|
|
532
|
+
padding: 0 30rpx;
|
|
533
|
+
}
|
|
534
|
+
|
|
518
535
|
.u-size-mini {
|
|
519
536
|
/* #ifndef APP-NVUE */
|
|
520
537
|
display: inline-flex;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import type { CalendarChangeDate, CalendarChangeRange, CalendarMode, ThemeType } from '../../types/global';
|
|
3
|
-
import { baseProps } from '../common/props';
|
|
4
3
|
import { getColor, useLocale } from '../../';
|
|
5
4
|
|
|
6
5
|
const { t } = useLocale();
|
|
@@ -10,7 +9,16 @@ const { t } = useLocale();
|
|
|
10
9
|
* @description 供 u-calendar 组件 props 使用
|
|
11
10
|
*/
|
|
12
11
|
export const CalendarProps = {
|
|
13
|
-
|
|
12
|
+
/** 自定义根节点样式 */
|
|
13
|
+
customStyle: {
|
|
14
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
15
|
+
default: () => ({})
|
|
16
|
+
},
|
|
17
|
+
/** 自定义根节点样式类 */
|
|
18
|
+
customClass: {
|
|
19
|
+
type: String as unknown as PropType<string>,
|
|
20
|
+
default: ''
|
|
21
|
+
},
|
|
14
22
|
/** 是否开启底部安全区适配 */
|
|
15
23
|
safeAreaInsetBottom: { type: Boolean, default: false },
|
|
16
24
|
/** 是否允许通过点击遮罩关闭Picker */
|
|
@@ -46,7 +54,7 @@ export const CalendarProps = {
|
|
|
46
54
|
/** 选中|起始结束日期字体颜色 */
|
|
47
55
|
activeColor: { type: String, default: 'var(--u-white-color)' },
|
|
48
56
|
/** 范围内日期背景色 */
|
|
49
|
-
rangeBgColor: { type: String, default: '
|
|
57
|
+
rangeBgColor: { type: String, default: 'var(--u-type-primary-light)' },
|
|
50
58
|
/** 范围内日期字体颜色 */
|
|
51
59
|
rangeColor: { type: String, default: () => getColor('primary') },
|
|
52
60
|
/** mode=range时生效,起始日期自定义文案 */
|
|
@@ -57,6 +65,8 @@ export const CalendarProps = {
|
|
|
57
65
|
btnType: { type: String as PropType<ThemeType>, default: 'primary' },
|
|
58
66
|
/** 当前选中日期带选中效果 */
|
|
59
67
|
isActiveCurrent: { type: Boolean, default: true },
|
|
68
|
+
/** 初始化时是否默认选中今天,优先级低于 defaultDate/startDate/endDate */
|
|
69
|
+
defaultSelectToday: { type: Boolean, default: true },
|
|
60
70
|
/** 切换年月是否触发事件 mode=date时生效 */
|
|
61
71
|
isChange: { type: Boolean, default: false },
|
|
62
72
|
/** 是否显示右上角的关闭图标 */
|
|
@@ -66,7 +76,47 @@ export const CalendarProps = {
|
|
|
66
76
|
/** 是否显示农历 */
|
|
67
77
|
showLunar: { type: Boolean, default: false },
|
|
68
78
|
/** 是否在页面中显示 */
|
|
69
|
-
isPage: { type: Boolean, default: false }
|
|
79
|
+
isPage: { type: Boolean, default: false },
|
|
80
|
+
/** 默认选中的日期,mode=date时生效,格式:2024-01-01 */
|
|
81
|
+
defaultDate: { type: String, default: '' },
|
|
82
|
+
/** 默认选中的开始日期,mode=range时生效,格式:2024-01-01 */
|
|
83
|
+
startDate: { type: String, default: '' },
|
|
84
|
+
/** 默认选中的结束日期,mode=range时生效,格式:2024-01-01 */
|
|
85
|
+
endDate: { type: String, default: '' },
|
|
86
|
+
/** 是否只读,只读模式下禁止点击选择日期 */
|
|
87
|
+
readonly: { type: Boolean, default: false },
|
|
88
|
+
/** 已打卡日期列表,格式:['2024-01-01', '2024-01-02'] */
|
|
89
|
+
checkedDates: { type: Array as PropType<string[]>, default: () => [] },
|
|
90
|
+
/** 打卡日期背景色 */
|
|
91
|
+
checkedBgColor: { type: String, default: 'var(--u-type-warning)' },
|
|
92
|
+
/** 打卡日期字体颜色 */
|
|
93
|
+
checkedColor: { type: String, default: 'var(--u-white-color)' },
|
|
94
|
+
/** 今日是否已打卡 */
|
|
95
|
+
todayChecked: { type: Boolean, default: false },
|
|
96
|
+
/** 今日已打卡背景色 */
|
|
97
|
+
todayCheckedBgColor: { type: String, default: 'var(--u-type-success)' },
|
|
98
|
+
/** 未打卡日期背景色 */
|
|
99
|
+
uncheckedBgColor: { type: String, default: 'var(--u-light-color)' },
|
|
100
|
+
/** 未打卡日期字体颜色 */
|
|
101
|
+
uncheckedColor: { type: String, default: 'var(--u-white-color)' },
|
|
102
|
+
/** 是否启用打卡签到模式(未打卡日期显示灰色) */
|
|
103
|
+
checkinMode: { type: Boolean, default: false },
|
|
104
|
+
/** 节假日列表,格式:['2024-01-01', '2024-01-02'] */
|
|
105
|
+
holidays: { type: Array as PropType<string[]>, default: () => [] },
|
|
106
|
+
/** 节假日文字颜色 */
|
|
107
|
+
holidayColor: { type: String, default: 'var(--u-type-error)' },
|
|
108
|
+
/** 加班日列表,格式:['2024-01-06', '2024-01-07'] */
|
|
109
|
+
workdays: { type: Array as PropType<string[]>, default: () => [] },
|
|
110
|
+
/** 加班日文字颜色 */
|
|
111
|
+
workdayColor: { type: String, default: 'var(--u-type-primary)' },
|
|
112
|
+
/** 节日配置,格式:{ '2024-04-04': '清明节', '2024-04-01': '愚人节' } */
|
|
113
|
+
festivals: { type: Object as PropType<Record<string, string>>, default: () => ({}) },
|
|
114
|
+
/** 节日文字颜色 */
|
|
115
|
+
festivalColor: { type: String, default: 'var(--u-type-primary)' },
|
|
116
|
+
/** 是否显示内置节日(中国传统节日) */
|
|
117
|
+
showFestival: { type: Boolean, default: false },
|
|
118
|
+
/** 是否启用自定义日期内容插槽(微信小程序需要显式声明) */
|
|
119
|
+
useDateSlot: { type: Boolean, default: false }
|
|
70
120
|
};
|
|
71
121
|
|
|
72
122
|
export type CalendarProps = ExtractPropTypes<typeof CalendarProps>;
|