uview-plus 3.7.36 → 3.8.18

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.
Files changed (125) hide show
  1. package/README.md +0 -1
  2. package/changelog.md +1993 -1820
  3. package/components/u-action-sheet/u-action-sheet.vue +54 -16
  4. package/components/u-agreement/u-agreement.vue +2 -1
  5. package/components/u-alert/u-alert.vue +8 -10
  6. package/components/u-button/u-button.vue +35 -5
  7. package/components/u-calendar/calendar.js +1 -0
  8. package/components/u-calendar/header.vue +98 -9
  9. package/components/u-calendar/month.vue +10 -7
  10. package/components/u-calendar/props.js +5 -0
  11. package/components/u-calendar/u-calendar.vue +109 -2
  12. package/components/u-car-keyboard/u-car-keyboard.vue +7 -7
  13. package/components/u-card/u-card.vue +6 -6
  14. package/components/u-cascader/u-cascader.vue +32 -12
  15. package/components/u-cate-tab/u-cate-tab.vue +49 -48
  16. package/components/u-cell/u-cell.vue +24 -4
  17. package/components/u-cell-group/u-cell-group.vue +10 -3
  18. package/components/u-checkbox/u-checkbox.vue +6 -6
  19. package/components/u-choose/u-choose.vue +9 -4
  20. package/components/u-city-locate/u-city-locate.vue +28 -22
  21. package/components/u-color-picker/u-color-picker.vue +15 -15
  22. package/components/u-datetime-picker/u-datetime-picker.vue +79 -10
  23. package/components/u-dragsort/u-dragsort.vue +3 -0
  24. package/components/u-dropdown/u-dropdown.vue +15 -2
  25. package/components/u-dropdown-item/u-dropdown-item.vue +3 -3
  26. package/components/u-form-item/u-form-item.vue +6 -1
  27. package/components/u-gap/u-gap.vue +5 -1
  28. package/components/u-goods-sku/u-goods-sku.vue +16 -15
  29. package/components/u-index-anchor/u-index-anchor.vue +13 -2
  30. package/components/u-index-list/u-index-list.vue +18 -5
  31. package/components/u-input/input.js +3 -3
  32. package/components/u-input/u-input.vue +27 -5
  33. package/components/u-keyboard/u-keyboard.vue +11 -6
  34. package/components/u-loading-page/loadingPage.js +1 -1
  35. package/components/u-loading-page/u-loading-page.vue +18 -12
  36. package/components/u-navbar/navbar.js +2 -3
  37. package/components/u-navbar/theme-vars.scss +21 -0
  38. package/components/u-navbar/u-navbar.vue +30 -6
  39. package/components/u-notice-bar/theme-vars.scss +25 -0
  40. package/components/u-notice-bar/u-notice-bar.vue +24 -5
  41. package/components/u-number-box/numberBox.js +4 -4
  42. package/components/u-number-box/u-number-box.vue +27 -13
  43. package/components/u-number-keyboard/u-number-keyboard.vue +6 -6
  44. package/components/u-picker/picker.js +43 -43
  45. package/components/u-picker/u-picker.vue +14 -2
  46. package/components/u-popup/popup.js +1 -1
  47. package/components/u-popup/u-popup.vue +14 -6
  48. package/components/u-pull-refresh/u-pull-refresh.vue +6 -6
  49. package/components/u-radio/u-radio.vue +6 -6
  50. package/components/u-rate/rate.js +2 -2
  51. package/components/u-rate/u-rate.vue +98 -21
  52. package/components/u-search/search.js +3 -3
  53. package/components/u-search/u-search.vue +29 -6
  54. package/components/u-select/u-select.vue +141 -73
  55. package/components/u-signature/u-signature.vue +35 -16
  56. package/components/u-skeleton/u-skeleton.vue +7 -2
  57. package/components/u-slider/u-slider.vue +30 -31
  58. package/components/u-steps-item/u-steps-item.vue +20 -17
  59. package/components/u-subsection/theme-vars.scss +41 -0
  60. package/components/u-subsection/u-subsection.vue +69 -16
  61. package/components/u-swipe-action-item/u-swipe-action-item.vue +11 -5
  62. package/components/u-switch/theme-vars.scss +41 -0
  63. package/components/u-switch/u-switch.vue +44 -15
  64. package/components/u-tabbar/u-tabbar.vue +5 -5
  65. package/components/u-tabbar-item/u-tabbar-item.vue +16 -5
  66. package/components/u-table/u-table.vue +18 -3
  67. package/components/u-table2/tableRow.vue +43 -41
  68. package/components/u-table2/u-table2.vue +56 -50
  69. package/components/u-tabs/u-tabs.vue +14 -1
  70. package/components/u-tag/theme-vars.scss +21 -0
  71. package/components/u-tag/u-tag.vue +17 -7
  72. package/components/u-td/u-td.vue +5 -3
  73. package/components/u-text/text.js +1 -1
  74. package/components/u-text/u-text.vue +15 -13
  75. package/components/u-textarea/props.js +2 -2
  76. package/components/u-textarea/textarea.js +1 -1
  77. package/components/u-textarea/u-textarea.vue +115 -61
  78. package/components/u-th/u-th.vue +5 -4
  79. package/components/u-title/u-title.vue +1 -0
  80. package/components/u-toast/u-toast.vue +8 -8
  81. package/components/u-tree/u-tree.vue +491 -51
  82. package/components/u-upload/u-upload.vue +34 -6
  83. package/index.js +178 -27
  84. package/index.scss +5 -1
  85. package/libs/config/color.js +1 -2
  86. package/libs/config/props.js +1 -1
  87. package/libs/css/theme-vars-core.scss +197 -0
  88. package/libs/css/theme-vars.scss +1 -0
  89. package/libs/function/index.js +7 -7
  90. package/libs/mixin/mixin.js +111 -4
  91. package/libs/root/index.js +175 -0
  92. package/libs/root/nvue-root.vue +72 -0
  93. package/libs/root/page.js +269 -0
  94. package/libs/root/root-toast-host.vue +31 -0
  95. package/libs/root/root.js +40 -0
  96. package/libs/root/runtime.js +11 -0
  97. package/libs/root/utils.js +115 -0
  98. package/libs/theme/runtime.js +391 -0
  99. package/libs/theme/theme.js +684 -0
  100. package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
  101. package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
  102. package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
  103. package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
  104. package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
  105. package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
  106. package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
  107. package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
  108. package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
  109. package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
  110. package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
  111. package/libs/util/gcanvas/context-webgl/Program.js +0 -0
  112. package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
  113. package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
  114. package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
  115. package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
  116. package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
  117. package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
  118. package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
  119. package/libs/util/gcanvas/env/canvas.js +0 -0
  120. package/libs/util/gcanvas/env/image.js +0 -0
  121. package/libs/util/gcanvas/env/tool.js +0 -0
  122. package/libs/util/gcanvas/index.js +0 -0
  123. package/package.json +3 -2
  124. package/theme.scss +113 -32
  125. package/types/index.d.ts +41 -2
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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.7.36",
5
+ "version": "3.8.18",
6
6
  "description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
