hy-app 0.1.1 → 0.1.3
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 +1 -1
- package/api/http.ts +8 -8
- package/components/dialog/index.ts +2 -2
- package/components/hy-address-picker/hy-address-picker.vue +14 -42
- package/components/hy-address-picker/index.scss +27 -0
- package/components/hy-address-picker/props.ts +2 -3
- package/components/hy-address-picker/typing.d.ts +1 -2
- package/components/hy-avatar/hy-avatar.vue +10 -54
- package/components/hy-avatar/index.scss +45 -0
- package/components/hy-avatar/props.ts +2 -2
- package/components/hy-avatar/typing.d.ts +2 -2
- package/components/hy-back-top/hy-back-top.vue +7 -22
- package/components/hy-back-top/index.scss +16 -0
- package/components/hy-back-top/props.ts +4 -4
- package/components/hy-back-top/typing.d.ts +2 -3
- package/components/hy-badge/hy-badge.vue +5 -75
- package/components/hy-badge/index.scss +72 -0
- package/components/hy-badge/props.ts +2 -2
- package/components/hy-badge/typing.d.ts +2 -2
- package/components/hy-button/hy-button.vue +22 -134
- package/components/hy-button/index.scss +116 -0
- package/components/hy-button/props.ts +4 -5
- package/components/hy-button/typing.d.ts +3 -3
- package/components/hy-calendar/header.vue +76 -0
- package/components/hy-calendar/hy-calendar.vue +366 -0
- package/components/hy-calendar/index.scss +171 -0
- package/components/hy-calendar/month.vue +524 -0
- package/components/hy-calendar/props.ts +37 -0
- package/components/hy-calendar/typing.d.ts +126 -0
- package/components/hy-card/hy-card.vue +21 -84
- package/components/hy-card/index.scss +57 -0
- package/components/hy-card/props.ts +2 -2
- package/components/hy-card/typing.d.ts +1 -1
- package/components/hy-cell/hy-cell.vue +30 -131
- package/components/hy-cell/index.scss +137 -0
- package/components/hy-cell/props.ts +2 -2
- package/components/hy-cell/typing.d.ts +4 -3
- package/components/hy-check-button/hy-check-button.vue +14 -7
- package/components/hy-check-button/index.scss +5 -0
- package/components/hy-check-button/props.ts +3 -3
- package/components/hy-checkbox/hy-checkbox.vue +24 -107
- package/components/hy-checkbox/index.scss +94 -0
- package/components/hy-checkbox/props.ts +4 -5
- package/components/hy-checkbox/typing.d.ts +3 -7
- package/components/hy-count-down/hy-count-down.vue +150 -0
- package/components/hy-count-down/index.scss +6 -0
- package/components/hy-count-down/index.ts +52 -0
- package/components/hy-count-down/props.ts +10 -0
- package/components/hy-count-down/typing.d.ts +20 -0
- package/components/hy-count-to/hy-count-to.vue +213 -0
- package/components/hy-count-to/index.scss +6 -0
- package/components/hy-count-to/props.ts +17 -0
- package/components/hy-count-to/typing.d.ts +48 -0
- package/components/hy-datetime-picker/hy-datetime-picker.vue +38 -64
- package/components/hy-datetime-picker/index.scss +28 -0
- package/components/hy-datetime-picker/props.ts +2 -2
- package/components/hy-datetime-picker/typing.d.ts +1 -1
- package/components/hy-divider/hy-divider.vue +24 -49
- package/components/hy-divider/index.scss +25 -0
- package/components/hy-divider/props.ts +2 -2
- package/components/hy-divider/typing.d.ts +1 -1
- package/components/hy-dropdown/hy-dropdown.vue +43 -0
- package/components/hy-dropdown/index.scss +17 -0
- package/components/hy-dropdown/props.ts +17 -0
- package/components/hy-dropdown/typing.d.ts +48 -0
- package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
- package/components/hy-dropdown-item/index.scss +96 -0
- package/components/hy-dropdown-item/props.ts +10 -0
- package/components/hy-dropdown-item/typing.d.ts +31 -0
- package/components/hy-empty/hy-empty.vue +8 -26
- package/components/hy-empty/index.scss +19 -0
- package/components/hy-empty/props.ts +2 -2
- package/components/hy-empty/typing.d.ts +1 -1
- package/components/hy-float-button/hy-float-button.vue +201 -0
- package/components/hy-float-button/index.scss +69 -0
- package/components/hy-float-button/props.ts +25 -0
- package/components/hy-float-button/typing.d.ts +93 -0
- package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
- package/components/hy-folding-panel/index.scss +6 -0
- package/components/hy-folding-panel/props.ts +2 -2
- package/components/hy-folding-panel/typing.d.ts +2 -2
- package/components/hy-form/hy-form.vue +22 -39
- package/components/hy-form/index.scss +30 -0
- package/components/hy-form/props.ts +4 -2
- package/components/hy-form/typing.d.ts +10 -2
- package/components/hy-grid/hy-grid.vue +4 -45
- package/components/hy-grid/index.scss +40 -0
- package/components/hy-grid/props.ts +5 -5
- package/components/hy-grid/typing.d.ts +2 -2
- package/components/hy-icon/hy-icon.vue +7 -97
- package/components/hy-icon/index.scss +84 -0
- package/components/hy-icon/props.ts +5 -5
- package/components/hy-image/hy-image.vue +212 -0
- package/components/hy-image/index.scss +26 -0
- package/components/hy-image/props.ts +24 -0
- package/components/hy-image/typing.d.ts +76 -0
- package/components/hy-input/hy-input.vue +11 -82
- package/components/hy-input/index.scss +65 -0
- package/components/hy-input/props.ts +2 -2
- package/components/hy-input/typing.d.ts +2 -2
- package/components/hy-line/hy-line.vue +4 -8
- package/components/hy-line/index.scss +5 -0
- package/components/hy-line/props.ts +3 -3
- package/components/hy-line/typing.d.ts +2 -2
- package/components/hy-line-progress/hy-line-progress.vue +15 -44
- package/components/hy-line-progress/index.scss +38 -0
- package/components/hy-line-progress/props.ts +2 -2
- package/components/hy-line-progress/typing.d.ts +1 -1
- package/components/hy-list/hy-list.vue +11 -41
- package/components/hy-list/index.scss +32 -0
- package/components/hy-list/props.ts +2 -2
- package/components/hy-loading/hy-loading.vue +95 -0
- package/components/hy-loading/index.scss +103 -0
- package/components/hy-loading/props.ts +17 -0
- package/components/hy-loading/typing.d.ts +52 -0
- package/components/hy-login/TheUserLogin.vue +16 -16
- package/components/hy-login/hy-login.vue +9 -9
- package/components/hy-login/props.ts +4 -4
- package/components/hy-modal/hy-modal.vue +11 -89
- package/components/hy-modal/index.scss +77 -0
- package/components/hy-modal/props.ts +2 -2
- package/components/hy-modal/typing.d.ts +1 -1
- package/components/hy-navbar/hy-navbar.vue +20 -92
- package/components/hy-navbar/index.scss +67 -0
- package/components/hy-navbar/props.ts +2 -2
- package/components/hy-navbar/typing.d.ts +1 -1
- package/components/hy-notice-bar/hy-column-notice.vue +11 -39
- package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
- package/components/hy-notice-bar/hy-row-notice.vue +5 -56
- package/components/hy-notice-bar/index.scss +93 -0
- package/components/hy-notice-bar/props.ts +4 -2
- package/components/hy-notice-bar/typing.d.ts +13 -3
- package/components/hy-number-step/hy-number-step.vue +55 -105
- package/components/hy-number-step/index.scss +71 -0
- package/components/hy-number-step/props.ts +2 -2
- package/components/hy-number-step/typing.d.ts +1 -1
- package/components/hy-overlay/hy-overlay.vue +5 -17
- package/components/hy-overlay/index.scss +9 -0
- package/components/hy-overlay/props.ts +2 -2
- package/components/hy-overlay/typing.d.ts +1 -1
- package/components/hy-picker/hy-picker.vue +21 -87
- package/components/hy-picker/index.scss +68 -0
- package/components/hy-picker/props.ts +3 -2
- package/components/hy-picker/typing.d.ts +5 -1
- package/components/hy-popup/hy-popup.vue +7 -80
- package/components/hy-popup/index.scss +60 -0
- package/components/hy-popup/props.ts +2 -2
- package/components/hy-popup/typing.d.ts +1 -1
- package/components/hy-price/hy-price.vue +5 -15
- package/components/hy-price/index.scss +11 -0
- package/components/hy-price/props.ts +2 -2
- package/components/hy-price/typing.d.ts +1 -1
- package/components/hy-qrcode/hy-qrcode.vue +15 -37
- package/components/hy-qrcode/index.scss +23 -0
- package/components/hy-qrcode/props.ts +2 -2
- package/components/hy-qrcode/typing.d.ts +2 -2
- package/components/hy-radio/hy-radio.vue +27 -113
- package/components/hy-radio/index.scss +93 -0
- package/components/hy-radio/props.ts +4 -4
- package/components/hy-radio/typing.d.ts +2 -2
- package/components/hy-rate/hy-rate.vue +33 -53
- package/components/hy-rate/index.scss +33 -0
- package/components/hy-rate/props.ts +4 -3
- package/components/hy-rate/typing.d.ts +1 -1
- package/components/hy-read-more/hy-read-more.vue +7 -30
- package/components/hy-read-more/index.scss +25 -0
- package/components/hy-read-more/props.ts +3 -3
- package/components/hy-read-more/typing.d.ts +1 -1
- package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
- package/components/hy-safe-bottom/index.scss +5 -0
- package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
- package/components/hy-scroll-list/index.scss +34 -0
- package/components/hy-scroll-list/props.ts +2 -2
- package/components/hy-scroll-list/typing.d.ts +1 -1
- package/components/hy-search/hy-search.vue +12 -94
- package/components/hy-search/index.scss +83 -0
- package/components/hy-search/props.ts +2 -2
- package/components/hy-search/typing.d.ts +1 -2
- package/components/hy-slider/hy-slider.vue +42 -119
- package/components/hy-slider/index.scss +77 -0
- package/components/hy-slider/props.ts +2 -2
- package/components/hy-status-bar/hy-status-bar.vue +41 -0
- package/components/hy-status-bar/index.scss +6 -0
- package/components/hy-status-bar/props.ts +8 -0
- package/components/hy-status-bar/typing.d.ts +12 -0
- package/components/hy-steps/hy-steps.vue +36 -163
- package/components/hy-steps/index.scss +131 -0
- package/components/hy-steps/props.ts +2 -2
- package/components/hy-steps/typing.d.ts +2 -2
- package/components/hy-subsection/hy-subsection.vue +62 -125
- package/components/hy-subsection/index.scss +82 -0
- package/components/hy-subsection/props.ts +7 -3
- package/components/hy-subsection/typing.d.ts +20 -8
- package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
- package/components/hy-swipe-action/index.scss +9 -0
- package/components/hy-swipe-action/index.wxs +235 -0
- package/components/hy-swipe-action/props.ts +16 -0
- package/components/hy-swipe-action/typing.d.ts +55 -0
- package/components/hy-swipe-action/wxs.js +15 -0
- package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
- package/components/hy-swiper/hy-swiper.vue +45 -65
- package/components/hy-swiper/index.scss +82 -0
- package/components/hy-swiper/props.ts +3 -3
- package/components/hy-swiper/typing.d.ts +7 -4
- package/components/hy-switch/hy-switch.vue +65 -68
- package/components/hy-switch/index.scss +46 -0
- package/components/hy-switch/props.ts +6 -3
- package/components/hy-switch/typing.d.ts +14 -1
- package/components/hy-tabs/hy-tabs.vue +22 -81
- package/components/hy-tabs/index.scss +63 -0
- package/components/hy-tabs/props.ts +5 -5
- package/components/hy-tabs/typing.d.ts +1 -1
- package/components/hy-tag/hy-tag.vue +15 -230
- package/components/hy-tag/index.scss +204 -0
- package/components/hy-tag/props.ts +2 -2
- package/components/hy-tag/typing.d.ts +2 -2
- package/components/hy-text/hy-text.vue +238 -0
- package/components/hy-text/index.scss +70 -0
- package/components/hy-text/index.ts +0 -0
- package/components/hy-text/props.ts +30 -0
- package/components/hy-text/typing.d.ts +98 -0
- package/components/hy-textarea/hy-textarea.vue +13 -51
- package/components/hy-textarea/index.scss +40 -0
- package/components/hy-textarea/props.ts +2 -2
- package/components/hy-textarea/typing.d.ts +1 -1
- package/components/hy-tooltip/hy-tooltip.vue +42 -95
- package/components/hy-tooltip/index.scss +64 -0
- package/components/hy-tooltip/props.ts +2 -2
- package/components/hy-tooltip/typing.d.ts +1 -1
- package/components/hy-transition/hy-transition.vue +17 -8
- package/components/hy-transition/props.ts +2 -2
- package/components/hy-transition/typing.d.ts +2 -14
- package/components/hy-upload/hy-upload.vue +37 -182
- package/components/hy-upload/index.scss +147 -0
- package/components/hy-upload/props.ts +2 -2
- package/components/hy-upload/typing.d.ts +11 -11
- package/components/hy-warn/hy-warn.vue +15 -123
- package/components/hy-warn/index.scss +109 -0
- package/components/hy-warn/props.ts +3 -3
- package/components/hy-warn/typing.d.ts +4 -3
- package/components/hy-waterfall/index.scss +82 -0
- package/components/index.ts +25 -1
- package/components/message/index.ts +54 -54
- package/config/color.ts +2 -1
- package/global/index.ts +6 -6
- package/global/register-properties.ts +2 -2
- package/index.scss +2 -0
- package/libs/css/common.scss +16 -0
- package/package.json +4 -4
- package/{libs/css → public/font}/iconfont.css +5 -5
- package/{libs/css → public/font}/iconfont.ttf +0 -0
- package/public/font/iconfont.woff +0 -0
- package/public/font/iconfont.woff2 +0 -0
- package/theme.scss +9 -7
- package/typing/index.ts +0 -1
- package/typing/modules/common.d.ts +66 -1
- package/typing/modules/form.ts +3 -3
- package/utils/calendar.js +1021 -0
- package/utils/colorGradient.ts +112 -0
- package/utils/index.ts +2 -0
- package/utils/inside.ts +80 -34
- package/utils/inspect.ts +66 -0
- package/utils/utils.ts +27 -19
- package/typing/modules/img.ts +0 -15
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:customStyle="{
|
|
7
7
|
borderRadius: '6px',
|
|
8
8
|
overflow: 'hidden',
|
|
9
|
-
marginTop: `-${addUnit(negativeTop)}
|
|
9
|
+
marginTop: `-${addUnit(negativeTop)}`,
|
|
10
10
|
}"
|
|
11
11
|
:closeOnClickOverlay="closeOnClickOverlay"
|
|
12
12
|
:safeAreaInsetBottom="false"
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
<view
|
|
17
17
|
class="hy-modal"
|
|
18
18
|
:style="{
|
|
19
|
-
width: addUnit(width)
|
|
19
|
+
width: addUnit(width),
|
|
20
20
|
}"
|
|
21
21
|
>
|
|
22
22
|
<view class="hy-modal__title" v-if="title">{{ title }}</view>
|
|
23
23
|
<view
|
|
24
24
|
class="hy-modal__content"
|
|
25
25
|
:style="{
|
|
26
|
-
paddingTop: `${title ? 12 : 25}px
|
|
26
|
+
paddingTop: `${title ? 12 : 25}px`,
|
|
27
27
|
}"
|
|
28
28
|
>
|
|
29
29
|
<slot>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<view
|
|
43
43
|
class="hy-modal__button-group"
|
|
44
44
|
:style="{
|
|
45
|
-
flexDirection: buttonReverse ? 'row-reverse' : 'row'
|
|
45
|
+
flexDirection: buttonReverse ? 'row-reverse' : 'row',
|
|
46
46
|
}"
|
|
47
47
|
>
|
|
48
48
|
<view
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
:class="[
|
|
53
53
|
showCancelButton &&
|
|
54
54
|
!showConfirmButton &&
|
|
55
|
-
'hy-modal__button-group__wrapper--only-cancel'
|
|
55
|
+
'hy-modal__button-group__wrapper--only-cancel',
|
|
56
56
|
]"
|
|
57
57
|
v-if="showCancelButton"
|
|
58
58
|
@tap.stop="cancelHandler"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<text
|
|
61
61
|
class="hy-modal__button-group__wrapper__text"
|
|
62
62
|
:style="{
|
|
63
|
-
color: cancelColor
|
|
63
|
+
color: cancelColor,
|
|
64
64
|
}"
|
|
65
65
|
>{{ cancelText }}</text
|
|
66
66
|
>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
:class="[
|
|
77
77
|
!showCancelButton &&
|
|
78
78
|
showConfirmButton &&
|
|
79
|
-
'hy-modal__button-group__wrapper--only-confirm'
|
|
79
|
+
'hy-modal__button-group__wrapper--only-confirm',
|
|
80
80
|
]"
|
|
81
81
|
v-if="showConfirmButton"
|
|
82
82
|
@tap="confirmHandler"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
v-else
|
|
91
91
|
class="hy-modal__button-group__wrapper__text"
|
|
92
92
|
:style="{
|
|
93
|
-
color: confirmColor
|
|
93
|
+
color: confirmColor,
|
|
94
94
|
}"
|
|
95
95
|
>{{ confirmText }}</text
|
|
96
96
|
>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<script setup lang="ts">
|
|
105
105
|
import { ref, toRefs, watch } from "vue";
|
|
106
106
|
import defaultProps from "./props";
|
|
107
|
-
import IProps from "./typing";
|
|
107
|
+
import type IProps from "./typing";
|
|
108
108
|
import { addUnit } from "../../utils";
|
|
109
109
|
import { IconConfig } from "../../config";
|
|
110
110
|
|
|
@@ -122,7 +122,7 @@ watch(
|
|
|
122
122
|
() => show.value,
|
|
123
123
|
(newValue) => {
|
|
124
124
|
if (newValue && loading.value) loading.value = false;
|
|
125
|
-
}
|
|
125
|
+
},
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
/**
|
|
@@ -158,83 +158,5 @@ const clickHandler = () => {
|
|
|
158
158
|
</script>
|
|
159
159
|
|
|
160
160
|
<style lang="scss" scoped>
|
|
161
|
-
@import "
|
|
162
|
-
@import "../../theme.scss";
|
|
163
|
-
|
|
164
|
-
$u-modal-border-radius: 6px;
|
|
165
|
-
|
|
166
|
-
.hy-modal {
|
|
167
|
-
width: 650rpx;
|
|
168
|
-
border-radius: $hy-border-radius-base;
|
|
169
|
-
overflow: hidden;
|
|
170
|
-
|
|
171
|
-
&__title {
|
|
172
|
-
display: flex;
|
|
173
|
-
flex-direction: column;
|
|
174
|
-
justify-content: center;
|
|
175
|
-
align-items: center;
|
|
176
|
-
font-size: 16px;
|
|
177
|
-
font-weight: bold;
|
|
178
|
-
color: $hy-color-title;
|
|
179
|
-
text-align: center;
|
|
180
|
-
padding-top: 25px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
&__content {
|
|
184
|
-
padding: 12px 25px 25px 25px;
|
|
185
|
-
@include flex;
|
|
186
|
-
justify-content: center;
|
|
187
|
-
|
|
188
|
-
&__text {
|
|
189
|
-
text-align: v-bind(contentTextAlign);
|
|
190
|
-
font-size: 15px;
|
|
191
|
-
color: $hy-text-color-grey;
|
|
192
|
-
flex: 1;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&__button-group {
|
|
197
|
-
border-top: $hy-border-line;
|
|
198
|
-
@include flex;
|
|
199
|
-
|
|
200
|
-
&--confirm-button {
|
|
201
|
-
flex-direction: column;
|
|
202
|
-
padding: 0 25px 15px 25px;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
&__wrapper {
|
|
206
|
-
flex: 1;
|
|
207
|
-
@include flex;
|
|
208
|
-
justify-content: center;
|
|
209
|
-
align-items: center;
|
|
210
|
-
height: 48px;
|
|
211
|
-
|
|
212
|
-
&--line {
|
|
213
|
-
background: $hy-text-color-light;
|
|
214
|
-
width: 1px;
|
|
215
|
-
height: 48px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&--confirm,
|
|
219
|
-
&--only-cancel {
|
|
220
|
-
border-bottom-right-radius: $hy-border-radius-base;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&--cancel,
|
|
224
|
-
&--only-confirm {
|
|
225
|
-
border-bottom-left-radius: $hy-border-radius-base;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
&--hover {
|
|
229
|
-
background-color: $hy-bg-color-grey;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
&__text {
|
|
233
|
-
color: $hy-color-subtitle;
|
|
234
|
-
font-size: 16px;
|
|
235
|
-
text-align: center;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
161
|
+
@import "./index.scss";
|
|
240
162
|
</style>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
.hy-modal {
|
|
5
|
+
width: 650rpx;
|
|
6
|
+
border-radius: $hy-border-radius-base;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
&__title {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
color: $hy-color-title;
|
|
17
|
+
text-align: center;
|
|
18
|
+
padding-top: 25px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__content {
|
|
22
|
+
padding: 30px 40px;
|
|
23
|
+
@include flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
|
|
26
|
+
&__text {
|
|
27
|
+
text-align: v-bind(contentTextAlign);
|
|
28
|
+
font-size: 15px;
|
|
29
|
+
color: $hy-text-color-grey;
|
|
30
|
+
flex: 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__button-group {
|
|
35
|
+
border-top: $hy-border-line;
|
|
36
|
+
@include flex;
|
|
37
|
+
|
|
38
|
+
&--confirm-button {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
padding: 0 25px 15px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__wrapper {
|
|
44
|
+
flex: 1;
|
|
45
|
+
@include flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
height: 48px;
|
|
49
|
+
|
|
50
|
+
&--line {
|
|
51
|
+
background: $hy-text-color-light;
|
|
52
|
+
width: 1px;
|
|
53
|
+
height: 48px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--confirm,
|
|
57
|
+
&--only-cancel {
|
|
58
|
+
border-bottom-right-radius: $hy-border-radius-base;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&--cancel,
|
|
62
|
+
&--only-confirm {
|
|
63
|
+
border-bottom-left-radius: $hy-border-radius-base;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&--hover {
|
|
67
|
+
background-color: $hy-bg-color-grey;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__text {
|
|
71
|
+
color: $hy-color-subtitle;
|
|
72
|
+
font-size: 16px;
|
|
73
|
+
text-align: center;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IProps from "./typing";
|
|
1
|
+
import type IProps from "./typing";
|
|
2
2
|
import { ColorConfig } from "../../config";
|
|
3
3
|
|
|
4
4
|
const defaultProps: IProps = {
|
|
@@ -18,7 +18,7 @@ const defaultProps: IProps = {
|
|
|
18
18
|
negativeTop: 0,
|
|
19
19
|
width: "650rpx",
|
|
20
20
|
confirmButtonShape: "",
|
|
21
|
-
contentTextAlign: "left"
|
|
21
|
+
contentTextAlign: "left",
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export default defaultProps;
|
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
class="hy-navbar__placeholder"
|
|
5
5
|
v-if="fixed && placeholder"
|
|
6
6
|
:style="{
|
|
7
|
-
height: addUnit(getPx(height) + statusBarHeight)
|
|
7
|
+
height: addUnit(getPx(height) + statusBarHeight),
|
|
8
8
|
}"
|
|
9
9
|
></view>
|
|
10
|
-
<view
|
|
11
|
-
|
|
12
|
-
:style="{ paddingTop: addUnit(safeAreaInsets?.top) }"
|
|
13
|
-
>
|
|
10
|
+
<view :class="[fixed && 'hy-navbar--fixed']">
|
|
11
|
+
<HyStatusBar v-if="safeAreaInsetTop" :bgColor="bgColor"></HyStatusBar>
|
|
14
12
|
<view
|
|
15
|
-
:class="[border && 'hy-
|
|
13
|
+
:class="[border && 'hy-border__bottom', 'hy-navbar__content']"
|
|
16
14
|
:style="{
|
|
17
15
|
height: addUnit(height),
|
|
18
|
-
backgroundColor: bgColor
|
|
16
|
+
backgroundColor: bgColor,
|
|
19
17
|
}"
|
|
20
18
|
>
|
|
21
19
|
<view
|
|
@@ -34,7 +32,7 @@
|
|
|
34
32
|
<text
|
|
35
33
|
v-if="leftText"
|
|
36
34
|
:style="{
|
|
37
|
-
color: leftIconColor
|
|
35
|
+
color: leftIconColor,
|
|
38
36
|
}"
|
|
39
37
|
class="hy-navbar__content__left__text"
|
|
40
38
|
>{{ leftText }}</text
|
|
@@ -48,9 +46,9 @@
|
|
|
48
46
|
:style="[
|
|
49
47
|
{
|
|
50
48
|
width: addUnit(titleWidth),
|
|
51
|
-
color: titleColor
|
|
49
|
+
color: titleColor,
|
|
52
50
|
},
|
|
53
|
-
titleStyle
|
|
51
|
+
titleStyle,
|
|
54
52
|
]"
|
|
55
53
|
>{{ title }}</text
|
|
56
54
|
>
|
|
@@ -59,9 +57,9 @@
|
|
|
59
57
|
:style="[
|
|
60
58
|
{
|
|
61
59
|
width: addUnit(titleWidth),
|
|
62
|
-
color: titleColor
|
|
60
|
+
color: titleColor,
|
|
63
61
|
},
|
|
64
|
-
titleStyle
|
|
62
|
+
titleStyle,
|
|
65
63
|
]"
|
|
66
64
|
>{{ sub }}</text
|
|
67
65
|
>
|
|
@@ -86,17 +84,20 @@
|
|
|
86
84
|
|
|
87
85
|
<script setup lang="ts">
|
|
88
86
|
import defaultProps from "./props";
|
|
89
|
-
import IProps from "./typing";
|
|
90
|
-
import { addUnit, getPx } from "../../utils";
|
|
87
|
+
import type IProps from "./typing";
|
|
88
|
+
import { addUnit, getPx, getWindowInfo } from "../../utils";
|
|
91
89
|
|
|
92
90
|
// 组件
|
|
93
91
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
92
|
+
import HyStatusBar from "../hy-status-bar/hy-status-bar.vue";
|
|
93
|
+
import { toRefs } from "vue";
|
|
94
94
|
|
|
95
95
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
96
|
+
const { autoBack, fixed } = toRefs(props);
|
|
96
97
|
const emit = defineEmits(["leftClick", "rightClick"]);
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
const { statusBarHeight } =
|
|
99
|
+
// 获取状态栏高度
|
|
100
|
+
const { statusBarHeight } = getWindowInfo();
|
|
100
101
|
|
|
101
102
|
/**
|
|
102
103
|
* @description 点击左侧区域
|
|
@@ -104,12 +105,8 @@ const { statusBarHeight } = uni.getWindowInfo();
|
|
|
104
105
|
const leftClick = () => {
|
|
105
106
|
// 如果配置了autoBack,自动返回上一页
|
|
106
107
|
emit("leftClick");
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
} else {
|
|
110
|
-
if (this.autoBack) {
|
|
111
|
-
uni.navigateBack();
|
|
112
|
-
}
|
|
108
|
+
if (autoBack.value) {
|
|
109
|
+
uni.navigateBack();
|
|
113
110
|
}
|
|
114
111
|
};
|
|
115
112
|
/**
|
|
@@ -121,74 +118,5 @@ const rightClick = () => {
|
|
|
121
118
|
</script>
|
|
122
119
|
|
|
123
120
|
<style lang="scss" scoped>
|
|
124
|
-
@import "
|
|
125
|
-
@import "../../theme.scss";
|
|
126
|
-
|
|
127
|
-
.hy-navbar {
|
|
128
|
-
&--fixed {
|
|
129
|
-
position: fixed;
|
|
130
|
-
left: 0;
|
|
131
|
-
right: 0;
|
|
132
|
-
top: 0;
|
|
133
|
-
z-index: 11;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&__content {
|
|
137
|
-
@include flex(row);
|
|
138
|
-
align-items: center;
|
|
139
|
-
height: 44px;
|
|
140
|
-
background-color: #9acafc;
|
|
141
|
-
position: relative;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
|
|
144
|
-
&__left,
|
|
145
|
-
&__right {
|
|
146
|
-
padding: 0 13px;
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: 0;
|
|
149
|
-
bottom: 0;
|
|
150
|
-
@include flex(row);
|
|
151
|
-
align-items: center;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&__left {
|
|
155
|
-
left: 0;
|
|
156
|
-
|
|
157
|
-
&--hover {
|
|
158
|
-
opacity: 0.7;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&__text {
|
|
162
|
-
font-size: 15px;
|
|
163
|
-
margin-left: 3px;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&__center {
|
|
168
|
-
display: flex;
|
|
169
|
-
flex-direction: column;
|
|
170
|
-
text-align: center;
|
|
171
|
-
&--title {
|
|
172
|
-
font-size: $hy-font-size-subtitle;
|
|
173
|
-
color: $hy-color-title;
|
|
174
|
-
}
|
|
175
|
-
&--sub {
|
|
176
|
-
font-size: $hy-font-size-hint;
|
|
177
|
-
color: $hy-color-hint;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&__right {
|
|
182
|
-
right: 0;
|
|
183
|
-
|
|
184
|
-
&__text {
|
|
185
|
-
font-size: 15px;
|
|
186
|
-
margin-left: 3px;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
.hy-border-bottom {
|
|
192
|
-
border-bottom: $hy-border-line;
|
|
193
|
-
}
|
|
121
|
+
@import "./index.scss";
|
|
194
122
|
</style>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
.hy-navbar {
|
|
5
|
+
&--fixed {
|
|
6
|
+
position: fixed;
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
top: 0;
|
|
10
|
+
z-index: 11;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__content {
|
|
14
|
+
@include flex(row);
|
|
15
|
+
align-items: center;
|
|
16
|
+
height: 44px;
|
|
17
|
+
background-color: #9acafc;
|
|
18
|
+
position: relative;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
|
|
21
|
+
&__left,
|
|
22
|
+
&__right {
|
|
23
|
+
padding: 0 13px;
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
@include flex(row);
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__left {
|
|
32
|
+
left: 0;
|
|
33
|
+
|
|
34
|
+
&--hover {
|
|
35
|
+
opacity: 0.7;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__text {
|
|
39
|
+
font-size: 15px;
|
|
40
|
+
margin-left: 3px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__center {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
text-align: center;
|
|
48
|
+
&--title {
|
|
49
|
+
font-size: $hy-font-size-subtitle;
|
|
50
|
+
color: $hy-color-title;
|
|
51
|
+
}
|
|
52
|
+
&--sub {
|
|
53
|
+
font-size: $hy-font-size-hint;
|
|
54
|
+
color: $hy-color-hint;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__right {
|
|
59
|
+
right: 0;
|
|
60
|
+
|
|
61
|
+
&__text {
|
|
62
|
+
font-size: 15px;
|
|
63
|
+
margin-left: 3px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IProps from "./typing";
|
|
1
|
+
import type IProps from "./typing";
|
|
2
2
|
import { IconConfig } from "../../config";
|
|
3
3
|
|
|
4
4
|
const defaultProps: IProps = {
|
|
@@ -18,7 +18,7 @@ const defaultProps: IProps = {
|
|
|
18
18
|
height: "44px",
|
|
19
19
|
leftIconSize: 20,
|
|
20
20
|
leftIconColor: "",
|
|
21
|
-
autoBack: false
|
|
21
|
+
autoBack: false,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export default defaultProps;
|
|
@@ -48,12 +48,13 @@
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script setup lang="ts">
|
|
51
|
-
import { CSSProperties, toRefs, computed, ref } from "vue";
|
|
52
|
-
import IProps from "./typing";
|
|
51
|
+
import { type CSSProperties, toRefs, computed, ref, watch } from "vue";
|
|
52
|
+
import type IProps from "./typing";
|
|
53
53
|
import defaultProps from "./props";
|
|
54
|
-
import { addUnit } from "../../utils";
|
|
54
|
+
import { addUnit, error } from "../../utils";
|
|
55
55
|
import { IconConfig } from "../../config";
|
|
56
56
|
|
|
57
|
+
// 组件
|
|
57
58
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
58
59
|
|
|
59
60
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
@@ -62,6 +63,12 @@ const emit = defineEmits(["click", "close"]);
|
|
|
62
63
|
|
|
63
64
|
const index = ref(0);
|
|
64
65
|
|
|
66
|
+
watch(
|
|
67
|
+
() => text.value,
|
|
68
|
+
(newVal) => !Array.isArray(newVal) && error("传入值必须是数组"),
|
|
69
|
+
{ immediate: true },
|
|
70
|
+
);
|
|
71
|
+
|
|
65
72
|
/**
|
|
66
73
|
* @description 文字内容的样式
|
|
67
74
|
* */
|
|
@@ -91,40 +98,5 @@ const close = () => {
|
|
|
91
98
|
</script>
|
|
92
99
|
|
|
93
100
|
<style lang="scss" scoped>
|
|
94
|
-
@import "
|
|
95
|
-
@import "../../theme.scss";
|
|
96
|
-
|
|
97
|
-
.hy-notice {
|
|
98
|
-
@include flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
justify-content: space-between;
|
|
101
|
-
|
|
102
|
-
&__left-icon {
|
|
103
|
-
align-items: center;
|
|
104
|
-
margin-right: 5px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&__right-icon {
|
|
108
|
-
margin-left: 5px;
|
|
109
|
-
align-items: center;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&__swiper {
|
|
113
|
-
height: 16px;
|
|
114
|
-
@include flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
flex: 1;
|
|
117
|
-
|
|
118
|
-
&__item {
|
|
119
|
-
@include flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
|
|
123
|
-
&__text {
|
|
124
|
-
font-size: 14px;
|
|
125
|
-
color: $hy-warning;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
101
|
+
@import "./index.scss";
|
|
130
102
|
</style>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
class="
|
|
3
|
+
class="hy-notice-bar"
|
|
4
4
|
v-if="show"
|
|
5
5
|
:style="[
|
|
6
6
|
{
|
|
7
|
-
backgroundColor: bgColor
|
|
7
|
+
backgroundColor: bgColor,
|
|
8
8
|
},
|
|
9
|
-
customStyle
|
|
9
|
+
customStyle,
|
|
10
10
|
]"
|
|
11
11
|
>
|
|
12
12
|
<template v-if="direction === 'column' || (direction === 'row' && step)">
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script setup lang="ts">
|
|
47
|
-
import { ref } from "vue";
|
|
47
|
+
import { ref, toRefs } from "vue";
|
|
48
48
|
import defaultProps from "./props";
|
|
49
|
-
import IProps from "./typing";
|
|
49
|
+
import type IProps from "./typing";
|
|
50
50
|
// 组件
|
|
51
51
|
import HyRowNotice from "./hy-row-notice.vue";
|
|
52
52
|
import HyColumnNotice from "./hy-column-notice.vue";
|
|
@@ -54,6 +54,7 @@ import HyColumnNotice from "./hy-column-notice.vue";
|
|
|
54
54
|
const show = ref(true);
|
|
55
55
|
|
|
56
56
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
57
|
+
const { mode, linkType, url } = toRefs(props);
|
|
57
58
|
const emit = defineEmits(["click", "close"]);
|
|
58
59
|
|
|
59
60
|
/**
|
|
@@ -61,6 +62,9 @@ const emit = defineEmits(["click", "close"]);
|
|
|
61
62
|
* */
|
|
62
63
|
const click = (index: number) => {
|
|
63
64
|
emit("click", index);
|
|
65
|
+
if (url.value && linkType.value && mode.value === "link") {
|
|
66
|
+
(uni as any)[linkType.value]({ url: url.value });
|
|
67
|
+
}
|
|
64
68
|
};
|
|
65
69
|
/**
|
|
66
70
|
* @description 点击关闭按钮
|
|
@@ -72,11 +76,5 @@ const close = () => {
|
|
|
72
76
|
</script>
|
|
73
77
|
|
|
74
78
|
<style lang="scss" scoped>
|
|
75
|
-
@import "
|
|
76
|
-
|
|
77
|
-
.u-notice-bar {
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
padding: 9px 12px;
|
|
80
|
-
flex: 1;
|
|
81
|
-
}
|
|
79
|
+
@import "./index.scss";
|
|
82
80
|
</style>
|