uview-plus 3.7.32 → 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 (126) hide show
  1. package/README.md +0 -1
  2. package/changelog.md +1993 -1808
  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 +8 -8
  90. package/libs/mixin/mixin.js +117 -5
  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 +1 -1
  124. package/theme.scss +113 -32
  125. package/types/comps/stepsItem.d.ts +8 -4
  126. package/types/index.d.ts +41 -2
@@ -8,9 +8,7 @@
8
8
  :safeAreaInsetBottom="safeAreaInsetBottom"
9
9
  @close="popupClose"
10
10
  :zIndex="zIndex"
11
- :customStyle="{
12
- backgroundColor: 'rgb(214, 218, 220)'
13
- }"
11
+ :customStyle="popupStyle"
14
12
  >
15
13
  <view class="u-keyboard">
16
14
  <slot />
@@ -106,6 +104,13 @@
106
104
  }
107
105
  },
108
106
  mixins: [mpMixin, mixin, props],
107
+ computed: {
108
+ popupStyle() {
109
+ return {
110
+ backgroundColor: this.upThemeVar('--up-bg-color', this.upThemeIsDark ? '#2c2c2e' : 'rgb(214, 218, 220)')
111
+ }
112
+ }
113
+ },
109
114
  emits: ["change", "close", "confirm", "cancel", "backspace"],
