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
@@ -784,23 +784,27 @@ export default {
784
784
  </script>
785
785
 
786
786
  <style lang="scss" scoped>
787
- .u-table2 {
788
- width: auto;
789
- overflow: auto;
790
- white-space: nowrap;
791
- position: relative;
792
-
793
- .u-table-header {
794
- min-width: 100% !important;
795
- width: fit-content;
796
- background-color: #f5f7fa;
797
- }
798
-
799
- .u-table-body {
800
- min-width: 100% !important;
801
- width: fit-content;
802
- position: relative;
803
- }
787
+ .u-table2 {
788
+ width: auto;
789
+ overflow: auto;
790
+ white-space: nowrap;
791
+ position: relative;
792
+ color: var(--up-content-color, #606266);
793
+ background-color: var(--up-card-bg-color, #ffffff);
794
+
795
+ .u-table-header {
796
+ min-width: 100% !important;
797
+ width: fit-content;
798
+ background-color: var(--up-table2-header-bg-color, var(--up-bg-color, #f5f7fa));
799
+ color: var(--up-main-color, #303133);
800
+ }
801
+
802
+ .u-table-body {
803
+ min-width: 100% !important;
804
+ width: fit-content;
805
+ position: relative;
806
+ background-color: var(--up-card-bg-color, #ffffff);
807
+ }
804
808
 
805
809
  .u-table-sticky {
806
810
  position: sticky;
@@ -817,13 +821,13 @@ export default {
817
821
  }
818
822
 
819
823
  // 添加border样式支持
820
- &.u-table-border {
821
- border-top: 1px solid #ebeef5;
822
- border-left: 1px solid #ebeef5;
823
- border-right: 1px solid #ebeef5;
824
- .u-table-cell {
825
- border-right: 1px solid #ebeef5;
826
- }
824
+ &.u-table-border {
825
+ border-top: 1px solid var(--up-border-color, #ebeef5);
826
+ border-left: 1px solid var(--up-border-color, #ebeef5);
827
+ border-right: 1px solid var(--up-border-color, #ebeef5);
828
+ .u-table-cell {
829
+ border-right: 1px solid var(--up-border-color, #ebeef5);
830
+ }
827
831
 
828
832
  .u-table-cell:last-child {
829
833
  border-right: none;
@@ -837,14 +841,15 @@ export default {
837
841
  align-items: center;
838
842
  padding: 10px 1px;
839
843
  font-size: 14px;
840
- white-space: nowrap;
841
- overflow: hidden;
842
- text-overflow: ellipsis;
843
- line-height: 1.1;
844
- border-bottom: 1px solid #ebeef5;
845
- &.u-text-left {
846
- justify-content: flex-start;
847
- text-align: left;
844
+ white-space: nowrap;
845
+ overflow: hidden;
846
+ text-overflow: ellipsis;
847
+ line-height: 1.1;
848
+ color: var(--up-content-color, #606266);
849
+ border-bottom: 1px solid var(--up-border-color, #ebeef5);
850
+ &.u-text-left {
851
+ justify-content: flex-start;
852
+ text-align: left;
848
853
  }
849
854
  &.u-text-center {
850
855
  justify-content: center;
@@ -856,18 +861,18 @@ export default {
856
861
  }
857
862
  }
858
863
 
859
- .u-table-row-zebra {
860
- background-color: #fafafa;
861
- }
862
-
863
- .u-table-row-highlight {
864
- background-color: #f5f7fa;
865
- }
866
-
864
+ .u-table-row-zebra {
865
+ background-color: var(--up-table2-zebra-bg-color, rgba(255, 255, 255, 0.03));
866
+ }
867
+
868
+ .u-table-row-highlight {
869
+ background-color: var(--up-table2-highlight-bg-color, var(--up-bg-color, #f5f7fa));
870
+ }
871
+
867
872
  .u-table-empty {
868
873
  text-align: center;
869
874
  padding: 20px;
870
- color: #999;
875
+ color: var(--up-tips-color, #999);
871
876
  }
872
877
 
873
878
  .u-table-cell-hidden {
@@ -880,16 +885,17 @@ export default {
880
885
  }
881
886
 
882
887
  // 固定列浮动视图
883
- .u-table-fixed-shadow {
888
+ .u-table-fixed-shadow {
884
889
  position: absolute;
885
890
  top: 0;
886
891
  left: 0;
887
892
  width: auto;
888
893
  z-index: 20;
889
- box-shadow: 2px 0 5px rgba(0, 0, 0, 0.15);
890
- overflow: hidden;
891
- background-color: #ffffff;
892
- }
894
+ box-shadow: 2px 0 5px rgba(0, 0, 0, 0.15);
895
+ overflow: hidden;
896
+ background-color: var(--up-card-bg-color, #ffffff);
897
+ color: var(--up-content-color, #606266);
898
+ }
893
899
 
894
900
  // .u-table-fixed-row {
895
901
  // display: flex;
@@ -900,10 +906,10 @@ export default {
900
906
  // }
901
907
 
902
908
  // 为固定列也添加border样式支持
903
- .u-table-fixed-shadow .u-table-border {
904
- .u-table-cell {
905
- border-right: 1rpx solid #ebeef5;
906
- }
909
+ .u-table-fixed-shadow .u-table-border {
910
+ .u-table-cell {
911
+ border-right: 1rpx solid var(--up-border-color, #ebeef5);
912
+ }
907
913
 
908
914
  .u-table-cell:last-child {
909
915
  border-right: none;
@@ -158,9 +158,22 @@
158
158
  const customeStyle = (index == this.innerCurrent) ?
159
159
  addStyle(this.activeStyle) :
160
160
  addStyle(this.inactiveStyle)
161
+ const isActive = index == this.innerCurrent
162
+ const defaultActiveColor = defProps.tabs?.activeStyle?.color || '#303133'
163
+ const defaultInactiveColor = defProps.tabs?.inactiveStyle?.color || '#606266'
164
+ const isActiveStyleOverridden = this.upHasProp('activeStyle')
165
+ || (customeStyle && customeStyle.color && customeStyle.color !== defaultActiveColor)
166
+ const isInactiveStyleOverridden = this.upHasProp('inactiveStyle')
167
+ || (customeStyle && customeStyle.color && customeStyle.color !== defaultInactiveColor)
168
+ if (isActive && !isActiveStyleOverridden) {
169
+ style.color = this.upThemeVar('--up-main-color', this.$u.color.mainColor || defaultActiveColor)
170
+ }
171
+ if (!isActive && !isInactiveStyleOverridden) {
172
+ style.color = this.upThemeVar('--up-content-color', this.$u.color.contentColor || defaultInactiveColor)
173
+ }
161
174
  // 如果当前菜单被禁用,则加上对应颜色,需要在此做处理,是因为nvue下,无法在style样式中通过!import覆盖标签的内联样式
162
175
  if (this.tabList[index].disabled) {
163
- style.color = '#c8c9cc'
176
+ style.color = this.upThemeVar('--up-disabled-color', this.$u.color.disabledColor || '#c8c9cc')
164
177
  }
165
178
  return deepMerge(customeStyle, style)
166
179
  }
@@ -0,0 +1,21 @@
1
+ :root,
2
+ page,
3
+ body {
4
+ --up-tag-close-bg-color: #c8c9cc;
5
+ }
6
+
7
+ @media (prefers-color-scheme: dark) {
8
+ :root,
9
+ page,
10
+ body {
11
+ --up-tag-close-bg-color: #4b5563;
12
+ }
13
+ }
14
+
15
+ [data-up-theme='light'] {
16
+ --up-tag-close-bg-color: #c8c9cc;
17
+ }
18
+
19
+ [data-up-theme='dark'] {
20
+ --up-tag-close-bg-color: #4b5563;
21
+ }
@@ -61,7 +61,7 @@
61
61
  :class="[`u-tag__close--${size}`]"
62
62
  v-if="closable"
63
63
  @tap.stop="closeHandler"
64
- :style="{backgroundColor: closeColor}"
64
+ :style="{backgroundColor: resolvedCloseColor}"
65
65
  >
66
66
  <up-icon
67
67
  name="close"
@@ -168,6 +168,12 @@
168
168
  // 图标颜色
169
169
  elIconColor() {
170
170
  return this.iconColor ? this.iconColor : this.plain ? this.type : '#ffffff'
171
+ },
172
+ resolvedCloseColor() {
173
+ if (this.upHasProp('closeColor') || this.closeColor !== '#C6C7CB') {
174
+ return this.closeColor
175
+ }
176
+ return this.upThemeVar('--up-tag-close-bg-color', this.$u.color.disabledColor || '#c8c9cc')
171
177
  }
172
178
  },
173
179
  emits: ["click", "close"],
@@ -189,6 +195,10 @@
189
195
  }
190
196
  </script>
191
197
 
198
+ <style lang="scss">
199
+ @import "./theme-vars.scss";
200
+ </style>
201
+
192
202
  <style
193
203
  lang="scss"
194
204
  scoped
@@ -262,7 +272,7 @@
262
272
  }
263
273
 
264
274
  &--primary--plain--fill {
265
- background-color: #ecf5ff;
275
+ background-color: $u-primary-light;
266
276
  }
267
277
 
268
278
  &__text--primary {
@@ -285,7 +295,7 @@
285
295
  }
286
296
 
287
297
  &--error--plain--fill {
288
- background-color: #fef0f0;
298
+ background-color: $u-error-light;
289
299
  }
290
300
 
291
301
  &__text--error {
@@ -308,7 +318,7 @@
308
318
  }
309
319
 
310
320
  &--warning--plain--fill {
311
- background-color: #fdf6ec;
321
+ background-color: $u-warning-light;
312
322
  }
313
323
 
314
324
  &__text--warning {
@@ -331,7 +341,7 @@
331
341
  }
332
342
 
333
343
  &--success--plain--fill {
334
- background-color: #f5fff0;
344
+ background-color: $u-success-light;
335
345
  }
336
346
 
337
347
  &__text--success {
@@ -354,7 +364,7 @@
354
364
  }
355
365
 
356
366
  &--info--plain--fill {
357
- background-color: #f4f4f5;
367
+ background-color: $u-info-light;
358
368
  }
359
369
 
360
370
  &__text--info {
@@ -371,7 +381,7 @@
371
381
  top: 10px;
372
382
  right: 10px;
373
383
  border-radius: 100px;
374
- background-color: #C6C7CB;
384
+ background-color: $u-disabled-color;
375
385
  @include flex(row);
376
386
  align-items: center;
377
387
  justify-content: center;
@@ -58,13 +58,15 @@
58
58
  if (this.parent) {
59
59
  // 将父组件的相关参数,合并到本组件
60
60
  let style = {};
61
+ const borderColor = this.parent.resolvedBorderColor || this.parent.borderColor;
62
+ const textColor = this.parent.resolvedColor || this.parent.color;
61
63
  if (this.width != "auto") style.flex = `0 0 ${this.width}`;
62
64
  style.textAlign = this.parent.align;
63
65
  style.fontSize = addUnit(this.parent.fontSize);
64
66
  style.padding = this.parent.padding;
65
- style.borderBottom = `solid 1px ${this.parent.borderColor}`;
66
- style.borderRight = `solid 1px ${this.parent.borderColor}`;
67
- style.color = this.parent.color;
67
+ style.borderBottom = `solid 1px ${borderColor}`;
68
+ style.borderRight = `solid 1px ${borderColor}`;
69
+ style.color = textColor;
68
70
  if (this.textAlign != '') {
69
71
  style.textAlign = this.textAlign;
70
72
  }
@@ -23,7 +23,7 @@ export default {
23
23
  bold: false,
24
24
  block: false,
25
25
  lines: '',
26
- color: '#303133',
26
+ color: '',
27
27
  size: 15,
28
28
  iconStyle: {
29
29
  fontSize: '15px'
@@ -127,19 +127,21 @@ export default {
127
127
  }
128
128
  return style;
129
129
  },
130
- valueStyle() {
131
- const style = {
132
- textDecoration: this.decoration,
133
- fontWeight: this.bold ? 'bold' : 'normal',
134
- wordWrap: this.wordWrap,
135
- fontSize: addUnit(this.size)
136
- }
137
- !this.type && (style.color = this.color)
138
- this.isNvue && this.lines && (style.lines = this.lines)
139
- this.lineHeight &&
140
- (style.lineHeight = addUnit(this.lineHeight))
141
- !this.isNvue && this.block && (style.display = 'block')
142
- return deepMerge(style, addStyle(this.customStyle))
130
+ valueStyle() {
131
+ const style = {
132
+ textDecoration: this.decoration,
133
+ fontWeight: this.bold ? 'bold' : 'normal',
134
+ wordWrap: this.wordWrap,
135
+ fontSize: addUnit(this.size)
136
+ }
137
+ if (!this.type) {
138
+ style.color = this.color || this.upThemeVar('--up-content-color', this.$u?.color?.contentColor || '#606266')
139
+ }
140
+ this.isNvue && this.lines && (style.lines = this.lines)
141
+ this.lineHeight &&
142
+ (style.lineHeight = addUnit(this.lineHeight))
143
+ !this.isNvue && this.block && (style.display = 'block')
144
+ return deepMerge(style, addStyle(this.customStyle))
143
145
  },
144
146
  isNvue() {
145
147
  let nvue = false
@@ -21,12 +21,12 @@ export const props = defineMixin({
21
21
  // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
22
22
  placeholderClass: {
23
23
  type: String,
24
- default: () => defProps.input.placeholderClass
24
+ default: () => defProps.textarea.placeholderClass
25
25
  },
26
26
  // 指定placeholder的样式
27
27
  placeholderStyle: {
28
28
  type: [String, Object],
29
- default: () => defProps.input.placeholderStyle
29
+ default: () => defProps.textarea.placeholderStyle
30
30
  },
31
31
  // 输入框高度
32
32
  height: {
@@ -13,7 +13,7 @@ export default {
13
13
  value: '',
14
14
  placeholder: '',
15
15
  placeholderClass: 'textarea-placeholder',
16
- placeholderStyle: 'color: #c0c4cc',
16
+ placeholderStyle: '',
17
17
  height: 70,
18
18
  confirmType: 'done',
19
19
  disabled: false,
@@ -2,11 +2,11 @@
2
2
  <view class="u-textarea" :class="textareaClass" :style="[textareaStyle]">
3
3
  <textarea
4
4
  class="u-textarea__field"
5
- :value="innerValue"
6
- :style="fieldStyle"
7
- :placeholder="placeholder"
8
- :placeholder-style="addStyle(placeholderStyle, typeof placeholderStyle === 'string' ? 'string' : 'object')"
9
- :placeholder-class="placeholderClass"
5
+ :value="innerValue"
6
+ :style="fieldStyle"
7
+ :placeholder="placeholder"
8
+ :placeholder-style="placeholderStyleInner"
9
+ :placeholder-class="placeholderClass"
10
10
  :disabled="disabled"
11
11
  :focus="focus"
12
12
  :autoHeight="autoHeight"
@@ -30,14 +30,12 @@
30
30
  @keyboardheightchange="onKeyboardheightchange"
31
31
  ></textarea>
32
32
  <!-- #ifndef MP-ALIPAY -->
33
- <text
34
- class="u-textarea__count"
35
- :style="{
36
- 'background-color': disabled ? 'transparent' : '#fff',
37
- }"
38
- v-if="count"
39
- >{{ innerValue.length }}/{{ maxlength }}</text
40
- >
33
+ <text
34
+ class="u-textarea__count"
35
+ :style="countStyle"
36
+ v-if="count"
37
+ >{{ innerValue.length }}/{{ maxlength }}</text
38
+ >
41
39
  <!-- #endif -->
42
40
  </view>
43
41
  </template>
@@ -145,38 +143,75 @@ export default {
145
143
  }
146
144
  // #endif
147
145
  },
148
- computed: {
149
- fieldStyle() {
150
- let style = {};
151
- style['height'] = addUnit(this.height);
152
- if (this.autoHeight) {
153
- style['height'] = 'auto';
154
- style['minHeight'] = addUnit(this.height);
155
- }
156
- return style;
146
+ computed: {
147
+ placeholderStyleInner() {
148
+ if (this.placeholderStyle) {
149
+ return addStyle(this.placeholderStyle, typeof this.placeholderStyle === 'string' ? 'string' : 'object')
150
+ }
151
+ return `color: ${this.upThemeVar('--up-tips-color', this.$u?.color?.tipsColor || '#909399')}`
152
+ },
153
+ countStyle() {
154
+ if (this.disabled) return { backgroundColor: 'transparent' }
155
+ return {
156
+ backgroundColor: this.upThemeVar('--up-card-bg-color', '#ffffff'),
157
+ color: this.upThemeVar('--up-tips-color', '#909193')
158
+ }
159
+ },
160
+ fieldStyle() {
161
+ const style = {
162
+ height: addUnit(this.height),
163
+ backgroundColor: 'transparent',
164
+ color: this.upThemeVar('--up-content-color', '#606266'),
165
+ caretColor: this.upThemeVar('--up-main-color', '#303133')
166
+ };
167
+ if (this.autoHeight) {
168
+ style['height'] = 'auto';
169
+ style['minHeight'] = addUnit(this.height);
170
+ }
171
+ return style;
157
172
  },
158
173
  // 组件的类名
159
- textareaClass() {
160
- let classes = [],
161
- { border, disabled } = this;
162
- border === "surround" &&
163
- (classes = classes.concat(["u-border", "u-textarea--radius"]));
164
- border === "bottom" &&
165
- (classes = classes.concat([
166
- "u-border-bottom",
167
- "u-textarea--no-radius",
168
- ]));
169
- disabled && classes.push("u-textarea--disabled");
170
- return classes.join(" ");
171
- },
172
- // 组件的样式
173
- textareaStyle() {
174
- const style = {};
175
- // #ifdef APP-NVUE
176
- // 由于textarea在安卓nvue上的差异性,需要额外再调整其内边距
177
- if (os() === "android") {
178
- style.paddingTop = "6px";
179
- style.paddingLeft = "9px";
174
+ textareaClass() {
175
+ let classes = [],
176
+ { border, disabled } = this;
177
+ border === "surround" &&
178
+ (classes = classes.concat(["u-textarea--radius"]));
179
+ border === "bottom" &&
180
+ (classes = classes.concat([
181
+ "u-textarea--no-radius",
182
+ ]));
183
+ disabled && classes.push("u-textarea--disabled");
184
+ return classes.join(" ");
185
+ },
186
+ textareaBorderColor() {
187
+ const lightBorder = this.upThemeVar('--up-border-color', '#dadbde');
188
+ return this.upThemeVar(
189
+ '--up-input-border-color',
190
+ this.upThemeIsDark ? 'rgba(255, 255, 255, 0.08)' : lightBorder
191
+ );
192
+ },
193
+ // 组件的样式
194
+ textareaStyle() {
195
+ const style = {};
196
+ style.backgroundColor = this.disabled
197
+ ? this.upThemeVar('--up-bg-color', '#f5f7fa')
198
+ : this.upThemeVar('--up-card-bg-color', '#ffffff');
199
+ style.color = this.upThemeVar('--up-content-color', '#606266');
200
+ if (this.border === "surround") {
201
+ style.borderWidth = "0.5px";
202
+ style.borderStyle = "solid";
203
+ style.borderColor = this.textareaBorderColor;
204
+ }
205
+ if (this.border === "bottom") {
206
+ style.borderBottomWidth = "0.5px";
207
+ style.borderBottomStyle = "solid";
208
+ style.borderBottomColor = this.textareaBorderColor;
209
+ }
210
+ // #ifdef APP-NVUE
211
+ // 由于textarea在安卓nvue上的差异性,需要额外再调整其内边距
212
+ if (os() === "android") {
213
+ style.paddingTop = "6px";
214
+ style.paddingLeft = "9px";
180
215
  style.paddingBottom = "3px";
181
216
  style.paddingRight = "6px";
182
217
  }
@@ -245,10 +280,10 @@ export default {
245
280
  </script>
246
281
 
247
282
  <style lang="scss" scoped>
248
- .u-textarea {
249
- border-radius: 4px;
250
- background-color: #fff;
251
- position: relative;
283
+ .u-textarea {
284
+ border-radius: 4px;
285
+ background-color: var(--up-card-bg-color, #fff);
286
+ position: relative;
252
287
  @include flex;
253
288
  flex: 1;
254
289
  padding: 9px;
@@ -261,25 +296,44 @@ export default {
261
296
  border-radius: 0;
262
297
  }
263
298
 
264
- &--disabled {
265
- background-color: #f5f7fa;
266
- }
299
+ &--disabled {
300
+ background-color: var(--up-bg-color, #f5f7fa);
301
+ }
267
302
 
268
- &__field {
269
- flex: 1;
270
- font-size: 15px;
271
- color: $u-content-color;
272
- width: 100%;
273
- }
303
+ &__field {
304
+ flex: 1;
305
+ font-size: 15px;
306
+ color: $u-content-color;
307
+ background-color: transparent;
308
+ border: none;
309
+ outline: none;
310
+ width: 100%;
311
+ /* #ifdef H5 */
312
+ :deep(.uni-textarea-wrapper),
313
+ :deep(.uni-textarea-textarea) {
314
+ background-color: transparent;
315
+ }
316
+
317
+ :deep(.uni-textarea-textarea) {
318
+ color: inherit;
319
+ border: none;
320
+ outline: none;
321
+ }
322
+
323
+ :deep(.uni-textarea-placeholder) {
324
+ color: var(--up-tips-color, #909193);
325
+ }
326
+ /* #endif */
327
+ }
274
328
 
275
- &__count {
329
+ &__count {
276
330
  position: absolute;
277
331
  right: 5px;
278
332
  bottom: 2px;
279
333
  font-size: 12px;
280
334
  color: $u-tips-color;
281
- background-color: #ffffff;
282
- padding: 1px 4px;
283
- }
284
- }
335
+ background-color: var(--up-card-bg-color, #ffffff);
336
+ padding: 1px 4px;
337
+ }
338
+ }
285
339
  </style>
@@ -40,11 +40,12 @@
40
40
  if (this.parent) {
41
41
  // 将父组件的相关参数,合并到本组件
42
42
  let style = {};
43
+ const borderColor = this.parent.resolvedBorderColor || this.parent.borderColor;
43
44
  if (this.width) style.flex = `0 0 ${this.width}`;
44
45
  style.textAlign = this.parent.align;
45
46
  style.padding = this.parent.padding;
46
- style.borderBottom = `solid 1px ${this.parent.borderColor}`;
47
- style.borderRight = `solid 1px ${this.parent.borderColor}`;
47
+ style.borderBottom = `solid 1px ${borderColor}`;
48
+ style.borderRight = `solid 1px ${borderColor}`;
48
49
  Object.assign(style, this.parent.thStyle);
49
50
  this.thStyle = style;
50
51
  }
@@ -59,8 +60,8 @@
59
60
  flex: 1;
60
61
  justify-content: center;
61
62
  font-size: 28rpx;
62
- color: $u-main-color;
63
+ color: var(--up-main-color, $u-main-color);
63
64
  font-weight: bold;
64
- background-color: rgb(245, 246, 248);
65
+ background-color: var(--up-table-head-bg-color, var(--up-bg-color, rgb(245, 246, 248)));
65
66
  }
66
67
  </style>
@@ -1,5 +1,6 @@
1
1
  <style scoped lang="scss">
2
2
  .u-title {
3
+ color: var(--up-main-color, #303133);
3
4
  .u-title-prefix {
4
5
  width: 4px;
5
6
  height: 18px;
@@ -205,20 +205,20 @@
205
205
  $u-toast-content-text-font-size:15px !default;
206
206
  $u-toast-up-icon:10rpx !default;
207
207
  $u-toast-u-type-primary-color:$u-primary !default;
208
- $u-toast-u-type-primary-background-color:#ecf5ff !default;
209
- $u-toast-u-type-primary-border-color:rgb(215, 234, 254) !default;
208
+ $u-toast-u-type-primary-background-color:$u-primary-light !default;
209
+ $u-toast-u-type-primary-border-color:$u-primary-disabled !default;
210
210
  $u-toast-u-type-primary-border-width:1px !default;
211
211
  $u-toast-u-type-success-color: $u-success !default;
212
- $u-toast-u-type-success-background-color: #dbf1e1 !default;
213
- $u-toast-u-type-success-border-color: #BEF5C8 !default;
212
+ $u-toast-u-type-success-background-color: $u-success-light !default;
213
+ $u-toast-u-type-success-border-color: $u-success-disabled !default;
214
214
  $u-toast-u-type-success-border-width: 1px !default;
215
215
  $u-toast-u-type-error-color:$u-error !default;
216
- $u-toast-u-type-error-background-color:#fef0f0 !default;
217
- $u-toast-u-type-error-border-color:#fde2e2 !default;
216
+ $u-toast-u-type-error-background-color:$u-error-light !default;
217
+ $u-toast-u-type-error-border-color:$u-error-disabled !default;
218
218
  $u-toast-u-type-error-border-width: 1px !default;
219
219
  $u-toast-u-type-warning-color:$u-warning !default;
220
- $u-toast-u-type-warning-background-color:#fdf6ec !default;
221
- $u-toast-u-type-warning-border-color:#faecd8 !default;
220
+ $u-toast-u-type-warning-background-color:$u-warning-light !default;
221
+ $u-toast-u-type-warning-border-color:$u-warning-disabled !default;
222
222
  $u-toast-u-type-warning-border-width: 1px !default;
223
223
  $u-toast-u-type-default-color:#fff !default;
224
224
  $u-toast-u-type-default-background-color:#585858 !default;