uview-plus 3.7.36 → 3.8.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/changelog.md +2047 -1782
- package/components/u-action-sheet/u-action-sheet.vue +54 -16
- package/components/u-agreement/u-agreement.vue +2 -1
- package/components/u-alert/u-alert.vue +8 -10
- package/components/u-button/u-button.vue +35 -5
- package/components/u-calendar/calendar.js +1 -0
- package/components/u-calendar/header.vue +98 -9
- package/components/u-calendar/month.vue +10 -7
- package/components/u-calendar/props.js +5 -0
- package/components/u-calendar/u-calendar.vue +109 -2
- package/components/u-car-keyboard/u-car-keyboard.vue +7 -7
- package/components/u-card/u-card.vue +6 -6
- package/components/u-cascader/u-cascader.vue +32 -12
- package/components/u-cate-tab/u-cate-tab.vue +49 -48
- package/components/u-cell/u-cell.vue +24 -4
- package/components/u-cell-group/u-cell-group.vue +10 -3
- package/components/u-checkbox/u-checkbox.vue +6 -6
- package/components/u-choose/u-choose.vue +9 -4
- package/components/u-city-locate/u-city-locate.vue +28 -22
- package/components/u-color-picker/u-color-picker.vue +15 -15
- package/components/u-cropper/u-cropper.vue +409 -387
- package/components/u-datetime-picker/u-datetime-picker.vue +79 -10
- package/components/u-dragsort/u-dragsort.vue +3 -0
- package/components/u-dropdown/u-dropdown.vue +15 -2
- package/components/u-dropdown-item/u-dropdown-item.vue +3 -3
- package/components/u-form-item/u-form-item.vue +6 -1
- package/components/u-gap/u-gap.vue +5 -1
- package/components/u-goods-sku/u-goods-sku.vue +16 -15
- package/components/u-index-anchor/u-index-anchor.vue +13 -2
- package/components/u-index-list/u-index-list.vue +18 -5
- package/components/u-input/input.js +3 -3
- package/components/u-input/u-input.vue +27 -5
- package/components/u-keyboard/u-keyboard.vue +11 -6
- package/components/u-loading-page/loadingPage.js +1 -1
- package/components/u-loading-page/u-loading-page.vue +18 -12
- package/components/u-navbar/navbar.js +2 -3
- package/components/u-navbar/theme-vars.scss +21 -0
- package/components/u-navbar/u-navbar.vue +30 -6
- package/components/u-notice-bar/theme-vars.scss +25 -0
- package/components/u-notice-bar/u-notice-bar.vue +24 -5
- package/components/u-number-box/numberBox.js +4 -4
- package/components/u-number-box/u-number-box.vue +27 -13
- package/components/u-number-keyboard/u-number-keyboard.vue +6 -6
- package/components/u-picker/picker.js +43 -43
- package/components/u-picker/u-picker.vue +14 -2
- package/components/u-popup/popup.js +1 -1
- package/components/u-popup/u-popup.vue +14 -6
- package/components/u-poster/u-poster.vue +12 -10
- package/components/u-pull-refresh/u-pull-refresh.vue +6 -6
- package/components/u-qrcode/qrcode.js +35 -29
- package/components/u-qrcode/u-qrcode.vue +17 -12
- package/components/u-radio/u-radio.vue +6 -6
- package/components/u-rate/rate.js +2 -2
- package/components/u-rate/u-rate.vue +98 -21
- package/components/u-search/search.js +3 -3
- package/components/u-search/u-search.vue +29 -6
- package/components/u-select/u-select.vue +141 -73
- package/components/u-signature/u-signature.vue +35 -16
- package/components/u-skeleton/u-skeleton.vue +7 -2
- package/components/u-slider/u-slider.vue +30 -31
- package/components/u-steps-item/u-steps-item.vue +20 -17
- package/components/u-subsection/theme-vars.scss +41 -0
- package/components/u-subsection/u-subsection.vue +69 -16
- package/components/u-swipe-action-item/u-swipe-action-item.vue +11 -5
- package/components/u-switch/theme-vars.scss +41 -0
- package/components/u-switch/u-switch.vue +44 -15
- package/components/u-tabbar/u-tabbar.vue +5 -5
- package/components/u-tabbar-item/u-tabbar-item.vue +16 -5
- package/components/u-table/u-table.vue +18 -3
- package/components/u-table2/tableRow.vue +43 -41
- package/components/u-table2/u-table2.vue +56 -50
- package/components/u-tabs/u-tabs.vue +14 -1
- package/components/u-tag/theme-vars.scss +21 -0
- package/components/u-tag/u-tag.vue +17 -7
- package/components/u-td/u-td.vue +5 -3
- package/components/u-text/text.js +1 -1
- package/components/u-text/u-text.vue +15 -13
- package/components/u-textarea/props.js +2 -2
- package/components/u-textarea/textarea.js +1 -1
- package/components/u-textarea/u-textarea.vue +115 -61
- package/components/u-th/u-th.vue +5 -4
- package/components/u-title/u-title.vue +1 -0
- package/components/u-toast/u-toast.vue +13 -9
- package/components/u-tooltip/u-tooltip.vue +1 -0
- package/components/u-tree/u-tree.vue +491 -51
- package/components/u-upload/u-upload.vue +34 -6
- package/index.js +178 -27
- package/index.scss +5 -1
- package/libs/config/color.js +1 -2
- package/libs/config/config.js +2 -0
- package/libs/config/props.js +1 -1
- package/libs/css/theme-vars-core.scss +201 -0
- package/libs/css/theme-vars.scss +1 -0
- package/libs/function/index.js +7 -7
- package/libs/mixin/mixin.js +111 -4
- package/libs/root/index.js +151 -0
- package/libs/root/nvue-root.vue +72 -0
- package/libs/root/page.js +269 -0
- package/libs/root/root-toast-host.vue +31 -0
- package/libs/root/root.js +44 -0
- package/libs/root/runtime.js +11 -0
- package/libs/root/utils.js +115 -0
- package/libs/theme/runtime.js +392 -0
- package/libs/theme/theme.js +682 -0
- package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
- package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
- package/libs/util/gcanvas/context-webgl/Program.js +0 -0
- package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
- package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
- package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
- package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
- package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
- package/libs/util/gcanvas/env/canvas.js +0 -0
- package/libs/util/gcanvas/env/image.js +0 -0
- package/libs/util/gcanvas/env/tool.js +0 -0
- package/libs/util/gcanvas/index.js +0 -0
- package/package.json +3 -2
- package/theme.scss +113 -32
- package/types/comps/qrcode.d.ts +6 -0
- package/types/index.d.ts +47 -2
|
@@ -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: '
|
|
23
|
+
bgColor: '',
|
|
25
24
|
titleWidth: '400rpx',
|
|
26
25
|
height: '44px',
|
|
27
26
|
leftIconSize: 20,
|
|
28
|
-
leftIconColor:
|
|
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 :
|
|
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:
|
|
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="
|
|
34
|
+
:color="navbarLeftIconColor"
|
|
35
35
|
></up-icon>
|
|
36
36
|
<text
|
|
37
37
|
v-if="leftText"
|
|
38
38
|
:style="{
|
|
39
|
-
color:
|
|
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:
|
|
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:
|
|
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:
|
|
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="
|
|
12
|
-
: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="
|
|
28
|
-
: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: '
|
|
27
|
+
color: '',
|
|
28
28
|
buttonWidth: 30,
|
|
29
29
|
buttonSize: 30,
|
|
30
30
|
buttonRadius: '0px',
|
|
31
|
-
bgColor: '
|
|
32
|
-
disabledBgColor: '
|
|
33
|
-
inputBgColor: '
|
|
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') ?
|
|
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') ?
|
|
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.
|
|
195
|
+
backgroundColor: this.resolvedBgColor,
|
|
181
196
|
width: addUnit(this.buttonWidth),
|
|
182
197
|
height: addUnit(this.buttonSize),
|
|
183
|
-
color: this.
|
|
198
|
+
color: this.resolvedColor,
|
|
184
199
|
borderRadius: this.buttonRadius
|
|
185
200
|
}
|
|
186
201
|
if (this.isDisabled(type)) {
|
|
187
|
-
style.backgroundColor = this.
|
|
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.
|
|
197
|
-
backgroundColor: this.
|
|
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
|
|
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
|
|
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: '
|
|
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="
|
|
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:
|
|
486
|
+
background-color: var(--up-card-bg-color, #ffffff);
|
|
475
487
|
z-index: 1000;
|
|
476
488
|
}
|
|
477
489
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
@touchcancel="onTouchEnd"
|
|
46
46
|
>
|
|
47
47
|
<!-- iOS风格的横条指示器 -->
|
|
48
|
-
<view class="u-popup__content__indicator"></view>
|
|
48
|
+
<view class="u-popup__content__indicator" :style="indicatorStyle"></view>
|
|
49
49
|
</view>
|
|
50
50
|
<slot></slot>
|
|
51
51
|
<view
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
>
|
|
59
59
|
<up-icon
|
|
60
60
|
name="close"
|
|
61
|
-
color="
|
|
61
|
+
:color="closeIconColor"
|
|
62
62
|
size="18"
|
|
63
63
|
bold
|
|
64
64
|
></up-icon>
|
|
@@ -195,8 +195,8 @@
|
|
|
195
195
|
if (this.mode !== 'center') {
|
|
196
196
|
style.flex = 1
|
|
197
197
|
}
|
|
198
|
-
//
|
|
199
|
-
style.backgroundColor = this.bgColor
|
|
198
|
+
// 背景色,留空时跟随主题卡片背景
|
|
199
|
+
style.backgroundColor = this.bgColor || this.upThemeVar('--up-card-bg-color', this.upThemeIsDark ? '#1c1c1e' : '#ffffff')
|
|
200
200
|
if(this.round) {
|
|
201
201
|
const value = addUnit(this.round)
|
|
202
202
|
if(this.mode === 'top') {
|
|
@@ -212,6 +212,14 @@
|
|
|
212
212
|
|
|
213
213
|
return deepMerge(style, addStyle(this.customStyle))
|
|
214
214
|
},
|
|
215
|
+
closeIconColor() {
|
|
216
|
+
return this.upThemeVar('--up-content-color', '#606266')
|
|
217
|
+
},
|
|
218
|
+
indicatorStyle() {
|
|
219
|
+
return {
|
|
220
|
+
backgroundColor: this.upThemeVar('--up-light-color', '#c0c4cc')
|
|
221
|
+
}
|
|
222
|
+
},
|
|
215
223
|
position() {
|
|
216
224
|
if (this.mode === 'center') {
|
|
217
225
|
return this.zoom ? 'fade-zoom' : 'fade'
|
|
@@ -413,7 +421,7 @@
|
|
|
413
421
|
width: 100px;
|
|
414
422
|
height: 5px;
|
|
415
423
|
border-radius: 100px;
|
|
416
|
-
background-color: #c0c4cc;
|
|
424
|
+
background-color: var(--up-light-color, #c0c4cc);
|
|
417
425
|
}
|
|
418
426
|
|
|
419
427
|
&__close {
|
|
@@ -445,4 +453,4 @@
|
|
|
445
453
|
}
|
|
446
454
|
}
|
|
447
455
|
}
|
|
448
|
-
</style>
|
|
456
|
+
</style>
|
|
@@ -359,6 +359,14 @@ export default {
|
|
|
359
359
|
const lineHeight = css.lineHeight ? this.convertRpxToPx(css.lineHeight) : 20;
|
|
360
360
|
const lines = [];
|
|
361
361
|
let currentLine = '';
|
|
362
|
+
const ellipsis = '...';
|
|
363
|
+
const appendEllipsis = (line) => {
|
|
364
|
+
let fitLine = line;
|
|
365
|
+
while (ctx.measureText(fitLine + ellipsis).width > maxWidth && fitLine.length > 0) {
|
|
366
|
+
fitLine = fitLine.substring(0, fitLine.length - 1);
|
|
367
|
+
}
|
|
368
|
+
return fitLine + ellipsis;
|
|
369
|
+
};
|
|
362
370
|
|
|
363
371
|
for (let i = 0; i < text.length; i++) {
|
|
364
372
|
const char = text[i];
|
|
@@ -367,20 +375,14 @@ export default {
|
|
|
367
375
|
|
|
368
376
|
if (metrics.width > maxWidth && currentLine !== '') {
|
|
369
377
|
lines.push(currentLine);
|
|
370
|
-
currentLine = char;
|
|
371
378
|
|
|
372
379
|
// 如果已达最大行数,添加省略号并结束
|
|
373
380
|
if (lines.length === lineClamp) {
|
|
374
|
-
|
|
375
|
-
// 添加省略号
|
|
376
|
-
let fitLine = currentLine.substring(0, currentLine.length - 1);
|
|
377
|
-
while (ctx.measureText(fitLine + '...').width > maxWidth && fitLine.length > 0) {
|
|
378
|
-
fitLine = fitLine.substring(0, fitLine.length - 1);
|
|
379
|
-
}
|
|
380
|
-
lines[lines.length - 1] = fitLine + '...';
|
|
381
|
-
}
|
|
381
|
+
lines[lines.length - 1] = appendEllipsis(currentLine);
|
|
382
382
|
break;
|
|
383
383
|
}
|
|
384
|
+
|
|
385
|
+
currentLine = char;
|
|
384
386
|
} else {
|
|
385
387
|
currentLine = testLine;
|
|
386
388
|
}
|
|
@@ -626,4 +628,4 @@ export default {
|
|
|
626
628
|
}
|
|
627
629
|
}
|
|
628
630
|
}
|
|
629
|
-
</style>
|
|
631
|
+
</style>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<!-- 默认下拉状态 -->
|
|
23
23
|
<view class="refresh-content">
|
|
24
24
|
<view class="refresh-indicator">
|
|
25
|
-
<up-icon name="arrow-downward" size="26px"></up-icon>
|
|
25
|
+
<up-icon name="arrow-downward" size="26px" color="var(--up-content-color, #606266)"></up-icon>
|
|
26
26
|
</view>
|
|
27
27
|
<text class="refresh-text">{{ t("up.pullRefresh.pull") }}</text>
|
|
28
28
|
</view>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<!-- 默认释放状态 -->
|
|
38
38
|
<view class="refresh-content">
|
|
39
39
|
<view class="refresh-indicator">
|
|
40
|
-
<up-icon name="arrow-upward" size="26px"></up-icon>
|
|
40
|
+
<up-icon name="arrow-upward" size="26px" color="var(--up-content-color, #606266)"></up-icon>
|
|
41
41
|
</view>
|
|
42
42
|
<text class="refresh-text">{{ t("up.pullRefresh.release") }}</text>
|
|
43
43
|
</view>
|
|
@@ -316,8 +316,8 @@ export default {
|
|
|
316
316
|
.spinner {
|
|
317
317
|
width: 16px;
|
|
318
318
|
height: 16px;
|
|
319
|
-
border: 2px solid #f3f3f3;
|
|
320
|
-
border-top: 2px solid #666;
|
|
319
|
+
border: 2px solid var(--up-border-color, #f3f3f3);
|
|
320
|
+
border-top: 2px solid var(--up-content-color, #666);
|
|
321
321
|
border-radius: 50%;
|
|
322
322
|
animation: spin 1s linear infinite;
|
|
323
323
|
}
|
|
@@ -329,6 +329,6 @@ export default {
|
|
|
329
329
|
|
|
330
330
|
.refresh-text {
|
|
331
331
|
font-size: 14px;
|
|
332
|
-
color: #
|
|
332
|
+
color: var(--up-main-color, #303133);
|
|
333
333
|
}
|
|
334
|
-
</style>
|
|
334
|
+
</style>
|