hy-app 0.3.16 → 0.4.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/components/hy-action-sheet/hy-action-sheet.vue +2 -2
- package/components/hy-action-sheet/typing.d.ts +32 -33
- package/components/hy-back-top/hy-back-top.vue +36 -32
- package/components/hy-button/hy-button.vue +7 -7
- package/components/hy-button/typing.d.ts +39 -40
- package/components/hy-calendar/index.scss +1 -1
- package/components/hy-card/hy-card.vue +3 -3
- package/components/hy-cell/hy-cell.vue +125 -118
- package/components/hy-cell/index.scss +7 -7
- package/components/hy-checkbox/hy-checkbox.vue +17 -16
- package/components/hy-checkbox/index.scss +1 -1
- package/components/hy-checkbox-item/hy-checkbox-item.vue +25 -30
- package/components/hy-checkbox-item/index.scss +1 -1
- package/components/hy-code-input/hy-code-input.vue +314 -314
- package/components/hy-code-input/index.scss +12 -12
- package/components/hy-count-down/index.scss +1 -1
- package/components/hy-datetime-picker/index.scss +1 -1
- package/components/hy-datetime-picker/typing.d.ts +0 -1
- package/components/hy-divider/index.scss +3 -3
- package/components/hy-dropdown-item/hy-dropdown-item.vue +2 -2
- package/components/hy-dropdown-item/index.scss +5 -5
- package/components/hy-float-button/hy-float-button.vue +1 -1
- package/components/hy-float-button/index.scss +9 -18
- package/components/hy-folding-panel/index.scss +1 -1
- package/components/hy-form-item/hy-form-item.vue +10 -11
- package/components/hy-grid/hy-grid.vue +23 -23
- package/components/hy-grid/index.scss +2 -8
- package/components/hy-icon/index.scss +8 -8
- package/components/hy-input/hy-input.vue +45 -45
- package/components/hy-input/index.scss +20 -15
- package/components/hy-line-progress/index.scss +3 -3
- package/components/hy-list/hy-list.vue +2 -2
- package/components/hy-list/index.scss +4 -4
- package/components/hy-loading/hy-loading.vue +2 -3
- package/components/hy-loading/index.scss +17 -15
- package/components/hy-menu/hy-menu.vue +26 -16
- package/components/hy-menu/index.scss +1 -1
- package/components/hy-menu/typing.d.ts +16 -12
- package/components/hy-modal/hy-modal.vue +11 -11
- package/components/hy-modal/index.scss +17 -17
- package/components/hy-modal/typing.d.ts +0 -2
- package/components/hy-navbar/hy-navbar.vue +3 -3
- package/components/hy-navbar/index.scss +10 -11
- package/components/hy-notice-bar/hy-column-notice.vue +2 -2
- package/components/hy-notice-bar/hy-row-notice.vue +3 -3
- package/components/hy-notice-bar/index.scss +9 -12
- package/components/hy-notify/hy-notify.vue +8 -5
- package/components/hy-notify/index.scss +2 -2
- package/components/hy-number-step/index.scss +9 -10
- package/components/hy-pagination/index.scss +7 -2
- package/components/hy-parse/index.scss +0 -9
- package/components/hy-picker/hy-picker.vue +1 -1
- package/components/hy-picker/index.scss +9 -16
- package/components/hy-popover/hy-popover.vue +6 -4
- package/components/hy-popup/hy-popup.vue +4 -2
- package/components/hy-popup/index.scss +45 -32
- package/components/hy-qrcode/hy-qrcode.vue +3 -3
- package/components/hy-qrcode/index.scss +18 -17
- package/components/hy-radio/hy-radio.vue +20 -18
- package/components/hy-radio/index.scss +26 -22
- package/components/hy-rate/hy-rate.vue +5 -5
- package/components/hy-rate/index.scss +4 -4
- package/components/hy-read-more/hy-read-more.vue +19 -20
- package/components/hy-read-more/index.scss +12 -6
- package/components/hy-scroll-list/hy-scroll-list.vue +3 -6
- package/components/hy-scroll-list/index.scss +4 -4
- package/components/hy-search/index.scss +9 -8
- package/components/hy-slider/hy-slider.vue +17 -11
- package/components/hy-slider/index.scss +12 -12
- package/components/hy-status-bar/index.scss +3 -1
- package/components/hy-steps/hy-steps.vue +50 -23
- package/components/hy-submit-bar/hy-submit-bar.vue +1 -1
- package/components/hy-submit-bar/index.scss +5 -4
- package/components/hy-subsection/hy-subsection.vue +3 -3
- package/components/hy-subsection/index.scss +7 -7
- package/components/hy-swipe-action/hy-swipe-action.vue +8 -8
- package/components/hy-swipe-action/index.scss +8 -4
- package/components/hy-swiper/hy-swiper-indicator.vue +2 -2
- package/components/hy-swiper/hy-swiper.vue +6 -6
- package/components/hy-swiper/index.scss +6 -10
- package/components/hy-switch/hy-switch.vue +4 -4
- package/components/hy-switch/index.scss +4 -22
- package/components/hy-tabs/hy-tabs.vue +16 -16
- package/components/hy-tabs/index.scss +16 -16
- package/components/hy-tag/index.scss +1 -1
- package/components/hy-text/index.scss +3 -3
- package/components/hy-textarea/hy-textarea.vue +11 -11
- package/components/hy-textarea/index.scss +11 -10
- package/components/hy-toast/hy-toast.vue +5 -5
- package/components/hy-toast/index.scss +8 -8
- package/components/hy-tooltip/hy-tooltip.vue +193 -183
- package/components/hy-tooltip/index.scss +69 -45
- package/components/hy-upload/hy-upload.vue +15 -10
- package/components/hy-upload/index.scss +37 -36
- package/components/hy-warn/hy-warn.vue +11 -11
- package/components/hy-warn/index.scss +76 -82
- package/components/hy-waterfall/index.scss +2 -1
- package/composables/usePopover.ts +2 -2
- package/libs/css/mixin.scss +0 -9
- package/package.json +2 -2
- package/utils/inside.ts +4 -1
- package/utils/utils.ts +187 -162
|
@@ -5,18 +5,21 @@
|
|
|
5
5
|
:style="[backgroundColor, customStyle]"
|
|
6
6
|
>
|
|
7
7
|
<hy-status-bar v-if="tmpConfig?.safeAreaInsetTop"></hy-status-bar>
|
|
8
|
-
<view class="hy-
|
|
9
|
-
<
|
|
8
|
+
<view class="hy-notify__wrapper">
|
|
9
|
+
<template
|
|
10
|
+
v-if="['success', 'warning', 'error'].includes(tmpConfig.type)"
|
|
11
|
+
>
|
|
12
|
+
<slot v-if="$slots.icon" name="icon"></slot>
|
|
10
13
|
<hy-icon
|
|
11
|
-
v-
|
|
14
|
+
v-else
|
|
12
15
|
:name="tmpConfig?.icon || icon"
|
|
13
16
|
:color="tmpConfig?.color"
|
|
14
17
|
:size="tmpConfig.fontSize"
|
|
15
18
|
:customStyle="{ marginRight: '4px' }"
|
|
16
19
|
></hy-icon>
|
|
17
|
-
</
|
|
20
|
+
</template>
|
|
18
21
|
<text
|
|
19
|
-
class="hy-
|
|
22
|
+
class="hy-notify__wrapper--text"
|
|
20
23
|
:style="{
|
|
21
24
|
fontSize: addUnit(tmpConfig?.fontSize),
|
|
22
25
|
color: tmpConfig?.color,
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
@include b(notify) {
|
|
6
6
|
padding: $hy-border-margin-padding-base;
|
|
7
7
|
|
|
8
|
-
@include
|
|
8
|
+
@include e(wrapper) {
|
|
9
9
|
@include flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
text-align: center;
|
|
12
12
|
justify-content: center;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
@include m(text) {
|
|
15
15
|
font-size: $hy-font-size-base;
|
|
16
16
|
text-align: center;
|
|
17
17
|
}
|
|
@@ -6,15 +6,13 @@
|
|
|
6
6
|
@include flex(row);
|
|
7
7
|
align-items: center;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
@include e(slot) {
|
|
10
10
|
/* #ifndef APP-NVUE */
|
|
11
11
|
touch-action: none;
|
|
12
12
|
/* #endif */
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
&__plus,
|
|
17
|
-
&__minus {
|
|
15
|
+
@include e(input, plus, minus) {
|
|
18
16
|
background-color: $hy-background--empty;
|
|
19
17
|
width: 35px;
|
|
20
18
|
@include flex;
|
|
@@ -24,27 +22,27 @@
|
|
|
24
22
|
touch-action: none;
|
|
25
23
|
/* #endif */
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
@include m(hover) {
|
|
28
26
|
background-color: $hy-background--hover;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
@include m(disabled) {
|
|
32
30
|
color: $hy-text-color--disabled;
|
|
33
31
|
background-color: $hy-background--disabled;
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
@include e(plus) {
|
|
38
36
|
border-top-right-radius: 4px;
|
|
39
37
|
border-bottom-right-radius: 4px;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
@include e(minus) {
|
|
43
41
|
border-top-left-radius: 4px;
|
|
44
42
|
border-bottom-left-radius: 4px;
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
@include e(input) {
|
|
48
46
|
position: relative;
|
|
49
47
|
text-align: center;
|
|
50
48
|
font-size: 15px;
|
|
@@ -53,8 +51,9 @@
|
|
|
53
51
|
@include flex;
|
|
54
52
|
align-items: center;
|
|
55
53
|
justify-content: center;
|
|
54
|
+
color: $hy-text-color;
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
@include m(disabled) {
|
|
58
57
|
color: $hy-text-color--disabled;
|
|
59
58
|
background-color: $hy-background--disabled;
|
|
60
59
|
}
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
padding: $hy-border-margin-padding-base;
|
|
17
17
|
}
|
|
18
|
+
|
|
18
19
|
@include e(message) {
|
|
19
20
|
text-align: center;
|
|
20
21
|
font-size: $hy-font-size-sm;
|
|
21
22
|
padding: 1px 0 16px 0;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
|
|
25
|
+
@include e(nav) {
|
|
24
26
|
min-width: 60px;
|
|
25
27
|
@include m(active){
|
|
26
28
|
color: rgba(0,0,0,0.65)
|
|
@@ -29,15 +31,18 @@
|
|
|
29
31
|
color: rgba(0,0,0,0.15)
|
|
30
32
|
}
|
|
31
33
|
}
|
|
34
|
+
|
|
32
35
|
@include e(size){
|
|
33
36
|
flex: 1;
|
|
34
37
|
text-align: center;
|
|
35
38
|
font-size: $hy-font-size-sm;
|
|
36
39
|
}
|
|
40
|
+
|
|
37
41
|
@include e(separator){
|
|
38
42
|
padding: 0 4px;
|
|
39
43
|
}
|
|
40
|
-
|
|
44
|
+
|
|
45
|
+
@include e(left) {
|
|
41
46
|
display: inline-block;
|
|
42
47
|
}
|
|
43
48
|
@include e(current){
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
@include e(title) {
|
|
21
21
|
@include flex();
|
|
22
22
|
justify-content: space-between;
|
|
23
23
|
padding: $hy-border-margin-padding-lg;
|
|
24
|
-
|
|
24
|
+
@include m(center) {
|
|
25
25
|
font-size: $hy-font-size-base;
|
|
26
26
|
color: $hy-text-color--grey;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
@include m(right) {
|
|
30
30
|
color: $hy-primary;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@include m(view) {
|
|
35
|
-
|
|
35
|
+
@include e(column) {
|
|
36
36
|
@include flex;
|
|
37
37
|
flex: 1;
|
|
38
38
|
justify-content: center;
|
|
@@ -41,17 +41,10 @@
|
|
|
41
41
|
background: $hy-background--hover;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
font-size: 16px;
|
|
49
|
-
text-align: center;
|
|
50
|
-
/* #ifndef APP-NVUE */
|
|
51
|
-
display: block;
|
|
52
|
-
/* #endif */
|
|
53
|
-
|
|
54
|
-
&--disabled {
|
|
44
|
+
@include e(item) {
|
|
45
|
+
color: $hy-text-color;
|
|
46
|
+
@include lineEllipsis;
|
|
47
|
+
@include m(disabled) {
|
|
55
48
|
/* #ifndef APP-NVUE */
|
|
56
49
|
cursor: not-allowed;
|
|
57
50
|
/* #endif */
|
|
@@ -60,7 +53,7 @@
|
|
|
60
53
|
}
|
|
61
54
|
}
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
@include edeep(mask) {
|
|
64
57
|
background-image: none;
|
|
65
58
|
}
|
|
66
59
|
}
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
</view>
|
|
35
35
|
</view>
|
|
36
36
|
</view>
|
|
37
|
+
|
|
37
38
|
<hy-transition
|
|
38
39
|
custom-class="hy-popover__pos"
|
|
39
40
|
:custom-style="popover.popStyle.value"
|
|
40
41
|
:show="showPopover"
|
|
41
|
-
name="fade"
|
|
42
42
|
:duration="200"
|
|
43
43
|
>
|
|
44
44
|
<view class="hy-popover__container">
|
|
@@ -195,6 +195,7 @@ const emit = defineEmits<IPopoverEmits>();
|
|
|
195
195
|
const slots = useSlots();
|
|
196
196
|
const queue = inject<Queue | null>(queueKey, null);
|
|
197
197
|
const selector: string = "popover";
|
|
198
|
+
const visibleArrow = ref<boolean>(true);
|
|
198
199
|
const { proxy } = getCurrentInstance() as any;
|
|
199
200
|
const popover = usePopover();
|
|
200
201
|
const showPopover = ref<boolean>(false); // 控制popover显隐
|
|
@@ -213,7 +214,7 @@ watch(
|
|
|
213
214
|
watch(
|
|
214
215
|
() => props.placement,
|
|
215
216
|
(newVal) => {
|
|
216
|
-
popover.init(newVal,
|
|
217
|
+
popover.init(newVal, visibleArrow.value, selector);
|
|
217
218
|
},
|
|
218
219
|
);
|
|
219
220
|
|
|
@@ -229,7 +230,6 @@ watch(
|
|
|
229
230
|
(newValue) => {
|
|
230
231
|
if (newValue) {
|
|
231
232
|
popover.control(props.placement, props.offset);
|
|
232
|
-
// provide/inject在微信小程序不能使用,所以执行两个保存方法
|
|
233
233
|
if (queue && queue.closeOther) {
|
|
234
234
|
queue.closeOther(proxy);
|
|
235
235
|
} else {
|
|
@@ -245,7 +245,9 @@ watch(
|
|
|
245
245
|
);
|
|
246
246
|
|
|
247
247
|
onMounted(() => {
|
|
248
|
-
|
|
248
|
+
setTimeout(() => {
|
|
249
|
+
popover.init(props.placement, visibleArrow.value, selector);
|
|
250
|
+
}, 2000);
|
|
249
251
|
});
|
|
250
252
|
|
|
251
253
|
onBeforeMount(() => {
|
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
<view
|
|
25
25
|
v-if="closeable"
|
|
26
26
|
@tap.stop="close"
|
|
27
|
-
class="
|
|
28
|
-
|
|
27
|
+
:class="[
|
|
28
|
+
'hy-popup__content__close',
|
|
29
|
+
'hy-popup__content__close--' + closeIconPos,
|
|
30
|
+
]"
|
|
29
31
|
hover-class="hy-popup__content__close--hover"
|
|
30
32
|
hover-stay-time="150"
|
|
31
33
|
>
|
|
@@ -5,56 +5,69 @@
|
|
|
5
5
|
@include b(popup) {
|
|
6
6
|
flex: 1;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
@include e(content) {
|
|
9
9
|
background-color: $hy-background--container;
|
|
10
10
|
position: relative;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
|
|
14
|
-
}
|
|
12
|
+
@include m(round) {
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
&-top {
|
|
15
|
+
border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
|
|
16
|
+
}
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
&-left {
|
|
19
|
+
border-radius: 0 $hy-border-radius-lg $hy-border-radius-lg 0;
|
|
20
|
+
}
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
&-right {
|
|
23
|
+
border-radius: $hy-border-radius-lg 0 0 $hy-border-radius-lg;
|
|
24
|
+
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
&-bottom {
|
|
27
|
+
border-radius: $hy-border-radius-lg $hy-border-radius-lg 0 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-center {
|
|
31
|
+
border-radius: $hy-border-radius-lg;
|
|
32
|
+
}
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
@include e(close) {
|
|
33
36
|
position: absolute;
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
@include m(hover) {
|
|
36
39
|
opacity: 0.4;
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
top: $hy-border-margin-padding-lg;
|
|
42
|
-
left: $hy-border-margin-padding-lg;
|
|
43
|
-
}
|
|
43
|
+
@include e(close) {
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
top: $hy-border-margin-padding-lg;
|
|
47
|
-
right: $hy-border-margin-padding-lg;
|
|
48
|
-
}
|
|
45
|
+
@include m(top) {
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
&-left {
|
|
48
|
+
top: $hy-border-margin-padding-lg;
|
|
49
|
+
left: $hy-border-margin-padding-lg;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-right {
|
|
53
|
+
top: $hy-border-margin-padding-lg;
|
|
54
|
+
right: $hy-border-margin-padding-lg;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
@include m(bottom) {
|
|
59
|
+
|
|
60
|
+
&-left {
|
|
61
|
+
bottom: $hy-border-margin-padding-lg;
|
|
62
|
+
left: $hy-border-margin-padding-lg;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-right {
|
|
66
|
+
right: $hy-border-margin-padding-lg;
|
|
67
|
+
bottom: $hy-border-margin-padding-lg;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
54
70
|
|
|
55
|
-
&__close--bottom-right {
|
|
56
|
-
right: $hy-border-margin-padding-lg;
|
|
57
|
-
bottom: $hy-border-margin-padding-lg;
|
|
58
71
|
}
|
|
59
72
|
}
|
|
60
73
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<view class="hy-qrcode__content" @click="preview">
|
|
4
4
|
<!-- #ifndef APP-NVUE -->
|
|
5
5
|
<canvas
|
|
6
|
-
class="hy-
|
|
6
|
+
class="hy-qrcode__content--canvas"
|
|
7
7
|
:id="cid"
|
|
8
8
|
:canvas-id="cid"
|
|
9
9
|
:style="{ width: addUnit(size), height: addUnit(size) }"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<!-- #endif -->
|
|
12
12
|
<view
|
|
13
13
|
v-if="showLoading && loading"
|
|
14
|
-
class="hy-
|
|
14
|
+
class="hy-qrcode__content--loading"
|
|
15
15
|
:style="{ width: addUnit(size), height: addUnit(size) }"
|
|
16
16
|
>
|
|
17
17
|
<HyLoading></HyLoading>
|
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<script setup lang="ts">
|
|
35
|
-
import { getCurrentInstance,
|
|
35
|
+
import { getCurrentInstance, ref, onMounted } from "vue";
|
|
36
36
|
import type { IQrcodeEmits } from "./typing";
|
|
37
37
|
import QRCode from "./qrcode.js";
|
|
38
38
|
import { addUnit, error } from "../../utils";
|
|
@@ -2,25 +2,26 @@
|
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
4
|
@include b(qrcode) {
|
|
5
|
-
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
background-color: $hy-background;
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
left: 0;
|
|
14
|
-
right: 0;
|
|
15
|
-
}
|
|
16
|
-
&__content {
|
|
5
|
+
@include e(content) {
|
|
17
6
|
position: relative;
|
|
18
7
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
//@include m(canvas) {
|
|
9
|
+
// position: fixed;
|
|
10
|
+
// top: -99999rpx;
|
|
11
|
+
// left: -99999rpx;
|
|
12
|
+
// z-index: -99999;
|
|
13
|
+
//}
|
|
14
|
+
|
|
15
|
+
@include m(loading) {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
background-color: $hy-background;
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
right: 0;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@tap.stop="wrapperClickHandler($event, item)"
|
|
7
7
|
:style="radioStyle"
|
|
8
8
|
:class="[
|
|
9
|
-
`hy-
|
|
9
|
+
`hy-radio__label--${iconPlacement}`,
|
|
10
10
|
borderBottom && placement === 'column' && 'hy-border__bottom',
|
|
11
11
|
]"
|
|
12
12
|
>
|
|
@@ -16,32 +16,36 @@
|
|
|
16
16
|
:class="iconClasses(item)"
|
|
17
17
|
:style="iconWrapStyle(item)"
|
|
18
18
|
>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
<template v-if="item[fieldNames.checked]">
|
|
20
|
+
<slot
|
|
21
|
+
v-if="$slots.icon"
|
|
22
|
+
name="icon"
|
|
23
|
+
:iconColor="iconColor"
|
|
24
|
+
:iconSize="addUnit(sizeType[size] || iconSize)"
|
|
25
|
+
>
|
|
26
|
+
</slot>
|
|
24
27
|
<HyIcon
|
|
28
|
+
v-else
|
|
25
29
|
class="hy-radio__icon-wrap__icon"
|
|
26
30
|
:name="IconConfig.CHECK_MASK"
|
|
27
|
-
:size="addUnit(sizeType[size]
|
|
31
|
+
:size="addUnit(sizeType[size] || iconSize)"
|
|
28
32
|
:color="iconColorCom(item.checked)"
|
|
29
33
|
/>
|
|
30
|
-
</
|
|
34
|
+
</template>
|
|
31
35
|
</view>
|
|
32
36
|
<view
|
|
33
|
-
class="hy-radio__label
|
|
37
|
+
class="hy-radio__label--wrap cursor-pointer"
|
|
34
38
|
@tap.stop="labelClickHandler($event, item)"
|
|
35
39
|
>
|
|
36
40
|
<slot name="label" :record="item">
|
|
37
41
|
<text
|
|
38
42
|
:class="[
|
|
39
43
|
'hy-radio__text',
|
|
40
|
-
disabled && 'hy-radio__label
|
|
44
|
+
disabled && 'hy-radio__label--wrap--disabled',
|
|
41
45
|
]"
|
|
42
46
|
:style="{
|
|
43
47
|
color: labelColor,
|
|
44
|
-
fontSize: addUnit(sizeType[size]
|
|
48
|
+
fontSize: addUnit(sizeType[size] || labelSize),
|
|
45
49
|
}"
|
|
46
50
|
>
|
|
47
51
|
{{ item[fieldNames.label] }}
|
|
@@ -179,7 +183,7 @@ const columns_1 = ref<CheckboxColumnsVo[]>();
|
|
|
179
183
|
const sizeType: AnyObject = reactive({
|
|
180
184
|
small: 14,
|
|
181
185
|
medium: 18,
|
|
182
|
-
large:
|
|
186
|
+
large: 24,
|
|
183
187
|
});
|
|
184
188
|
|
|
185
189
|
watch(
|
|
@@ -220,7 +224,7 @@ const radioStyle = computed(() => {
|
|
|
220
224
|
const style: CSSProperties = {};
|
|
221
225
|
if (props.borderBottom && props.placement === "row") {
|
|
222
226
|
error(
|
|
223
|
-
"检测到您将borderBottom设置为true,需要同时将
|
|
227
|
+
"检测到您将borderBottom设置为true,需要同时将hy-checkbox-group的placement设置为column才有效",
|
|
224
228
|
);
|
|
225
229
|
}
|
|
226
230
|
// 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
|
|
@@ -264,15 +268,13 @@ const iconWrapStyle = computed(() => {
|
|
|
264
268
|
style.backgroundColor =
|
|
265
269
|
temp[props.fieldNames.checked] && !isDisabled(temp?.disabled)
|
|
266
270
|
? props.activeColor
|
|
267
|
-
:
|
|
268
|
-
? "#ffffff"
|
|
269
|
-
: "";
|
|
271
|
+
: "";
|
|
270
272
|
style.borderColor =
|
|
271
273
|
temp[props.fieldNames.checked] && !isDisabled(temp?.disabled)
|
|
272
274
|
? props.activeColor
|
|
273
275
|
: props.inactiveColor;
|
|
274
|
-
style.width = addUnit(sizeType[props.size]
|
|
275
|
-
style.height = addUnit(sizeType[props.size]
|
|
276
|
+
style.width = addUnit(sizeType[props.size] || props.size);
|
|
277
|
+
style.height = addUnit(sizeType[props.size] || props.size);
|
|
276
278
|
return style;
|
|
277
279
|
};
|
|
278
280
|
});
|
|
@@ -24,16 +24,34 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
@include e(label) {
|
|
28
|
+
|
|
29
|
+
@include m(left) {
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@include m(right) {
|
|
34
|
+
flex-direction: row-reverse;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include m(wrap) {
|
|
39
|
+
/* #ifndef APP-NVUE */
|
|
40
|
+
word-wrap: break-word;
|
|
41
|
+
/* #endif */
|
|
42
|
+
|
|
43
|
+
color: $hy-text-color;
|
|
44
|
+
font-size: $hy-font-size-base;
|
|
45
|
+
margin-right: $hy-border-margin-padding-sm;
|
|
46
|
+
|
|
47
|
+
@include m(disabled) {
|
|
48
|
+
color: $hy-text-color--disabled;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
30
51
|
|
|
31
|
-
&-label--right {
|
|
32
|
-
flex-direction: row-reverse;
|
|
33
|
-
justify-content: space-between;
|
|
34
52
|
}
|
|
35
53
|
|
|
36
|
-
|
|
54
|
+
@include e(icon-wrap) {
|
|
37
55
|
/* #ifndef APP-NVUE */
|
|
38
56
|
box-sizing: border-box;
|
|
39
57
|
// nvue下,border-color过渡有问题
|
|
@@ -50,7 +68,7 @@
|
|
|
50
68
|
|
|
51
69
|
/* #ifdef MP-TOUTIAO */
|
|
52
70
|
// 头条小程序兼容性问题,需要设置行高为0,否则图标偏下
|
|
53
|
-
|
|
71
|
+
@include e(icon) {
|
|
54
72
|
line-height: 0;
|
|
55
73
|
}
|
|
56
74
|
|
|
@@ -86,18 +104,4 @@
|
|
|
86
104
|
}
|
|
87
105
|
}
|
|
88
106
|
}
|
|
89
|
-
|
|
90
|
-
&__label-wrap {
|
|
91
|
-
/* #ifndef APP-NVUE */
|
|
92
|
-
word-wrap: break-word;
|
|
93
|
-
/* #endif */
|
|
94
|
-
|
|
95
|
-
color: $hy-text-color;
|
|
96
|
-
font-size: $hy-font-size-base;
|
|
97
|
-
margin-right: $hy-border-margin-padding-sm;
|
|
98
|
-
|
|
99
|
-
@include m(disabled) {
|
|
100
|
-
color: $hy-text-color--disabled;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
107
|
}
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
@touchend.stop="touchEnd"
|
|
7
7
|
>
|
|
8
8
|
<view
|
|
9
|
-
class="hy-
|
|
9
|
+
class="hy-rate__content--item cursor-pointer"
|
|
10
10
|
v-for="(item, index) in Number(count)"
|
|
11
11
|
:key="index"
|
|
12
12
|
:class="[elClass]"
|
|
13
13
|
>
|
|
14
14
|
<view
|
|
15
|
-
class="hy-
|
|
16
|
-
ref="hy-
|
|
15
|
+
class="hy-rate__content--item__icon-wrap"
|
|
16
|
+
ref="hy-rate__content--item__icon-wrap"
|
|
17
17
|
@tap.stop="clickHandler($event)"
|
|
18
18
|
>
|
|
19
19
|
<HyIcon
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
<view
|
|
35
35
|
v-if="allowHalf"
|
|
36
36
|
@tap.stop="clickHandler($event)"
|
|
37
|
-
class="hy-
|
|
37
|
+
class="hy-rate__content--item__icon-wrap hy-rate__content--item__icon-wrap--half"
|
|
38
38
|
:style="[
|
|
39
39
|
{
|
|
40
40
|
width: addUnit(rateWidth / 2),
|
|
41
41
|
},
|
|
42
42
|
]"
|
|
43
|
-
ref="hy-
|
|
43
|
+
ref="hy-rate__content--item__icon-wrap"
|
|
44
44
|
>
|
|
45
45
|
<HyIcon
|
|
46
46
|
:name="Math.ceil(activeIndex) > index ? activeIcon : inactiveIcon"
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
touch-action: none;
|
|
10
10
|
/* #endif */
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
@include e(content) {
|
|
13
13
|
@include flex;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
@include m(item) {
|
|
16
16
|
position: relative;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
@include e(icon-wrap) {
|
|
19
|
+
@include m(half) {
|
|
20
20
|
position: absolute;
|
|
21
21
|
overflow: hidden;
|
|
22
22
|
top: 0;
|