hy-app 0.3.15 → 0.4.0
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-group/hy-checkbox-group.vue +6 -4
- package/components/hy-checkbox-item/hy-checkbox-item.vue +56 -44
- package/components/hy-checkbox-item/index.scss +1 -1
- package/components/hy-checkbox-item/typing.d.ts +3 -2
- 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/hy-form.vue +2 -7
- package/components/hy-form-item/hy-form-item.vue +203 -201
- package/components/hy-form-item/typing.d.ts +20 -14
- 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 -44
- package/components/hy-input/index.scss +12 -11
- 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 +38 -30
- 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 +5 -5
- 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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
|
|
9
9
|
/* 标题 */
|
|
10
|
-
|
|
10
|
+
@include e(title) {
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
justify-content: center;
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/* 内容 */
|
|
23
|
-
|
|
23
|
+
@include e(content) {
|
|
24
24
|
padding: 20px;
|
|
25
25
|
@include flex;
|
|
26
26
|
justify-content: center;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
@include m(text) {
|
|
29
29
|
font-size: $hy-font-size-sm;
|
|
30
30
|
color: $hy-text-color--grey;
|
|
31
31
|
flex: 1;
|
|
@@ -34,32 +34,32 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/* 底部按钮 */
|
|
37
|
-
|
|
37
|
+
@include e(button) {
|
|
38
38
|
/* 两个按钮的样式 */
|
|
39
|
-
|
|
40
|
-
.
|
|
39
|
+
@include m(exact) {
|
|
40
|
+
.first {
|
|
41
41
|
margin-right: $hy-border-margin-padding-lg;
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
.
|
|
43
|
+
@include m(reverse) {
|
|
44
|
+
.last {
|
|
45
45
|
margin-right: $hy-border-margin-padding-lg;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
@include m(group) {
|
|
52
52
|
@include flex;
|
|
53
53
|
padding: 20px;
|
|
54
54
|
|
|
55
55
|
/* 自定义底部按钮 */
|
|
56
|
-
|
|
56
|
+
@include e(confirm-button) {
|
|
57
57
|
flex-direction: column;
|
|
58
58
|
padding: 0 25px 15px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
@include e(wrapper) {
|
|
63
63
|
flex: 1;
|
|
64
64
|
@include flex;
|
|
65
65
|
justify-content: center;
|
|
@@ -68,28 +68,28 @@
|
|
|
68
68
|
border-radius: $hy-border-radius-semicircle;
|
|
69
69
|
|
|
70
70
|
/* 确认 */
|
|
71
|
-
|
|
71
|
+
@include m(confirm) {
|
|
72
72
|
background-color: $hy-primary;
|
|
73
|
-
|
|
73
|
+
@include e(text) {
|
|
74
74
|
color: #FFFFFF;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/* 取消 */
|
|
79
|
-
|
|
79
|
+
@include m(cancel) {
|
|
80
80
|
//background-color: $hy-background--empty;
|
|
81
81
|
background-color: $hy-background--empty;
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
@include e(text) {
|
|
84
84
|
color: $hy-text-color;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
@include m(hover) {
|
|
89
89
|
opacity: 0.7;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
@include m(text) {
|
|
93
93
|
font-size: 16px;
|
|
94
94
|
text-align: center;
|
|
95
95
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
height: addUnit(getPx(height) + statusBarHeight),
|
|
8
8
|
}"
|
|
9
9
|
></view>
|
|
10
|
-
<view :class="[fixed && 'hy-
|
|
10
|
+
<view :class="[fixed && 'hy-navbar__fixed']">
|
|
11
11
|
<HyStatusBar v-if="safeAreaInsetTop" :bgColor="bgColor"></HyStatusBar>
|
|
12
12
|
<view
|
|
13
13
|
:class="[border && 'hy-border__bottom', 'hy-navbar__content']"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
:style="{
|
|
35
35
|
color: leftIconColor,
|
|
36
36
|
}"
|
|
37
|
-
class="hy-
|
|
37
|
+
class="hy-navbar__content__left--text"
|
|
38
38
|
>
|
|
39
39
|
{{ leftText }}
|
|
40
40
|
</text>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
>
|
|
76
76
|
<slot name="right">
|
|
77
77
|
<HyIcon v-if="rightIcon" :name="rightIcon" size="20"></HyIcon>
|
|
78
|
-
<text v-if="rightText" class="hy-
|
|
78
|
+
<text v-if="rightText" class="hy-navbar__content__right--text">{{
|
|
79
79
|
rightText
|
|
80
80
|
}}</text>
|
|
81
81
|
</slot>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
z-index: 11;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
@include e(content) {
|
|
15
15
|
@include flex(row);
|
|
16
16
|
align-items: center;
|
|
17
17
|
height: 44px;
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
position: relative;
|
|
20
20
|
justify-content: center;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
&__right {
|
|
22
|
+
@include e(left, right) {
|
|
24
23
|
padding: 0 13px;
|
|
25
24
|
position: absolute;
|
|
26
25
|
top: 0;
|
|
@@ -29,36 +28,36 @@
|
|
|
29
28
|
align-items: center;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
@include e(left){
|
|
33
32
|
left: 0;
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
@include m(hover) {
|
|
36
35
|
opacity: 0.7;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
@include m(text) {
|
|
40
39
|
font-size: 15px;
|
|
41
40
|
margin-left: 3px;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
@include e(center) {
|
|
46
45
|
display: flex;
|
|
47
46
|
flex-direction: column;
|
|
48
47
|
text-align: center;
|
|
49
|
-
|
|
48
|
+
@include m(title) {
|
|
50
49
|
font-size: $hy-font-size-base;
|
|
51
50
|
}
|
|
52
|
-
|
|
51
|
+
@include m(sub) {
|
|
53
52
|
font-size: $hy-font-size-sm;
|
|
54
53
|
color: $hy-text-color--grey;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
@include e(right) {
|
|
59
58
|
right: 0;
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
@include m(text) {
|
|
62
61
|
font-size: 15px;
|
|
63
62
|
margin-left: 3px;
|
|
64
63
|
}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
<swiper-item
|
|
19
19
|
v-for="(item, index) in text"
|
|
20
20
|
:key="index"
|
|
21
|
-
class="hy-
|
|
21
|
+
class="hy-notice__swiper--item"
|
|
22
22
|
:style="{ justifyContent: justifyContent }"
|
|
23
23
|
>
|
|
24
|
-
<text class="hy-
|
|
24
|
+
<text class="hy-notice__swiper--item__text" :style="[textStyle]">{{
|
|
25
25
|
item
|
|
26
26
|
}}</text>
|
|
27
27
|
</swiper-item>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
</slot>
|
|
8
8
|
<view class="hy-notice__content" ref="hy-notice__content">
|
|
9
9
|
<view
|
|
10
|
-
ref="hy-
|
|
11
|
-
class="hy-
|
|
10
|
+
ref="hy-notice__content--text"
|
|
11
|
+
class="hy-notice__content--text"
|
|
12
12
|
:style="animationStyle"
|
|
13
13
|
>
|
|
14
14
|
<text
|
|
@@ -74,7 +74,7 @@ watch(
|
|
|
74
74
|
// 进行一定的延时
|
|
75
75
|
await sleep();
|
|
76
76
|
// 查询盒子和文字的宽度
|
|
77
|
-
textWidth = (await getRect(".hy-
|
|
77
|
+
textWidth = (await getRect(".hy-notice__content--text", false, instance))
|
|
78
78
|
.width;
|
|
79
79
|
boxWidth = (await getRect(".hy-notice__content", false, instance)).width;
|
|
80
80
|
// 根据t=s/v(时间=路程/速度),这里为何不需要加上#u-notice-box的宽度,因为中设置了.u-notice-content样式中设置了padding-left: 100%
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
border-radius: $hy-border-radius-sm;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
@include e(left-icon) {
|
|
20
20
|
align-items: center;
|
|
21
21
|
margin-right: 5px;
|
|
22
22
|
:deep(.hy-icon) {
|
|
@@ -24,25 +24,22 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
@include e(right-icon) {
|
|
28
|
+
margin-left: 5px;
|
|
29
|
+
align-items: center;
|
|
28
30
|
:deep(.hy-icon) {
|
|
29
31
|
color: $hy-warning;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
margin-left: 5px;
|
|
35
|
-
align-items: center;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__content {
|
|
35
|
+
@include e(content) {
|
|
39
36
|
text-align: right;
|
|
40
37
|
flex: 1;
|
|
41
38
|
@include flex;
|
|
42
39
|
flex-wrap: nowrap;
|
|
43
40
|
overflow: hidden;
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
@include m(text) {
|
|
46
43
|
font-size: 14px;
|
|
47
44
|
color: $hy-warning;
|
|
48
45
|
/* #ifndef APP-NVUE */
|
|
@@ -57,18 +54,18 @@
|
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
|
|
57
|
+
@include e(swiper) {
|
|
61
58
|
height: 16px;
|
|
62
59
|
@include flex;
|
|
63
60
|
align-items: center;
|
|
64
61
|
flex: 1;
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
@include m(item) {
|
|
67
64
|
@include flex;
|
|
68
65
|
align-items: center;
|
|
69
66
|
overflow: hidden;
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
@include e(text) {
|
|
72
69
|
font-size: 14px;
|
|
73
70
|
color: $hy-warning;
|
|
74
71
|
}
|
|
@@ -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
|
}
|