oxy-uni-ui 2.0.0 → 2.1.1
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/attributes.json +1 -1
- package/components/common/abstracts/variable.scss +449 -271
- package/components/common/util.ts +25 -0
- package/components/composables/useDynamicVirtualScroll.ts +80 -0
- package/components/composables/useVirtualScroll.ts +40 -14
- package/components/oxy-action-sheet/index.scss +8 -8
- package/components/oxy-backtop/index.scss +3 -3
- package/components/oxy-badge/index.scss +2 -2
- package/components/oxy-button/index.scss +5 -8
- package/components/oxy-calendar/index.scss +10 -10
- package/components/oxy-calendar/oxy-calendar.vue +3 -3
- package/components/oxy-calendar-view/monthPanel/index.scss +4 -5
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +72 -37
- package/components/oxy-calendar-view/monthPanel/types.ts +43 -1
- package/components/oxy-calendar-view/types.ts +1 -1
- package/components/oxy-calendar-view/utils.ts +12 -1
- package/components/oxy-calendar-view/year/index.scss +1 -1
- package/components/oxy-calendar-view/yearPanel/index.scss +3 -3
- package/components/oxy-calendar-view/yearPanel/types.ts +36 -2
- package/components/oxy-calendar-view/yearPanel/year-panel.vue +64 -45
- package/components/oxy-card/index.scss +4 -4
- package/components/oxy-cell/index.scss +2 -2
- package/components/oxy-cell-group/index.scss +2 -2
- package/components/oxy-checkbox/index.scss +75 -220
- package/components/oxy-checkbox-group/index.scss +2 -2
- package/components/oxy-col-picker/index.scss +3 -3
- package/components/oxy-collapse/index.scss +1 -1
- package/components/oxy-collapse-item/index.scss +2 -2
- package/components/oxy-corner/index.scss +4 -4
- package/components/oxy-count-to/oxy-count-to.vue +3 -3
- package/components/oxy-count-to/types.ts +1 -1
- package/components/oxy-date-strip-item/index.scss +4 -4
- package/components/oxy-datetime-picker/index.scss +5 -5
- package/components/oxy-datetime-picker/types.ts +1 -1
- package/components/oxy-datetime-picker-view/types.ts +2 -2
- package/components/oxy-drop-menu/index.scss +3 -3
- package/components/oxy-drop-menu-item/index.scss +2 -2
- package/components/oxy-fab/index.scss +1 -5
- package/components/oxy-file-list/index.scss +22 -22
- package/components/oxy-footer/index.scss +2 -2
- package/components/oxy-footer/oxy-footer.vue +2 -3
- package/components/oxy-form-item/index.scss +0 -5
- package/components/oxy-grid/oxy-grid.vue +1 -1
- package/components/oxy-grid-item/index.scss +1 -1
- package/components/oxy-guidance/index.scss +15 -15
- package/components/oxy-img/index.scss +2 -2
- package/components/oxy-img-cropper/index.scss +14 -16
- package/components/oxy-img-lazy/index.scss +0 -1
- package/components/oxy-index-anchor/index.scss +5 -5
- package/components/oxy-index-bar/index.scss +3 -3
- package/components/oxy-input/index.scss +2 -2
- package/components/oxy-input-number/index.scss +21 -3
- package/components/oxy-input-number/oxy-input-number.vue +9 -1
- package/components/oxy-keyboard/index.scss +3 -3
- package/components/oxy-link/index.scss +11 -10
- package/components/oxy-loading/index.scss +1 -1
- package/components/oxy-loadmore/index.scss +1 -1
- package/components/oxy-long-press-menu/index.scss +2 -2
- package/components/oxy-message-box/index.scss +10 -10
- package/components/oxy-message-box/oxy-message-box.vue +4 -5
- package/components/oxy-message-box/types.ts +0 -5
- package/components/oxy-navbar/index.scss +1 -1
- package/components/oxy-navbar/oxy-navbar.vue +2 -3
- package/components/oxy-pagination/index.scss +5 -4
- package/components/oxy-password-input/index.scss +4 -4
- package/components/oxy-picker/index.scss +14 -14
- package/components/oxy-picker/types.ts +1 -1
- package/components/oxy-picker-view/index.scss +2 -2
- package/components/oxy-picker-view/oxy-picker-view.vue +8 -5
- package/components/oxy-picker-view/types.ts +2 -2
- package/components/oxy-popover/index.scss +8 -8
- package/components/oxy-popup/index.scss +4 -4
- package/components/oxy-progress/index.scss +3 -3
- package/components/oxy-radio/index.scss +26 -16
- package/components/oxy-radio-group/index.scss +2 -3
- package/components/oxy-rich-text/index.scss +20 -24
- package/components/oxy-rich-text/mp-html/card/card.vue +3 -3
- package/components/oxy-rich-text/mp-html/mp-html.d.ts +2 -0
- package/components/oxy-rich-text/mp-html/mp-html.vue +6 -5
- package/components/oxy-rich-text/mp-html/node/node.vue +25 -2
- package/components/oxy-rich-text/mp-html/parser.js +6 -6
- package/components/oxy-rich-text/oxy-rich-text.vue +31 -8
- package/components/oxy-search/index.scss +6 -6
- package/components/oxy-segmented/index.scss +14 -15
- package/components/oxy-select/index.scss +117 -69
- package/components/oxy-select/oxy-select.vue +24 -11
- package/components/oxy-select-picker/index.scss +2 -2
- package/components/oxy-sidebar-item/index.scss +22 -13
- package/components/oxy-skeleton/index.scss +1 -1
- package/components/oxy-slider/index.scss +8 -9
- package/components/oxy-sort-button/index.scss +3 -5
- package/components/oxy-splitter/index.scss +19 -0
- package/components/oxy-splitter/oxy-splitter.vue +409 -0
- package/components/oxy-splitter/types.ts +75 -0
- package/components/oxy-splitter-panel/index.scss +366 -0
- package/components/oxy-splitter-panel/oxy-splitter-panel.vue +432 -0
- package/components/oxy-splitter-panel/types.ts +63 -0
- package/components/oxy-step/index.scss +13 -13
- package/components/oxy-stream-render/oxy-stream-render.vue +230 -4
- package/components/oxy-swiper-nav/index.scss +5 -5
- package/components/oxy-switch/index.scss +5 -5
- package/components/oxy-tab/index.scss +8 -2
- package/components/oxy-tabbar/index.scss +5 -5
- package/components/oxy-tabbar/oxy-tabbar.vue +3 -3
- package/components/oxy-table/index.scss +5 -6
- package/components/oxy-table-col/index.scss +4 -5
- package/components/oxy-tabs/index.scss +16 -14
- package/components/oxy-tag/index.scss +111 -36
- package/components/oxy-text/index.scss +1 -1
- package/components/oxy-textarea/index.scss +3 -7
- package/components/oxy-toast/index.scss +1 -1
- package/components/oxy-tooltip/index.scss +1 -1
- package/components/oxy-tree/index.scss +35 -15
- package/components/oxy-tree/oxy-tree.vue +113 -2
- package/components/oxy-tree/types.ts +1 -0
- package/components/oxy-upload/index.scss +20 -20
- package/components/oxy-video-preview/index.scss +3 -3
- package/components/oxy-virtual-scroll/index.scss +2 -2
- package/components/oxy-voice-player/index.scss +104 -75
- package/components/oxy-watermark/index.scss +1 -1
- package/global.d.ts +2 -0
- package/package.json +1 -1
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
align-items: center;
|
|
20
20
|
width: 100%;
|
|
21
21
|
height: 100%;
|
|
22
|
-
border:
|
|
23
|
-
border-radius:
|
|
22
|
+
border: #{$-border-width-base} solid $-color-border;
|
|
23
|
+
border-radius: $-file-list-card-radius;
|
|
24
24
|
position: relative;
|
|
25
25
|
}
|
|
26
26
|
@include e(picture) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
display: block;
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 100%;
|
|
31
|
-
border-radius:
|
|
31
|
+
border-radius: $-file-list-card-radius;
|
|
32
32
|
}
|
|
33
33
|
@include e(icon) {
|
|
34
34
|
width: 64rpx;
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
@include e(name) {
|
|
38
38
|
display: block;
|
|
39
39
|
width: 100%;
|
|
40
|
-
font-size: $-
|
|
41
|
-
color: $-
|
|
42
|
-
padding: 0
|
|
40
|
+
font-size: $-file-list-file-name-fs;
|
|
41
|
+
color: $-file-list-file-name-color;
|
|
42
|
+
padding: 0 12rpx;
|
|
43
43
|
text-align: center;
|
|
44
|
-
margin-top:
|
|
44
|
+
margin-top: 20rpx;
|
|
45
45
|
white-space: nowrap;
|
|
46
46
|
overflow: hidden;
|
|
47
47
|
text-overflow: ellipsis;
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
margin: 0;
|
|
60
60
|
.oxy-file-list__list--item {
|
|
61
61
|
width: 100%;
|
|
62
|
-
background:
|
|
63
|
-
padding:
|
|
64
|
-
border-radius:
|
|
62
|
+
background: $-file-list-bg;
|
|
63
|
+
padding: 20rpx 24rpx;
|
|
64
|
+
border-radius: $-file-list-list-item-radius;
|
|
65
65
|
display: flex;
|
|
66
66
|
flex-direction: row;
|
|
67
67
|
align-items: center;
|
|
68
68
|
.oxy-file-list__icon {
|
|
69
69
|
width: 48rpx;
|
|
70
70
|
height: 48rpx;
|
|
71
|
-
margin-right:
|
|
71
|
+
margin-right: 20rpx;
|
|
72
72
|
}
|
|
73
73
|
.oxy-file-list__name {
|
|
74
74
|
flex: 1;
|
|
@@ -77,27 +77,27 @@
|
|
|
77
77
|
padding: 0;
|
|
78
78
|
}
|
|
79
79
|
.oxy-file-list__download {
|
|
80
|
-
font-size:
|
|
81
|
-
color: $-
|
|
80
|
+
font-size: $-file-list-action-icon-size;
|
|
81
|
+
color: $-file-list-action-icon-color;
|
|
82
82
|
}
|
|
83
83
|
.oxy-file-list__delete {
|
|
84
|
-
font-size:
|
|
85
|
-
color: $-
|
|
86
|
-
margin-left:
|
|
84
|
+
font-size: $-file-list-action-icon-size;
|
|
85
|
+
color: $-file-list-action-icon-color;
|
|
86
|
+
margin-left: $-spacing-24;
|
|
87
87
|
}
|
|
88
88
|
& + .oxy-file-list__list--item {
|
|
89
|
-
margin-top:
|
|
89
|
+
margin-top: 20rpx;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.oxy-file-list__download-btn {
|
|
95
95
|
position: absolute;
|
|
96
|
-
top:
|
|
97
|
-
right:
|
|
98
|
-
background:
|
|
99
|
-
border-radius:
|
|
100
|
-
padding:
|
|
96
|
+
top: 16rpx;
|
|
97
|
+
right: 16rpx;
|
|
98
|
+
background: $-file-list-download-bg;
|
|
99
|
+
border-radius: $-file-list-card-radius;
|
|
100
|
+
padding: 12rpx 16rpx;
|
|
101
101
|
display: flex;
|
|
102
102
|
}
|
|
103
103
|
.oxy-file-list__download {
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
22
|
import { getCurrentInstance, nextTick, onMounted, ref, computed, watch } from 'vue'
|
|
23
23
|
import { footerProps } from './types'
|
|
24
|
-
import { withDefaultUnit } from '../common/util'
|
|
24
|
+
import { convertPxToRpx, withDefaultUnit } from '../common/util'
|
|
25
25
|
import NodeInfo = UniNamespace.NodeInfo
|
|
26
26
|
|
|
27
27
|
const props = defineProps(footerProps)
|
|
@@ -41,8 +41,7 @@ const contentStyle = computed(() => {
|
|
|
41
41
|
|
|
42
42
|
// 设置内容高度(rpx 语义)
|
|
43
43
|
function setHeight(val: number) {
|
|
44
|
-
const
|
|
45
|
-
const heightInRpx = pxPer100Rpx ? (val / pxPer100Rpx) * 100 : val * 2
|
|
44
|
+
const heightInRpx = convertPxToRpx(val)
|
|
46
45
|
placeholderHeight.value = `${heightInRpx}rpx`
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -73,7 +73,7 @@ watch(
|
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
const rootStyle = computed(() => {
|
|
76
|
-
return `${props.gutter ? 'padding-left:' + props.gutter
|
|
76
|
+
return `${props.gutter ? 'padding-left:' + props.gutter + 'rpx;' + 'padding-bottom:' + props.gutter + 'rpx;' : ''}${props.customStyle}`
|
|
77
77
|
})
|
|
78
78
|
|
|
79
79
|
const handleChildrenChange = debounce(() => {
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
box-sizing: content-box;
|
|
14
14
|
height: 100%;
|
|
15
15
|
width: 100%;
|
|
16
|
-
border: 1px dashed
|
|
17
|
-
border-radius:
|
|
16
|
+
border: 1px dashed $-guide-highlight-border-color;
|
|
17
|
+
border-radius: $-guide-highlight-radius;
|
|
18
18
|
position: absolute;
|
|
19
19
|
top: -8rpx;
|
|
20
20
|
left: -8rpx;
|
|
21
|
-
padding:
|
|
21
|
+
padding: 8rpx;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@include e(arrow) {
|
|
25
25
|
height: 20rpx;
|
|
26
26
|
width: 20rpx;
|
|
27
|
-
background:
|
|
27
|
+
background: $-guide-tip-bg;
|
|
28
28
|
position: absolute;
|
|
29
29
|
top: 144rpx;
|
|
30
30
|
left: 45%;
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
|
|
35
35
|
@include e(tips) {
|
|
36
36
|
width: 400rpx;
|
|
37
|
-
box-shadow:
|
|
38
|
-
color:
|
|
37
|
+
box-shadow: $-guide-tip-shadow;
|
|
38
|
+
color: $-guide-tip-color;
|
|
39
39
|
position: absolute;
|
|
40
40
|
top: 152rpx;
|
|
41
41
|
z-index: 10001;
|
|
42
|
-
padding:
|
|
43
|
-
font-size:
|
|
44
|
-
border-radius:
|
|
42
|
+
padding: 16rpx 20rpx;
|
|
43
|
+
font-size: $-fs-content;
|
|
44
|
+
border-radius: $-guide-tip-radius;
|
|
45
45
|
text-align: justify;
|
|
46
46
|
|
|
47
47
|
@include e(tool-btn) {
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
margin-top: 20rpx;
|
|
53
53
|
|
|
54
54
|
@include e(next) {
|
|
55
|
-
background:
|
|
56
|
-
height:
|
|
55
|
+
background: $-guide-tip-action-bg;
|
|
56
|
+
height: $-size-48;
|
|
57
57
|
width: 100rpx;
|
|
58
58
|
text-align: center;
|
|
59
|
-
border-radius:
|
|
60
|
-
color:
|
|
61
|
-
line-height:
|
|
62
|
-
font-size:
|
|
59
|
+
border-radius: $-guide-tip-action-radius;
|
|
60
|
+
color: $-guide-tip-action-color;
|
|
61
|
+
line-height: $-lh-base;
|
|
62
|
+
font-size: $-fs-secondary;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@import "./../common/abstracts/variable.scss";
|
|
3
3
|
|
|
4
4
|
@include b(img-cropper) {
|
|
5
|
-
background:
|
|
5
|
+
background: $-img-cropper-bg;
|
|
6
6
|
position: fixed;
|
|
7
7
|
top: 0;
|
|
8
8
|
left: 0;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// 裁剪框包裹器
|
|
14
14
|
@include e(wrapper) {
|
|
15
15
|
position: relative;
|
|
16
|
-
background:
|
|
16
|
+
background: $-img-cropper-wrapper-bg;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@include e(cut) {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
.oxy-img-cropper__cut--left,
|
|
31
31
|
.oxy-img-cropper__cut--right {
|
|
32
32
|
// 拖动中背景蒙层为0 拖动结束为0.85
|
|
33
|
-
background-color:
|
|
33
|
+
background-color: $-img-cropper-mask-bg;
|
|
34
34
|
transition: background 0.2s;
|
|
35
35
|
|
|
36
36
|
@include when(hightlight) {
|
|
37
|
-
background-color:
|
|
37
|
+
background-color: transparent;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
// 节选框的窗体最外部边缘线
|
|
56
56
|
&::before {
|
|
57
57
|
content: "";
|
|
58
|
-
border: 1px solid
|
|
58
|
+
border: 1px solid $-img-cropper-border-color;
|
|
59
59
|
width: calc(200% - 1px);
|
|
60
60
|
height: calc(200% - 1px);
|
|
61
61
|
position: absolute;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
position: absolute;
|
|
78
78
|
width: $border-size;
|
|
79
79
|
height: 40rpx;
|
|
80
|
-
background-color:
|
|
80
|
+
background-color: $-img-cropper-border-color;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&::after {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
position: absolute;
|
|
86
86
|
width: 40rpx;
|
|
87
87
|
height: $border-size;
|
|
88
|
-
background-color:
|
|
88
|
+
background-color: $-img-cropper-border-color;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
display: inline-block;
|
|
145
145
|
width: 66.66%;
|
|
146
146
|
height: 200%;
|
|
147
|
-
border: 1px solid
|
|
147
|
+
border: 1px solid $-img-cropper-border-color;
|
|
148
148
|
border-top: none;
|
|
149
149
|
border-bottom: none;
|
|
150
150
|
transform: scale(0.5) translate(0, -50%);
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
display: inline-block;
|
|
162
162
|
width: 200%;
|
|
163
163
|
height: 66.66%;
|
|
164
|
-
border: 1px solid
|
|
164
|
+
border: 1px solid $-img-cropper-border-color;
|
|
165
165
|
border-left: none;
|
|
166
166
|
border-right: none;
|
|
167
167
|
transform: scale(0.5) translate(-50%, 0);
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
|
|
184
184
|
@include e(canvas) {
|
|
185
185
|
position: fixed;
|
|
186
|
-
background:
|
|
186
|
+
background: $-img-cropper-canvas-bg;
|
|
187
187
|
width: 300rpx;
|
|
188
188
|
height: 300rpx;
|
|
189
189
|
z-index: 10;
|
|
@@ -204,22 +204,20 @@
|
|
|
204
204
|
text-align: left;
|
|
205
205
|
margin: 0 40rpx;
|
|
206
206
|
padding-top: 4vh;
|
|
207
|
-
// line-height: 32px;
|
|
208
207
|
box-sizing: border-box;
|
|
209
208
|
|
|
210
209
|
.is-cancel {
|
|
211
210
|
display: inline-block;
|
|
212
|
-
color:
|
|
213
|
-
font-size:
|
|
211
|
+
color: $-img-cropper-icon-color;
|
|
212
|
+
font-size: $-img-cropper-action-fs;
|
|
214
213
|
}
|
|
215
214
|
|
|
216
215
|
.is-confirm {
|
|
217
216
|
position: absolute;
|
|
218
217
|
right: 0;
|
|
219
|
-
// height: 32px;
|
|
220
218
|
width: 112rpx;
|
|
221
|
-
border-radius:
|
|
222
|
-
font-size:
|
|
219
|
+
border-radius: $-img-cropper-action-radius;
|
|
220
|
+
font-size: $-img-cropper-action-fs;
|
|
223
221
|
}
|
|
224
222
|
}
|
|
225
223
|
}
|
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
|
|
11
11
|
// #ifdef MP-DINGTALK
|
|
12
12
|
@include b(index-anchor-ding) {
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
@include when(sticky){
|
|
15
15
|
position: sticky;
|
|
16
16
|
top: 0;
|
|
17
17
|
left: 0;
|
|
18
|
-
z-index:
|
|
18
|
+
z-index: $-z-index-sticky;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
// #endif
|
|
22
22
|
|
|
23
23
|
@include b(index-anchor) {
|
|
24
24
|
background-color: $-color-gray-2;
|
|
25
|
-
padding:
|
|
26
|
-
font-size:
|
|
25
|
+
padding: 24rpx;
|
|
26
|
+
font-size: $-fs-content;
|
|
27
27
|
color: $-color-title;
|
|
28
28
|
|
|
29
29
|
@include when(sticky){
|
|
30
30
|
position: sticky;
|
|
31
31
|
top: 0;
|
|
32
32
|
left: 0;
|
|
33
|
-
z-index:
|
|
33
|
+
z-index: $-z-index-sticky;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
@include e(sidebar) {
|
|
23
23
|
position: absolute;
|
|
24
24
|
top: 50%;
|
|
25
|
-
right:
|
|
25
|
+
right: 12rpx;
|
|
26
26
|
transform: translateY(-50%);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@include e(index) {
|
|
30
|
-
font-size:
|
|
30
|
+
font-size: $-index-bar-index-font-size;
|
|
31
31
|
font-weight: $-fw-medium;
|
|
32
32
|
color: $-color-title;
|
|
33
|
-
padding:
|
|
33
|
+
padding: 12rpx 16rpx;
|
|
34
34
|
|
|
35
35
|
@include when(active) {
|
|
36
36
|
color: $-color-theme;
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
height: 1px;
|
|
81
81
|
background: $-input-border-color;
|
|
82
82
|
transform: scaleY(0.5);
|
|
83
|
-
transition: background-color
|
|
83
|
+
transition: background-color $-transition-duration-base ease-in-out;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
@include when(not-empty) {
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
@include e(count) {
|
|
304
|
-
margin-left:
|
|
304
|
+
margin-left: $-spacing-32;
|
|
305
305
|
font-size: $-input-count-fs;
|
|
306
306
|
color: $-input-count-color;
|
|
307
307
|
vertical-align: middle;
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@include b(input-number) {
|
|
30
|
-
display: inline-
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
31
32
|
user-select: none;
|
|
32
|
-
line-height: 1.15;
|
|
33
33
|
|
|
34
34
|
@include e(action) {
|
|
35
35
|
position: relative;
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
border-top-right-radius: calc($-input-number-radius * 2);
|
|
62
62
|
border-bottom-right-radius: calc($-input-number-radius * 2);
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
&:not(.is-disabled):active {
|
|
66
|
+
background-color: $-color-bg;
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
@include when(disabled) {
|
|
65
70
|
color: $-input-number-disabled-color;
|
|
66
71
|
}
|
|
@@ -105,7 +110,10 @@
|
|
|
105
110
|
|
|
106
111
|
@include edeep(action-icon) {
|
|
107
112
|
position: absolute;
|
|
108
|
-
display:
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
line-height: 1;
|
|
109
117
|
font-size: $-input-number-icon-size;
|
|
110
118
|
width: $-input-number-icon-size;
|
|
111
119
|
height: $-input-number-icon-size;
|
|
@@ -114,6 +122,16 @@
|
|
|
114
122
|
transform: translate(-50%, -50%);
|
|
115
123
|
}
|
|
116
124
|
|
|
125
|
+
@include when(focus) {
|
|
126
|
+
.oxy-input-number__action::after {
|
|
127
|
+
border-color: $-color-theme;
|
|
128
|
+
}
|
|
129
|
+
.oxy-input-number__input-border {
|
|
130
|
+
border-top-color: $-color-theme;
|
|
131
|
+
border-bottom-color: $-color-theme;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
@include when(disabled) {
|
|
118
136
|
.oxy-input-number__input {
|
|
119
137
|
color: $-input-number-disabled-color;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
:class="`oxy-input-number ${customClass} ${disabled ? 'is-disabled' : ''} ${withoutInput ? 'is-without-input' : ''} ${
|
|
4
|
+
isFocused ? 'is-focus' : ''
|
|
5
|
+
}`"
|
|
6
|
+
:style="customStyle"
|
|
7
|
+
>
|
|
3
8
|
<!-- 减号按钮 -->
|
|
4
9
|
<view
|
|
5
10
|
:class="`oxy-input-number__action ${minDisabled || disableMinus ? 'is-disabled' : ''}`"
|
|
@@ -76,6 +81,7 @@ const emit = defineEmits<{
|
|
|
76
81
|
(e: 'update:modelValue', value: number | string): void
|
|
77
82
|
}>()
|
|
78
83
|
const inputValue = ref<string | number>(getInitValue())
|
|
84
|
+
const isFocused = ref(false)
|
|
79
85
|
let longPressTimer: ReturnType<typeof setTimeout> | null = null
|
|
80
86
|
|
|
81
87
|
/**
|
|
@@ -414,6 +420,7 @@ function handleInput(event: any) {
|
|
|
414
420
|
* 处理失焦事件
|
|
415
421
|
*/
|
|
416
422
|
function handleBlur(event: any) {
|
|
423
|
+
isFocused.value = false
|
|
417
424
|
const val = event.detail.value || ''
|
|
418
425
|
updateValue(val)
|
|
419
426
|
emit('blur', { value: val })
|
|
@@ -423,6 +430,7 @@ function handleBlur(event: any) {
|
|
|
423
430
|
* 处理聚焦事件
|
|
424
431
|
*/
|
|
425
432
|
function handleFocus(event: any) {
|
|
433
|
+
isFocused.value = true
|
|
426
434
|
emit('focus', event.detail)
|
|
427
435
|
}
|
|
428
436
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
user-select: none;
|
|
19
19
|
|
|
20
20
|
@include m(with-title) {
|
|
21
|
-
border-radius:
|
|
21
|
+
border-radius: $-keyboard-panel-radius $-keyboard-panel-radius 0 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@include e(header) {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
flex-wrap: wrap;
|
|
69
69
|
|
|
70
70
|
.oxy-key-wrapper {
|
|
71
|
-
--oxy-keyboard-key-font-size:
|
|
71
|
+
--oxy-keyboard-key-font-size: #{$-keyboard-car-key-font-size};
|
|
72
72
|
flex-basis: 10%;
|
|
73
73
|
|
|
74
74
|
@include m(wider) {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
background-color: transparent;
|
|
91
91
|
border: none;
|
|
92
92
|
@include m(hover) {
|
|
93
|
-
opacity:
|
|
93
|
+
opacity: $-opacity-disabled;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
@include b(link) {
|
|
5
5
|
display: inline-block;
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
@include m(medium) {
|
|
7
8
|
font-size: $-link-font-size-medium;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
@include
|
|
11
|
+
@include m(small) {
|
|
11
12
|
font-size: $-link-font-size-small;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
@include
|
|
15
|
+
@include m(large) {
|
|
15
16
|
font-size: $-link-font-size-large;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -44,14 +45,14 @@
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
@include when(disabled) {
|
|
47
|
-
opacity:
|
|
48
|
+
opacity: $-opacity-disabled;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
.#{$B}__prefix-icon:not(:empty) + .#{$B}__content:not(:empty) {
|
|
52
|
+
padding-left: 8rpx;
|
|
53
|
+
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
.#{$B}__content:not(:empty) + .#{$B}__suffix-icon:not(:empty) {
|
|
56
|
+
padding-left: 8rpx;
|
|
57
|
+
}
|
|
57
58
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
width: 100%;
|
|
17
17
|
|
|
18
18
|
@include when(active) {
|
|
19
|
-
background-color:
|
|
19
|
+
background-color: $-long-press-menu-active-bg; /* 长按时的高亮背景 */
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
top: 24rpx;
|
|
56
56
|
bottom: 24rpx;
|
|
57
57
|
width: 1px;
|
|
58
|
-
background-color:
|
|
58
|
+
background-color: $-long-press-menu-divider-color;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
padding: $-message-box-padding;
|
|
40
40
|
|
|
41
41
|
@include when(no-title) {
|
|
42
|
-
padding:
|
|
42
|
+
padding: 56rpx 48rpx 0rpx;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
text-align: center;
|
|
48
48
|
font-size: $-message-box-title-fs;
|
|
49
49
|
color: $-message-box-title-color;
|
|
50
|
-
line-height:
|
|
51
|
-
font-weight:
|
|
52
|
-
padding-top:
|
|
53
|
-
padding-bottom:
|
|
50
|
+
line-height: $-lh-base;
|
|
51
|
+
font-weight: $-fw-medium;
|
|
52
|
+
padding-top: $-spacing-16;
|
|
53
|
+
padding-bottom: $-spacing-24;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
@include e(content) {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
font-size: $-message-box-content-fs;
|
|
60
60
|
text-align: center;
|
|
61
61
|
overflow: auto;
|
|
62
|
-
line-height:
|
|
62
|
+
line-height: $-lh-base;
|
|
63
63
|
|
|
64
64
|
&::-webkit-scrollbar {
|
|
65
65
|
width: $-message-box-content-scrollbar-width;
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
@include e(input-error) {
|
|
76
|
-
min-height:
|
|
77
|
-
margin-top:
|
|
76
|
+
min-height: 40rpx;
|
|
77
|
+
margin-top: 8rpx;
|
|
78
78
|
color: $-message-box-input-error-color;
|
|
79
79
|
text-align: left;
|
|
80
80
|
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
@include edeep(actions-btn) {
|
|
91
91
|
&:not(:last-child) {
|
|
92
|
-
margin-right:
|
|
92
|
+
margin-right: $-spacing-32;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -104,6 +104,6 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
@include e(cancel) {
|
|
107
|
-
margin-right:
|
|
107
|
+
margin-right: $-spacing-32;
|
|
108
108
|
}
|
|
109
109
|
}
|