110
115
  methods: {
111
116
  change(e) {
@@ -138,11 +143,11 @@
138
143
  &__tooltip {
139
144
  @include flex;
140
145
  justify-content: space-between;
141
- background-color: #FFFFFF;
146
+ background-color: var(--up-card-bg-color, #ffffff);
142
147
  padding: 14px 12px;
143
148
 
144
149
  &__item {
145
- color: #333333;
150
+ color: var(--up-main-color, #303133);
146
151
  flex: 1;
147
152
  text-align: center;
148
153
  font-size: 15px;
@@ -155,7 +160,7 @@
155
160
 
156
161
  &__cancel {
157
162
  text-align: left;
158
- color: #888888;
163
+ color: var(--up-tips-color, #909399);
159
164
  }
160
165
 
161
166
  &__tips {
@@ -15,7 +15,7 @@ export default {
15
15
  image: '',
16
16
  loadingMode: 'circle',
17
17
  loading: false,
18
- bgColor: '#ffffff',
18
+ bgColor: '',
19
19
  color: '#C8C8C8',
20
20
  fontSize: 19,
21
21
  iconSize: 28,
@@ -1,17 +1,7 @@
1
1
  <template>
2
2
  <u-transition
3
3
  :show="loading"
4
- :custom-style="{
5
- position: 'fixed',
6
- top: 0,
7
- left: 0,
8
- right: 0,
9
- bottom: 0,
10
- backgroundColor: bgColor,
11
- display: 'flex',
12
- zIndex: zIndex,
13
- ...customStyle
14
- }"
4
+ :custom-style="overlayStyle"
15
5
  >
16
6
  <view class="u-loading-page">
17
7
  <view class="u-loading-page__warpper">
@@ -61,7 +51,7 @@ import { addUnit } from '../../libs/function/index';
61
51
  * @property {String} image 文字上方用于替换loading动画的图片
62
52
  * @property {String} loadingMode 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 (默认 'circle' )
63
53
  * @property {Boolean} loading 是否加载中 (默认 false )
64
- * @property {String} bgColor 背景色 (默认 '#ffffff' )
54
+ * @property {String} bgColor 背景色,留空时跟随主题页面背景
65
55
  * @property {String} color 文字颜色 (默认 '#C8C8C8' )
66
56
  * @property {String | Number} fontSize 文字大小 (默认 19 )
67
57
  * @property {String | Number} iconSize 图标大小 (默认 28 )
@@ -73,6 +63,22 @@ import { addUnit } from '../../libs/function/index';
73
63
  export default {
74
64
  name: "u-loading-page",
75
65
  mixins: [mpMixin, mixin, props],
66
+ computed: {
67
+ overlayStyle() {
68
+ const fallbackBg = this.$u?.color?.bgColor || (this.upThemeIsDark ? '#1f1f1f' : '#f3f4f6')
69
+ return {
70
+ position: 'fixed',
71
+ top: 0,
72
+ left: 0,
73
+ right: 0,
74
+ bottom: 0,
75
+ backgroundColor: this.bgColor || this.upThemeVar('--up-page-bg-color', fallbackBg),
76
+ display: 'flex',
77
+ zIndex: this.zIndex,
78
+ ...this.customStyle
79
+ }
80
+ }
81
+ },
76
82
  data() {
77
83
  return {};
78
84
  },
@@ -7,7 +7,6 @@
7
7
  * @lastTime : 2025-12-19 08:55:21
8
8
  * @FilePath : /uview-plus/libs/config/props/navbar.js
9
9
  */
10
- import color from '../../libs/config/color'
11
10
  export default {
12
11
  // navbar 组件
13
12
  navbar: {
@@ -21,11 +20,11 @@ export default {
21
20
  rightIcon: '',
22
21
  title: '',
23
22
  titleColor: '',
24
- bgColor: '#ffffff',
23
+ bgColor: '',
25
24
  titleWidth: '400rpx',
26
25
  height: '44px',
27
26
  leftIconSize: 20,
28
- leftIconColor: color.mainColor,
27
+ leftIconColor: '',
29
28
  autoBack: false,
30
29
  titleStyle: ''
31
30
  }
@@ -0,0 +1,21 @@
1
+ :root,
2
+ page,
3
+ body {
4
+ --up-navbar-bg-color: #ffffff;
5
+ }
6
+
7
+ @media (prefers-color-scheme: dark) {
8
+ :root,
9
+ page,
10
+ body {
11
+ --up-navbar-bg-color: #1c1c1e;
12
+ }
13
+ }
14
+
15
+ [data-up-theme='light'] {
16
+ --up-navbar-bg-color: #ffffff;
17
+ }
18
+
19
+ [data-up-theme='dark'] {
20
+ --up-navbar-bg-color: #1c1c1e;
21
+ }
@@ -10,14 +10,14 @@
10
10
  <view :class="[fixed && 'u-navbar--fixed']">
11
11
  <u-status-bar
12
12
  v-if="safeAreaInsetTop"
13
- :bgColor="statusBarBgColor ? statusBarBgColor : bgColor"
13
+ :bgColor="statusBarBgColor ? statusBarBgColor : navbarBgColor"
14
14
  ></u-status-bar>
15
15
  <view
16
16
  class="u-navbar__content"
17
17
  :class="[border && 'u-border-bottom']"
18
18
  :style="{
19
19
  height: addUnit(height),
20
- backgroundColor: bgColor,
20
+ backgroundColor: navbarBgColor,
21
21
  }"
22
22
  >
23
23
  <view
@@ -31,12 +31,12 @@
31
31
  v-if="leftIcon"
32
32
  :name="leftIcon"
33
33
  :size="leftIconSize"
34
- :color="leftIconColor"
34
+ :color="navbarLeftIconColor"
35
35
  ></up-icon>
36
36
  <text
37
37
  v-if="leftText"
38
38
  :style="{
39
- color: leftIconColor
39
+ color: navbarLeftIconColor
40
40
  }"
41
41
  class="u-navbar__content__left__text"
42
42
  >{{ leftText }}</text>
@@ -47,7 +47,7 @@
47
47
  class="u-line-1 u-navbar__content__title"
48
48
  :style="[{
49
49
  width: addUnit(titleWidth),
50
- color: titleColor,
50
+ color: navbarTitleColor,
51
51
  }, addStyle(titleStyle)]"
52
52
  >{{ title }}</text>
53
53
  </slot>
@@ -61,10 +61,12 @@
61
61
  v-if="rightIcon"
62
62
  :name="rightIcon"
63
63
  size="20"
64
+ :color="navbarRightColor"
64
65
  ></up-icon>
65
66
  <text
66
67
  v-if="rightText"
67
68
  class="u-navbar__content__right__text"
69
+ :style="{ color: navbarRightColor }"
68
70
  >{{ rightText }}</text>
69
71
  </slot>
70
72
  </view>
@@ -112,6 +114,23 @@
112
114
  return {
113
115
  }
114
116
  },
117
+ computed: {
118
+ navbarBgColor() {
119
+ if (this.bgColor) return this.bgColor
120
+ return this.upThemeVar('--up-navbar-bg-color', this.upThemeIsDark ? '#1c1c1e' : '#ffffff')
121
+ },
122
+ navbarTitleColor() {
123
+ if (this.titleColor) return this.titleColor
124
+ return this.upThemeVar('--up-main-color', this.$u.color.mainColor)
125
+ },
126
+ navbarLeftIconColor() {
127
+ if (this.leftIconColor) return this.leftIconColor
128
+ return this.upThemeVar('--up-main-color', this.$u.color.mainColor)
129
+ },
130
+ navbarRightColor() {
131
+ return this.upThemeVar('--up-main-color', this.$u.color.mainColor)
132
+ }
133
+ },
115
134
  emits: ["leftClick", "rightClick"],
116
135
  methods: {
117
136
  addStyle,
@@ -138,6 +157,10 @@
138
157
  }
139
158
  </script>
140
159
 
160
+ <style lang="scss">
161
+ @import "./theme-vars.scss";
162
+ </style>
163
+
141
164
  <style lang="scss" scoped>
142
165
 
143
166
  .u-navbar {
@@ -154,7 +177,7 @@
154
177
  @include flex(row);
155
178
  align-items: center;
156
179
  height: 44px;
157
- background-color: #9acafc;
180
+ background-color: $u-bg-color;
158
181
  position: relative;
159
182
  justify-content: center;
160
183
 
@@ -178,6 +201,7 @@
178
201
  &__text {
179
202
  font-size: 15px;
180
203
  margin-left: 3px;
204
+ color: $u-main-color;
181
205
  }
182
206
  }
183
207
 
@@ -0,0 +1,25 @@
1
+ :root,
2
+ page,
3
+ body {
4
+ --up-notice-bar-color: #f9ae3d;
5
+ --up-notice-bar-bg-color: #fdf6ec;
6
+ }
7
+
8
+ @media (prefers-color-scheme: dark) {
9
+ :root,
10
+ page,
11
+ body {
12
+ --up-notice-bar-color: #f9ae3d;
13
+ --up-notice-bar-bg-color: #3d2f1b;
14
+ }
15
+ }
16
+
17
+ [data-up-theme='light'] {
18
+ --up-notice-bar-color: #f9ae3d;
19
+ --up-notice-bar-bg-color: #fdf6ec;
20
+ }
21
+
22
+ [data-up-theme='dark'] {
23
+ --up-notice-bar-color: #f9ae3d;
24
+ --up-notice-bar-bg-color: #3d2f1b;
25
+ }
@@ -3,13 +3,13 @@
3
3
  class="u-notice-bar"
4
4
  v-if="show"
5
5
  :style="[{
6
- backgroundColor: bgColor
6
+ backgroundColor: resolvedBgColor
7
7
  }, addStyle(customStyle)]"
8
8
  >
9
9
  <template v-if="direction === 'column' || (direction === 'row' && step)">
10
10
  <u-column-notice
11
- :color="color"
12
- :bgColor="bgColor"
11
+ :color="resolvedColor"
12
+ :bgColor="resolvedBgColor"
13
13
  :text="text"
14
14
  :mode="mode"
15
15
  :step="step"
@@ -24,8 +24,8 @@
24
24
  </template>
25
25
  <template v-else>
26
26
  <u-row-notice
27
- :color="color"
28
- :bgColor="bgColor"
27
+ :color="resolvedColor"
28
+ :bgColor="resolvedBgColor"
29
29
  :text="text"
30
30
  :mode="mode"
31
31
  :fontSize="fontSize"
@@ -43,6 +43,7 @@
43
43
  import { props } from './props';
44
44
  import { mpMixin } from '../../libs/mixin/mpMixin';
45
45
  import { mixin } from '../../libs/mixin/mixin';
46
+ import defProps from '../../libs/config/props.js';
46
47
  import { addStyle } from '../../libs/function/index';
47
48
  /**
48
49
  * noticeBar 滚动通知
@@ -75,6 +76,20 @@
75
76
  show: true
76
77
  }
77
78
  },
79
+ computed: {
80
+ resolvedColor() {
81
+ if (this.upHasProp('color') || this.color !== defProps.noticeBar.color) {
82
+ return this.color
83
+ }
84
+ return this.upThemeVar('--up-notice-bar-color', this.$u.color.warning || '#f9ae3d')
85
+ },
86
+ resolvedBgColor() {
87
+ if (this.upHasProp('bgColor') || this.bgColor !== defProps.noticeBar.bgColor) {
88
+ return this.bgColor
89
+ }
90
+ return this.upThemeVar('--up-notice-bar-bg-color', this.$u.color.warningLight || '#fdf6ec')
91
+ }
92
+ },
78
93
  emits: ["click", "close"],
79
94
  methods: {
80
95
  addStyle,
@@ -95,6 +110,10 @@
95
110
  };
96
111
  </script>
97
112
 
113
+ <style lang="scss">
114
+ @import "./theme-vars.scss";
115
+ </style>
116
+
98
117
  <style lang="scss" scoped>
99
118
 
100
119
  .u-notice-bar {
@@ -24,13 +24,13 @@ export default {
24
24
  showPlus: true,
25
25
  decimalLength: null,
26
26
  longPress: true,
27
- color: '#323233',
27
+ color: '',
28
28
  buttonWidth: 30,
29
29
  buttonSize: 30,
30
30
  buttonRadius: '0px',
31
- bgColor: '#EBECEE',
32
- disabledBgColor: '#f7f8fa',
33
- inputBgColor: '#EBECEE',
31
+ bgColor: '',
32
+ disabledBgColor: '',
33
+ inputBgColor: '',
34
34
  cursorSpacing: 100,
35
35
  disableMinus: false,
36
36
  disablePlus: false,
@@ -22,7 +22,7 @@
22
22
  >
23
23
  <up-icon
24
24
  name="minus"
25
- :color="isDisabled('minus') ? '#c8c9cc' : '#323233'"
25
+ :color="isDisabled('minus') ? resolvedDisabledIconColor : resolvedColor"
26
26
  size="15"
27
27
  bold
28
28
  :customStyle="iconStyle"
@@ -83,7 +83,7 @@
83
83
  >
84
84
  <up-icon
85
85
  name="plus"
86
- :color="isDisabled('plus') ? '#c8c9cc' : '#323233'"
86
+ :color="isDisabled('plus') ? resolvedDisabledIconColor : resolvedColor"
87
87
  size="15"
88
88
  bold
89
89
  :customStyle="iconStyle"
@@ -166,6 +166,21 @@
166
166
  // #endif
167
167
  },
168
168
  computed: {
169
+ resolvedColor() {
170
+ return this.color || this.upThemeVar('--up-main-color', '#303133')
171
+ },
172
+ resolvedDisabledIconColor() {
173
+ return this.upThemeVar('--up-disabled-color', '#c8c9cc')
174
+ },
175
+ resolvedBgColor() {
176
+ return this.bgColor || this.upThemeVar('--up-bg-color', '#EBECEE')
177
+ },
178
+ resolvedDisabledBgColor() {
179
+ return this.disabledBgColor || this.upThemeVar('--up-card-bg-color', '#f7f8fa')
180
+ },
181
+ resolvedInputBgColor() {
182
+ return this.inputBgColor || this.resolvedBgColor
183
+ },
169
184
  hideMinus() {
170
185
  return this.currentValue == 0 && this.miniMode == true
171
186
  },
@@ -177,24 +192,23 @@
177
192
  buttonStyle() {
178
193
  return (type) => {
179
194
  const style = {
180
- backgroundColor: this.bgColor,
195
+ backgroundColor: this.resolvedBgColor,
181
196
  width: addUnit(this.buttonWidth),
182
197
  height: addUnit(this.buttonSize),
183
- color: this.color,
198
+ color: this.resolvedColor,
184
199
  borderRadius: this.buttonRadius
185
200
  }
186
201
  if (this.isDisabled(type)) {
187
- style.backgroundColor = this.disabledBgColor
202
+ style.backgroundColor = this.resolvedDisabledBgColor
188
203
  }
189
204
  return style
190
205
  }
191
206
  },
192
207
  // 输入框的样式
193
208
  inputStyle() {
194
- const disabled = this.disabled || this.disabledInput
195
209
  const style = {
196
- color: this.color,
197
- backgroundColor: this.inputBgColor || this.bgColor,
210
+ color: this.resolvedColor,
211
+ backgroundColor: this.resolvedInputBgColor,
198
212
  height: addUnit(this.buttonSize),
199
213
  width: addUnit(this.inputWidth)
200
214
  }
@@ -407,17 +421,17 @@
407
421
  </script>
408
422
 
409
423
  <style lang="scss" scoped>
410
- $u-numberBox-hover-bgColor: #E6E6E6 !default;
411
- $u-numberBox-disabled-color: #c8c9cc !default;
412
- $u-numberBox-disabled-bgColor: #f7f8fa !default;
424
+ $u-numberBox-hover-bgColor: var(--up-border-color, #E6E6E6) !default;
425
+ $u-numberBox-disabled-color: var(--up-disabled-color, #c8c9cc) !default;
426
+ $u-numberBox-disabled-bgColor: var(--up-card-bg-color, #f7f8fa) !default;
413
427
  $u-numberBox-plus-radius: 4px !default;
414
428
  $u-numberBox-minus-radius: 4px !default;
415
429
  $u-numberBox-input-text-align: center !default;
416
430
  $u-numberBox-input-font-size: 15px !default;
417
431
  $u-numberBox-input-padding: 0 !default;
418
432
  $u-numberBox-input-margin: 0 2px !default;
419
- $u-numberBox-input-disabled-color: #c8c9cc !default;
420
- $u-numberBox-input-disabled-bgColor: #f2f3f5 !default;
433
+ $u-numberBox-input-disabled-color: var(--up-disabled-color, #c8c9cc) !default;
434
+ $u-numberBox-input-disabled-bgColor: var(--up-bg-color, #f2f3f5) !default;
421
435
 
422
436
  .u-number-box {
423
437
  @include flex(row);
@@ -30,7 +30,7 @@
30
30
  >
31
31
  <up-icon
32
32
  name="backspace"
33
- color="#303133"
33
+ :color="upThemeVar('--up-main-color', '#303133')"
34
34
  size="28"
35
35
  ></up-icon>
36
36
  </view>
@@ -134,7 +134,7 @@
134
134
  </script>
135
135
 
136
136
  <style lang="scss" scoped>
137
- $u-number-keyboard-background-color:rgb(224, 228, 230) !default;
137
+ $u-number-keyboard-background-color:var(--up-bg-color, rgb(224, 228, 230)) !default;
138
138
  $u-number-keyboard-padding:8px 10rpx 8px 10rpx !default;
139
139
  $u-number-keyboard-button-width:222rpx !default;
140
140
  $u-number-keyboard-button-margin:4px 6rpx !default;
@@ -143,13 +143,13 @@
143
143
  $u-number-keyboard-button-border-bottom-left-radius:4px !default;
144
144
  $u-number-keyboard-button-border-bottom-right-radius:4px !default;
145
145
  $u-number-keyboard-button-height: 90rpx!default;
146
- $u-number-keyboard-button-background-color:#FFFFFF !default;
146
+ $u-number-keyboard-button-background-color:var(--up-card-bg-color, #ffffff) !default;
147
147
  $u-number-keyboard-button-box-shadow:0 2px 0px #BBBCBE !default;
148
148
  $u-number-keyboard-text-font-size:20px !default;
149
149
  $u-number-keyboard-text-font-weight:500 !default;
150
- $u-number-keyboard-text-color:$u-main-color !default;
151
- $u-number-keyboard-gray-background-color:rgb(200, 202, 210) !default;
152
- $u-number-keyboard-u-hover-class-background-color: #BBBCC6 !default;
150
+ $u-number-keyboard-text-color:var(--up-main-color, #303133) !default;
151
+ $u-number-keyboard-gray-background-color:var(--up-border-color, rgb(200, 202, 210)) !default;
152
+ $u-number-keyboard-u-hover-class-background-color: var(--up-border-color, #BBBCC6) !default;
153
153
 
154
154
  .u-keyboard {
155
155
  @include flex;
@@ -1,43 +1,43 @@
1
- /*
2
- * @Author : LQ
3
- * @Description :
4
- * @version : 3.0
5
- * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : jry
7
- * @lastTime : 2025-12-19 08:55:21
8
- * @FilePath : /uview-plus/libs/config/props/picker.js
9
- */
10
- import { t } from '../../libs/i18n';
11
-
12
- export default {
13
- // picker
14
- picker: {
15
- show: false,
16
- popupMode: 'bottom',
17
- showToolbar: true,
18
- title: '',
19
- columns: [],
20
- loading: false,
21
- itemHeight: 44,
22
- cancelText: t('up.common.cancel'),
23
- confirmText: t('up.common.confirm'),
24
- cancelColor: '#909193',
25
- confirmColor: '',
26
- visibleItemCount: 5,
27
- keyName: 'text',
28
- valueName: 'value',
29
- closeOnClickOverlay: false,
30
- defaultIndex: [],
31
- immediateChange: true,
32
- zIndex: 10076,
33
- disabled: false,
34
- disabledColor: '',
35
- placeholder: t('up.common.pleaseChoose'),
36
- inputProps: {},
37
- bgColor: '#FFFFFF',
38
- round: 0,
39
- duration: 300,
40
- overlayOpacity: 0.5,
41
- pageInline: false
42
- }
43
- };
1
+ /*
2
+ * @Author : LQ
3
+ * @Description :
4
+ * @version : 3.0
5
+ * @Date : 2021-08-20 16:44:21
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/picker.js
9
+ */
10
+ import { t } from '../../libs/i18n';
11
+
12
+ export default {
13
+ // picker
14
+ picker: {
15
+ show: false,
16
+ popupMode: 'bottom',
17
+ showToolbar: true,
18
+ title: '',
19
+ columns: [],
20
+ loading: false,
21
+ itemHeight: 44,
22
+ cancelText: t('up.common.cancel'),
23
+ confirmText: t('up.common.confirm'),
24
+ cancelColor: '#909193',
25
+ confirmColor: '',
26
+ visibleItemCount: 5,
27
+ keyName: 'text',
28
+ valueName: 'value',
29
+ closeOnClickOverlay: false,
30
+ defaultIndex: [],
31
+ immediateChange: true,
32
+ zIndex: 10076,
33
+ disabled: false,
34
+ disabledColor: '',
35
+ placeholder: t('up.common.pleaseChoose'),
36
+ inputProps: {},
37
+ bgColor: '',
38
+ round: 0,
39
+ duration: 300,
40
+ overlayOpacity: 0.5,
41
+ pageInline: false
42
+ }
43
+ };
@@ -44,7 +44,7 @@
44
44
  <picker-view
45
45
  class="u-picker__view"
46
46
  :mask-class="maskClass"
47
- :mask-style="maskStyle"
47
+ :mask-style="maskStyleInner"
48
48
  :indicatorStyle="`height: ${addUnit(itemHeight, 'px')}`"
49
49
  :value="innerIndex"
50
50
  :immediateChange="immediateChange"
@@ -238,6 +238,18 @@ export default {
238
238
  });
239
239
  }
240
240
  return res
241
+ },
242
+ maskStyleInner() {
243
+ // 显式传入时,始终以外部传参为准(即使传空字符串)
244
+ if (this.upHasProp('maskStyle')) {
245
+ return this.maskStyle || ''
246
+ }
247
+ if (this.upThemeIsDark) {
248
+ const topBottomStrong = 'rgba(28, 28, 30, 0.95)'
249
+ const topBottomWeak = 'rgba(28, 28, 30, 0.6)'
250
+ return `background-image: linear-gradient(180deg, ${topBottomStrong}, ${topBottomWeak}), linear-gradient(0deg, ${topBottomStrong}, ${topBottomWeak});`
251
+ }
252
+ return ''
241
253
  }
242
254
  },
243
255
  methods: {
@@ -471,7 +483,7 @@ export default {
471
483
  @include flex;
472
484
  justify-content: center;
473
485
  align-items: center;
474
- background-color: rgba(255, 255, 255, 0.87);
486
+ background-color: var(--up-card-bg-color, #ffffff);
475
487
  z-index: 1000;
476
488
  }
477
489
  }
@@ -23,7 +23,7 @@ export default {
23
23
  closeIconPos: 'top-right',
24
24
  round: '20px',
25
25
  zoom: true,
26
- bgColor: '#fff',
26
+ bgColor: '',
27
27
  overlayOpacity: 0.5,
28
28
  pageInline: false,
29
29
  touchable: false,