7
7
  "keywords": [
8
8
  "uview",
@@ -77,7 +77,8 @@
77
77
  "jd": "-",
78
78
  "harmony": "√",
79
79
  "qq": "√",
80
- "lark": "-"
80
+ "lark": "-",
81
+ "xhs": "-"
81
82
  },
82
83
  "quickapp": {
83
84
  "huawei": "-",
package/theme.scss CHANGED
@@ -2,38 +2,119 @@
2
2
  // uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大,
3
3
  // 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入
4
4
 
5
- $u-main-color: #303133;
6
- $u-content-color: #606266;
7
- $u-tips-color: #909193;
8
- $u-light-color: #c0c4cc;
9
- $u-border-color: #dadbde;
10
- $u-bg-color: #f3f4f6;
11
- $u-disabled-color: #c8c9cc;
12
-
13
- $u-primary: #3c9cff;
14
- $u-primary-dark: #398ade;
15
- $u-primary-disabled: #9acafc;
16
- $u-primary-light: #ecf5ff;
17
-
18
- $u-warning: #f9ae3d;
19
- $u-warning-dark: #f1a532;
20
- $u-warning-disabled: #f9d39b;
21
- $u-warning-light: #fdf6ec;
22
-
23
- $u-success: #5ac725;
24
- $u-success-dark: #53c21d;
25
- $u-success-disabled: #a9e08f;
26
- $u-success-light: #f5fff0;
27
-
28
- $u-error: #f56c6c;
29
- $u-error-dark: #e45656;
30
- $u-error-disabled: #f7b2b2;
31
- $u-error-light: #fef0f0;
32
-
33
- $u-info: #909399;
34
- $u-info-dark: #767a82;
35
- $u-info-disabled: #c4c6c9;
36
- $u-info-light: #f4f4f5;
5
+ /* #ifdef APP-NVUE */
6
+ $u-main-color: var(--up-main-color, var(--u-main-color, #303133)) !default;
7
+ $u-content-color: var(--up-content-color, var(--u-content-color, #606266)) !default;
8
+ $u-tips-color: var(--up-tips-color, var(--u-tips-color, #909193)) !default;
9
+ $u-light-color: var(--up-light-color, var(--u-light-color, #c0c4cc)) !default;
10
+ $u-border-color: var(--up-border-color, var(--u-border-color, #dadbde)) !default;
11
+ $u-bg-color: var(--up-bg-color, var(--u-bg-color, #f3f4f6)) !default;
12
+ $u-disabled-color: var(--up-disabled-color, var(--u-disabled-color, #c8c9cc)) !default;
13
+
14
+ $u-primary: var(--up-primary, var(--u-primary, #3c9cff)) !default;
15
+ $u-primary-dark: var(--up-primary-dark, var(--u-primary-dark, #398ade)) !default;
16
+ $u-primary-disabled: var(--up-primary-disabled, var(--u-primary-disabled, #9acafc)) !default;
17
+ $u-primary-light: var(--up-primary-light, var(--u-primary-light, #ecf5ff)) !default;
18
+
19
+ $u-warning: var(--up-warning, var(--u-warning, #f9ae3d)) !default;
20
+ $u-warning-dark: var(--up-warning-dark, var(--u-warning-dark, #f1a532)) !default;
21
+ $u-warning-disabled: var(--up-warning-disabled, var(--u-warning-disabled, #f9d39b)) !default;
22
+ $u-warning-light: var(--up-warning-light, var(--u-warning-light, #fdf6ec)) !default;
23
+
24
+ $u-success: var(--up-success, var(--u-success, #5ac725)) !default;
25
+ $u-success-dark: var(--up-success-dark, var(--u-success-dark, #53c21d)) !default;
26
+ $u-success-disabled: var(--up-success-disabled, var(--u-success-disabled, #a9e08f)) !default;
27
+ $u-success-light: var(--up-success-light, var(--u-success-light, #f5fff0)) !default;
28
+
29
+ $u-error: var(--up-error, var(--u-error, #f56c6c)) !default;
30
+ $u-error-dark: var(--up-error-dark, var(--u-error-dark, #e45656)) !default;
31
+ $u-error-disabled: var(--up-error-disabled, var(--u-error-disabled, #f7b2b2)) !default;
32
+ $u-error-light: var(--up-error-light, var(--u-error-light, #fef0f0)) !default;
33
+
34
+ $u-info: var(--up-info, var(--u-info, #909399)) !default;
35
+ $u-info-dark: var(--up-info-dark, var(--u-info-dark, #767a82)) !default;
36
+ $u-info-disabled: var(--up-info-disabled, var(--u-info-disabled, #c4c6c9)) !default;
37
+ $u-info-light: var(--up-info-light, var(--u-info-light, #f4f4f5)) !default;
38
+ /* #endif */
39
+
40
+ /* #ifndef APP-NVUE */
41
+ $u-main-color: var(--up-main-color, var(--u-main-color, #303133)) !default;
42
+ $u-content-color: var(--up-content-color, var(--u-content-color, #606266)) !default;
43
+ $u-tips-color: var(--up-tips-color, var(--u-tips-color, #909193)) !default;
44
+ $u-light-color: var(--up-light-color, var(--u-light-color, #c0c4cc)) !default;
45
+ $u-border-color: var(--up-border-color, var(--u-border-color, #dadbde)) !default;
46
+ $u-bg-color: var(--up-bg-color, var(--u-bg-color, #f3f4f6)) !default;
47
+ $u-disabled-color: var(--up-disabled-color, var(--u-disabled-color, #c8c9cc)) !default;
48
+
49
+ $u-primary: var(--up-primary, var(--u-primary, #3c9cff)) !default;
50
+ $u-primary-dark: var(--up-primary-dark, var(--u-primary-dark, #398ade)) !default;
51
+ $u-primary-disabled: var(--up-primary-disabled, var(--u-primary-disabled, #9acafc)) !default;
52
+ $u-primary-light: var(--up-primary-light, var(--u-primary-light, #ecf5ff)) !default;
53
+
54
+ $u-warning: var(--up-warning, var(--u-warning, #f9ae3d)) !default;
55
+ $u-warning-dark: var(--up-warning-dark, var(--u-warning-dark, #f1a532)) !default;
56
+ $u-warning-disabled: var(--up-warning-disabled, var(--u-warning-disabled, #f9d39b)) !default;
57
+ $u-warning-light: var(--up-warning-light, var(--u-warning-light, #fdf6ec)) !default;
58
+
59
+ $u-success: var(--up-success, var(--u-success, #5ac725)) !default;
60
+ $u-success-dark: var(--up-success-dark, var(--u-success-dark, #53c21d)) !default;
61
+ $u-success-disabled: var(--up-success-disabled, var(--u-success-disabled, #a9e08f)) !default;
62
+ $u-success-light: var(--up-success-light, var(--u-success-light, #f5fff0)) !default;
63
+
64
+ $u-error: var(--up-error, var(--u-error, #f56c6c)) !default;
65
+ $u-error-dark: var(--up-error-dark, var(--u-error-dark, #e45656)) !default;
66
+ $u-error-disabled: var(--up-error-disabled, var(--u-error-disabled, #f7b2b2)) !default;
67
+ $u-error-light: var(--up-error-light, var(--u-error-light, #fef0f0)) !default;
68
+
69
+ $u-info: var(--up-info, var(--u-info, #909399)) !default;
70
+ $u-info-dark: var(--up-info-dark, var(--u-info-dark, #767a82)) !default;
71
+ $u-info-disabled: var(--up-info-disabled, var(--u-info-disabled, #c4c6c9)) !default;
72
+ $u-info-light: var(--up-info-light, var(--u-info-light, #f4f4f5)) !default;
73
+ /* #endif */
74
+
75
+ $up-legacy-light-theme-map: (
76
+ 'main-color': $u-main-color,
77
+ 'content-color': $u-content-color,
78
+ 'tips-color': $u-tips-color,
79
+ 'light-color': $u-light-color,
80
+ 'border-color': $u-border-color,
81
+ 'bg-color': $u-bg-color,
82
+ 'disabled-color': $u-disabled-color,
83
+ 'primary': $u-primary,
84
+ 'primary-dark': $u-primary-dark,
85
+ 'primary-disabled': $u-primary-disabled,
86
+ 'primary-light': $u-primary-light,
87
+ 'warning': $u-warning,
88
+ 'warning-dark': $u-warning-dark,
89
+ 'warning-disabled': $u-warning-disabled,
90
+ 'warning-light': $u-warning-light,
91
+ 'success': $u-success,
92
+ 'success-dark': $u-success-dark,
93
+ 'success-disabled': $u-success-disabled,
94
+ 'success-light': $u-success-light,
95
+ 'error': $u-error,
96
+ 'error-dark': $u-error-dark,
97
+ 'error-disabled': $u-error-disabled,
98
+ 'error-light': $u-error-light,
99
+ 'info': $u-info,
100
+ 'info-dark': $u-info-dark,
101
+ 'info-disabled': $u-info-disabled,
102
+ 'info-light': $u-info-light
103
+ );
104
+
105
+ @mixin up-export-legacy-light-vars($selector) {
106
+ #{$selector} {
107
+ @each $name, $value in $up-legacy-light-theme-map {
108
+ --up-light-#{$name}: #{$value};
109
+ --u-light-#{$name}: #{$value};
110
+ }
111
+ }
112
+ }
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']");
37
118
 
38
119
  // scss混入,为了少写几行#ifndef
39
120
  @mixin flex($direction: row) {
package/types/index.d.ts CHANGED
@@ -45,7 +45,8 @@ declare module 'uview-plus' {
45
45
  */
46
46
  customIcons: {
47
47
  [key: string]: string
48
- }
48
+ },
49
+ themeMode?: 'light' | 'dark'
49
50
  }
50
51
  interface Color {
51
52
  primary: string,
@@ -58,7 +59,9 @@ declare module 'uview-plus' {
58
59
  contentColor: string,
59
60
  tipsColor: string,
60
61
  lightColor: string,
61
- borderColor: string
62
+ borderColor: string,
63
+ bgColor?: string,
64
+ disabledColor?: string
62
65
  }
63
66
  interface GlobalConfig {
64
67
  config: Partial<Config>;
@@ -85,6 +88,42 @@ declare module 'uview-plus' {
85
88
  props: {},
86
89
  color: Color;
87
90
  platform: string;
91
+ theme: {
92
+ preference: 'system' | 'light' | 'dark';
93
+ mode: 'light' | 'dark';
94
+ version: number;
95
+ vars: Record<string, string>;
96
+ };
97
+ setTheme: (mode?: 'light' | 'dark') => void;
98
+ setThemePreference: (mode?: 'system' | 'light' | 'dark') => void;
99
+ getThemePreference: () => 'system' | 'light' | 'dark';
100
+ getSystemTheme: () => 'light' | 'dark';
101
+ getThemeVars: (mode?: 'light' | 'dark') => Record<string, string>;
102
+ /**
103
+ * 调用Root根组件中的全局Toast(内部封装了up-toast)
104
+ * - 传字符串时等价于 { message: 'xxx' }
105
+ */
106
+ rootToast: (options: string | {
107
+ message?: string;
108
+ title?: string;
109
+ duration?: number;
110
+ [key: string]: any;
111
+ }) => void;
112
+ /** @internal Root根组件用于注册全局Toast引用 */
113
+ setRootToastRef: (ref?: any) => void;
114
+ /**
115
+ * 调用Root根组件中的全局Notify(内部封装了up-notify)
116
+ * - 传字符串时等价于 { message: 'xxx' }
117
+ */
118
+ rootNotify: (options: string | {
119
+ message?: string;
120
+ title?: string;
121
+ duration?: number;
122
+ type?: 'primary' | 'success' | 'warning' | 'error';
123
+ [key: string]: any;
124
+ }) => void;
125
+ /** @internal Root根组件用于注册全局Notify引用 */
126
+ setRootNotifyRef: (ref?: any) => void;
88
127
  }
89
128
 
90
129
  export function setConfig(config: Partial<GlobalConfig>): void;