hy-app 0.1.5 → 0.2.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/README.md +2 -1
- package/components/hy-address-picker/hy-address-picker.vue +11 -0
- package/components/hy-address-picker/index.scss +1 -1
- package/components/hy-avatar/hy-avatar.vue +11 -0
- package/components/hy-avatar/index.scss +8 -8
- package/components/hy-back-top/hy-back-top.vue +13 -2
- package/components/hy-back-top/index.scss +3 -2
- package/components/hy-badge/hy-badge.vue +11 -0
- package/components/hy-badge/index.scss +18 -40
- package/components/hy-button/hy-button.vue +17 -8
- package/components/hy-button/index.scss +20 -51
- package/components/hy-calendar/header.vue +12 -12
- package/components/hy-calendar/hy-calendar.vue +11 -2
- package/components/hy-calendar/index.scss +137 -131
- package/components/hy-calendar/month.vue +44 -22
- package/components/hy-calendar/props.ts +1 -1
- package/components/hy-card/hy-card.vue +11 -0
- package/components/hy-card/index.scss +5 -14
- package/components/hy-card/props.ts +2 -2
- package/components/hy-cell/hy-cell.vue +22 -13
- package/components/hy-cell/index.scss +45 -31
- package/components/hy-cell/props.ts +2 -3
- package/components/hy-cell/typing.d.ts +3 -10
- package/components/hy-check-button/hy-check-button.vue +13 -2
- package/components/hy-check-button/index.scss +0 -5
- package/components/hy-checkbox/hy-checkbox.vue +35 -9
- package/components/hy-checkbox/index.scss +19 -12
- package/components/hy-checkbox/props.ts +1 -2
- package/components/hy-checkbox/typing.d.ts +1 -1
- package/components/hy-config-provider/hy-config-provider.vue +54 -0
- package/components/hy-config-provider/index.scss +17 -0
- package/components/hy-config-provider/props.ts +13 -0
- package/components/hy-config-provider/typing.d.ts +28 -0
- package/components/hy-count-down/hy-count-down.vue +11 -0
- package/components/hy-count-down/index.scss +4 -1
- package/components/hy-count-to/hy-count-to.vue +12 -1
- package/components/hy-count-to/index.scss +6 -1
- package/components/hy-count-to/props.ts +1 -1
- package/components/hy-datetime-picker/hy-datetime-picker.vue +11 -0
- package/components/hy-datetime-picker/index.scss +1 -1
- package/components/hy-divider/hy-divider.vue +11 -0
- package/components/hy-divider/index.scss +3 -2
- package/components/hy-divider/props.ts +2 -2
- package/components/hy-dropdown/hy-dropdown.vue +13 -1
- package/components/hy-dropdown/index.scss +5 -2
- package/components/hy-dropdown/props.ts +2 -2
- package/components/hy-dropdown-item/hy-dropdown-item.vue +21 -3
- package/components/hy-dropdown-item/index.scss +22 -4
- package/components/hy-empty/hy-empty.vue +22 -10
- package/components/hy-empty/index.scss +8 -3
- package/components/hy-empty/props.ts +1 -5
- package/components/hy-empty/typing.d.ts +3 -18
- package/components/hy-float-button/hy-float-button.vue +11 -0
- package/components/hy-float-button/index.scss +8 -2
- package/components/hy-float-button/props.ts +3 -3
- package/components/hy-folding-panel/hy-folding-panel.vue +11 -0
- package/components/hy-folding-panel/index.scss +4 -1
- package/components/hy-form/hy-form.vue +25 -9
- package/components/hy-form/index.scss +5 -2
- package/components/hy-grid/hy-grid.vue +11 -0
- package/components/hy-grid/index.scss +2 -2
- package/components/hy-icon/hy-icon.vue +12 -1
- package/components/hy-icon/index.scss +10 -7
- package/components/hy-icon/props.ts +2 -2
- package/components/hy-image/hy-image.vue +12 -1
- package/components/hy-image/index.scss +4 -3
- package/components/hy-image/props.ts +1 -1
- package/components/hy-input/hy-input.vue +36 -13
- package/components/hy-input/index.scss +11 -3
- package/components/hy-input/props.ts +2 -2
- package/components/hy-input/typing.d.ts +8 -0
- package/components/hy-line/hy-line.vue +11 -0
- package/components/hy-line/index.scss +5 -1
- package/components/hy-line/props.ts +1 -1
- package/components/hy-line-progress/hy-line-progress.vue +17 -2
- package/components/hy-line-progress/index.scss +9 -8
- package/components/hy-line-progress/props.ts +4 -4
- package/components/hy-line-progress/typing.d.ts +4 -0
- package/components/hy-list/hy-list.vue +23 -8
- package/components/hy-list/index.scss +1 -4
- package/components/hy-loading/hy-loading.vue +11 -0
- package/components/hy-loading/index.scss +4 -4
- package/components/hy-login/TheUserLogin.vue +63 -106
- package/components/hy-login/hy-login.vue +269 -266
- package/components/hy-login/props.ts +1 -1
- package/components/hy-login/typing.d.ts +5 -0
- package/components/hy-modal/hy-modal.vue +18 -7
- package/components/hy-modal/index.scss +13 -9
- package/components/hy-modal/props.ts +3 -3
- package/components/hy-navbar/hy-navbar.vue +11 -0
- package/components/hy-navbar/index.scss +5 -5
- package/components/hy-navbar/props.ts +1 -1
- package/components/hy-notice-bar/hy-notice-bar.vue +11 -0
- package/components/hy-notice-bar/index.scss +27 -37
- package/components/hy-notice-bar/props.ts +2 -2
- package/components/hy-number-step/hy-number-step.vue +15 -8
- package/components/hy-number-step/index.scss +16 -25
- package/components/hy-number-step/props.ts +4 -4
- package/components/hy-overlay/index.scss +3 -1
- package/components/hy-picker/hy-picker.vue +12 -0
- package/components/hy-picker/index.scss +8 -4
- package/components/hy-picker/props.ts +1 -1
- package/components/hy-popup/hy-popup.vue +11 -0
- package/components/hy-popup/index.scss +2 -2
- package/components/hy-price/hy-price.vue +11 -0
- package/components/hy-price/index.scss +4 -7
- package/components/hy-qrcode/hy-qrcode.vue +11 -0
- package/components/hy-qrcode/index.scss +5 -2
- package/components/hy-radio/hy-radio.vue +23 -4
- package/components/hy-radio/index.scss +21 -11
- package/components/hy-radio/props.ts +1 -2
- package/components/hy-rate/hy-rate.vue +11 -0
- package/components/hy-rate/index.scss +1 -6
- package/components/hy-read-more/hy-read-more.vue +23 -2
- package/components/hy-read-more/index.scss +12 -2
- package/components/hy-read-more/props.ts +2 -7
- package/components/hy-scroll-list/hy-scroll-list.vue +31 -9
- package/components/hy-scroll-list/index.scss +10 -1
- package/components/hy-scroll-list/props.ts +2 -2
- package/components/hy-search/hy-search.vue +11 -0
- package/components/hy-search/index.scss +6 -4
- package/components/hy-search/props.ts +2 -2
- package/components/hy-slider/hy-slider.vue +11 -0
- package/components/hy-slider/index.scss +4 -3
- package/components/hy-slider/props.ts +3 -3
- package/components/hy-steps/hy-steps.vue +55 -19
- package/components/hy-steps/index.scss +50 -21
- package/components/hy-steps/props.ts +2 -2
- package/components/{hy-submitBar/hy-submitBar.vue → hy-submit-bar/hy-submit-bar.vue} +13 -34
- package/components/hy-submit-bar/index.scss +37 -0
- package/components/hy-subsection/hy-subsection.vue +12 -0
- package/components/hy-subsection/index.scss +16 -10
- package/components/hy-subsection/props.ts +3 -3
- package/components/hy-swipe-action/index.scss +0 -9
- package/components/hy-swiper/hy-swiper.vue +11 -0
- package/components/hy-swiper/index.scss +3 -2
- package/components/hy-switch/hy-switch.vue +17 -3
- package/components/hy-switch/index.scss +28 -9
- package/components/hy-switch/props.ts +1 -3
- package/components/hy-switch/typing.d.ts +3 -3
- package/components/hy-tabs/hy-tabs.vue +27 -15
- package/components/hy-tabs/index.scss +11 -4
- package/components/hy-tabs/props.ts +4 -10
- package/components/hy-tag/hy-tag.vue +13 -7
- package/components/hy-tag/index.scss +27 -115
- package/components/hy-text/hy-text.vue +13 -1
- package/components/hy-text/index.scss +13 -42
- package/components/hy-textarea/hy-textarea.vue +16 -5
- package/components/hy-textarea/index.scss +7 -7
- package/components/hy-toast/hy-toast.vue +12 -1
- package/components/hy-toast/index.scss +10 -27
- package/components/hy-tooltip/hy-tooltip.vue +11 -0
- package/components/hy-tooltip/index.scss +7 -5
- package/components/hy-tooltip/props.ts +1 -1
- package/components/hy-upload/hy-upload.vue +11 -0
- package/components/hy-upload/index.scss +6 -5
- package/components/hy-warn/hy-warn.vue +22 -11
- package/components/hy-warn/index.scss +46 -1
- package/components/hy-waterfall/hy-waterfall.vue +11 -0
- package/components/hy-waterfall/index.scss +1 -1
- package/config/icon.ts +4 -0
- package/index.scss +1 -0
- package/libs/css/common.scss +9 -0
- package/libs/css/mixin.scss +84 -0
- package/libs/css/vars.css +47 -0
- package/package.json +2 -2
- package/public/font/iconfont.css +3 -3
- package/store/userInfo.ts +26 -25
- package/theme.scss +87 -60
- package/typing/modules/common.d.ts +4 -0
- package/utils/colorGradient.ts +1 -1
- package/utils/inside.ts +3 -0
- package/components/hy-submitBar/Index.vue +0 -17
- package/components/hy-submitBar/index.scss +0 -9
- /package/components/{hy-submitBar → hy-submit-bar}/props.ts +0 -0
- /package/components/{hy-submitBar → hy-submit-bar}/typing.d.ts +0 -0
|
@@ -1,169 +1,175 @@
|
|
|
1
1
|
@use "../../libs/css/mixin.scss" as *;
|
|
2
2
|
@use "../../theme.scss" as *;
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
/* 主样式 */
|
|
5
|
-
|
|
6
|
+
@include b(calendar){
|
|
7
|
+
/* 确认按钮 */
|
|
6
8
|
&__confirm {
|
|
7
9
|
padding: 7px 18px;
|
|
8
10
|
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* 头部样式 */
|
|
12
|
-
.u-calendar-header {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
padding-bottom: 4px;
|
|
16
|
-
|
|
17
|
-
&__title {
|
|
18
|
-
font-size: 16px;
|
|
19
|
-
color: $hy-color-title;
|
|
20
|
-
text-align: center;
|
|
21
|
-
height: 42px;
|
|
22
|
-
line-height: 42px;
|
|
23
|
-
font-weight: bold;
|
|
24
|
-
}
|
|
25
11
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
line-height: 40px;
|
|
32
|
-
font-weight: bold;
|
|
33
|
-
}
|
|
12
|
+
/* 头部样式 */
|
|
13
|
+
&-header {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
padding-bottom: 4px;
|
|
34
17
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
&__title {
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
text-align: center;
|
|
21
|
+
height: 42px;
|
|
22
|
+
line-height: 42px;
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
}
|
|
38
25
|
|
|
39
|
-
&
|
|
40
|
-
font-size:
|
|
41
|
-
color: $
|
|
42
|
-
|
|
43
|
-
flex: 1;
|
|
26
|
+
&__subtitle {
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
color: $hy-text-color--2;
|
|
29
|
+
height: 40px;
|
|
44
30
|
text-align: center;
|
|
31
|
+
line-height: 40px;
|
|
32
|
+
font-weight: bold;
|
|
45
33
|
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
35
|
+
&__weekdays {
|
|
36
|
+
@include flex;
|
|
37
|
+
justify-content: space-between;
|
|
53
38
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
text-align: center;
|
|
63
|
-
font-weight: bold;
|
|
39
|
+
&__weekday {
|
|
40
|
+
font-size: 13px;
|
|
41
|
+
color: $hy-text-color--grey;
|
|
42
|
+
line-height: 30px;
|
|
43
|
+
flex: 1;
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
64
47
|
}
|
|
65
48
|
|
|
66
|
-
&__days {
|
|
67
|
-
position: relative;
|
|
68
|
-
@include flex;
|
|
69
|
-
flex-wrap: wrap;
|
|
70
|
-
|
|
71
|
-
&__month-mark-wrapper {
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
bottom: 0;
|
|
75
|
-
left: 0;
|
|
76
|
-
right: 0;
|
|
77
|
-
@include flex;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
align-items: center;
|
|
80
49
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
50
|
+
&-month {
|
|
51
|
+
&__title {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
line-height: 42px;
|
|
56
|
+
height: 42px;
|
|
57
|
+
color: $hy-text-color--2;
|
|
58
|
+
text-align: center;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* 内容样式 */
|
|
63
|
+
&-wrapper {
|
|
64
|
+
margin-top: 4px;
|
|
85
65
|
}
|
|
86
66
|
|
|
87
|
-
&
|
|
67
|
+
&__days {
|
|
68
|
+
position: relative;
|
|
88
69
|
@include flex;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
flex: 1;
|
|
70
|
+
flex-wrap: wrap;
|
|
71
|
+
|
|
72
|
+
&__month-mark-wrapper {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 0;
|
|
75
|
+
bottom: 0;
|
|
76
|
+
left: 0;
|
|
77
|
+
right: 0;
|
|
98
78
|
@include flex;
|
|
99
|
-
align-items: center;
|
|
100
79
|
justify-content: center;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
&__dot {
|
|
104
|
-
width: 7px;
|
|
105
|
-
height: 7px;
|
|
106
|
-
border-radius: 100px;
|
|
107
|
-
background-color: $u-error;
|
|
108
|
-
position: absolute;
|
|
109
|
-
top: 12px;
|
|
110
|
-
right: 7px;
|
|
111
|
-
}
|
|
80
|
+
align-items: center;
|
|
112
81
|
|
|
113
|
-
&
|
|
114
|
-
|
|
115
|
-
text-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
font-size: 10px;
|
|
119
|
-
text-align: center;
|
|
120
|
-
left: 0;
|
|
121
|
-
right: 0;
|
|
82
|
+
&__text {
|
|
83
|
+
font-size: 155px;
|
|
84
|
+
color: $hy-text-color--4;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
122
87
|
|
|
88
|
+
&__day {
|
|
89
|
+
@include flex;
|
|
90
|
+
padding: 2px;
|
|
91
|
+
/* #ifndef APP-NVUE */
|
|
92
|
+
// vue下使用css进行宽度计算,因为某些安卓机会无法进行js获取父元素宽度进行计算得出,会有偏移
|
|
93
|
+
width: calc(100% / 7);
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
/* #endif */
|
|
96
|
+
|
|
97
|
+
&__select {
|
|
98
|
+
flex: 1;
|
|
99
|
+
@include flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
position: relative;
|
|
123
103
|
&--selected {
|
|
124
|
-
color:
|
|
104
|
+
background-color: $hy-primary;
|
|
105
|
+
@include flex;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
align-items: center;
|
|
108
|
+
flex: 1;
|
|
109
|
+
border-radius: 3px;
|
|
110
|
+
@include m(center) {
|
|
111
|
+
border-radius: 0;
|
|
112
|
+
//color: #000000;
|
|
113
|
+
background-color: $hy-primary-light;
|
|
114
|
+
}
|
|
125
115
|
}
|
|
126
116
|
|
|
127
|
-
|
|
128
|
-
|
|
117
|
+
&__dot {
|
|
118
|
+
width: 7px;
|
|
119
|
+
height: 7px;
|
|
120
|
+
border-radius: 100px;
|
|
121
|
+
background-color: $hy-error;
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 12px;
|
|
124
|
+
right: 7px;
|
|
129
125
|
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&__info {
|
|
133
|
-
text-align: center;
|
|
134
|
-
font-size: 16px;
|
|
135
126
|
|
|
136
|
-
|
|
137
|
-
color:
|
|
127
|
+
&__buttom-info {
|
|
128
|
+
color: $hy-text-color--2;
|
|
129
|
+
text-align: center;
|
|
130
|
+
position: absolute;
|
|
131
|
+
bottom: 5px;
|
|
132
|
+
font-size: 10px;
|
|
133
|
+
left: 0;
|
|
134
|
+
right: 0;
|
|
135
|
+
|
|
136
|
+
&--selected {
|
|
137
|
+
color: #ffffff;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&--disabled {
|
|
141
|
+
background-color: $hy-primary-disabled;
|
|
142
|
+
}
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
145
|
+
&__info {
|
|
146
|
+
text-align: center;
|
|
147
|
+
font-size: 16px;
|
|
144
148
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
align-items: center;
|
|
150
|
-
flex: 1;
|
|
151
|
-
border-radius: 3px;
|
|
152
|
-
}
|
|
149
|
+
&--selected {
|
|
150
|
+
color: #ffffff;
|
|
151
|
+
background-color: $hy-primary;
|
|
152
|
+
}
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
&--disabled {
|
|
155
|
+
color: $hy-text-color--disabled;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
&--range-selected {
|
|
160
|
+
opacity: 0.3;
|
|
161
|
+
border-radius: 0;
|
|
162
|
+
}
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
&--range-start-selected {
|
|
165
|
+
border-top-right-radius: 0;
|
|
166
|
+
border-bottom-right-radius: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&--range-end-selected {
|
|
170
|
+
border-top-left-radius: 0;
|
|
171
|
+
border-bottom-left-radius: 0;
|
|
172
|
+
}
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
}
|
|
@@ -1,43 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="
|
|
2
|
+
<view class="hy-calendar-month-wrapper" ref="hy-calendar-month-wrapper">
|
|
3
3
|
<view
|
|
4
4
|
v-for="(item, index) in months"
|
|
5
5
|
:key="index"
|
|
6
|
-
:class="[`
|
|
7
|
-
:ref="`
|
|
6
|
+
:class="[`hy-calendar-month-${index}`]"
|
|
7
|
+
:ref="`hy-calendar-month-${index}`"
|
|
8
8
|
:id="`month-${index}`"
|
|
9
9
|
>
|
|
10
|
-
<text v-if="index !== 0" class="
|
|
10
|
+
<text v-if="index !== 0" class="hy-calendar-month__title"
|
|
11
11
|
>{{ item.year }}年{{ item.month }}月</text
|
|
12
12
|
>
|
|
13
|
-
<view class="
|
|
13
|
+
<view class="hy-calendar-month__days">
|
|
14
14
|
<view
|
|
15
15
|
v-if="showMark"
|
|
16
|
-
class="
|
|
16
|
+
class="hy-calendar-month__days__month-mark-wrapper"
|
|
17
17
|
>
|
|
18
|
-
<text class="
|
|
18
|
+
<text class="hy-calendar-month__days__month-mark-wrapper__text">{{
|
|
19
19
|
item.month
|
|
20
20
|
}}</text>
|
|
21
21
|
</view>
|
|
22
22
|
<view
|
|
23
|
-
class="
|
|
23
|
+
class="hy-calendar-month__days__day"
|
|
24
24
|
v-for="(item1, index1) in item.date"
|
|
25
25
|
:key="index1"
|
|
26
26
|
:style="[dayStyle(index, index1, item1)]"
|
|
27
27
|
@tap="clickHandler(index, index1, item1)"
|
|
28
|
-
:class="[
|
|
29
|
-
item1.selected && 'u-calendar-month__days__day__select--selected',
|
|
30
|
-
]"
|
|
31
28
|
>
|
|
32
29
|
<view
|
|
33
|
-
class="
|
|
30
|
+
:class="daySelectClass(index, index1, item1)"
|
|
34
31
|
:style="[daySelectStyle(index, index1, item1)]"
|
|
35
32
|
>
|
|
36
33
|
<text
|
|
37
|
-
class="
|
|
34
|
+
class="hy-calendar-month__days__day__select__info"
|
|
38
35
|
:class="[
|
|
39
36
|
item1.disabled || isForbid(item1)
|
|
40
|
-
? '
|
|
37
|
+
? 'hy-calendar-month__days__day__select__info--disabled'
|
|
41
38
|
: '',
|
|
42
39
|
]"
|
|
43
40
|
:style="[textStyle(item1)]"
|
|
@@ -45,10 +42,10 @@
|
|
|
45
42
|
>
|
|
46
43
|
<text
|
|
47
44
|
v-if="getBottomInfo(index, index1, item1)"
|
|
48
|
-
class="
|
|
45
|
+
class="hy-calendar-month__days__day__select__buttom-info"
|
|
49
46
|
:class="[
|
|
50
47
|
item1.disabled || isForbid(item1)
|
|
51
|
-
? '
|
|
48
|
+
? 'hy-calendar-month__days__day__select__buttom-info--disabled'
|
|
52
49
|
: '',
|
|
53
50
|
]"
|
|
54
51
|
:style="[textStyle(item1)]"
|
|
@@ -56,7 +53,7 @@
|
|
|
56
53
|
>
|
|
57
54
|
<text
|
|
58
55
|
v-if="item1.dot"
|
|
59
|
-
class="
|
|
56
|
+
class="hy-calendar-month__days__day__select__dot"
|
|
60
57
|
></text>
|
|
61
58
|
</view>
|
|
62
59
|
</view>
|
|
@@ -67,9 +64,10 @@
|
|
|
67
64
|
|
|
68
65
|
<script>
|
|
69
66
|
import { addUnit, colorGradient, deepClone, getRect, sleep } from "../../utils";
|
|
70
|
-
import dayjs from "dayjs/esm
|
|
67
|
+
import dayjs from "dayjs/esm";
|
|
68
|
+
import { formatTime } from "../../utils";
|
|
71
69
|
export default {
|
|
72
|
-
name: "
|
|
70
|
+
name: "hy-calendar-month",
|
|
73
71
|
props: {
|
|
74
72
|
// 是否显示月份背景色
|
|
75
73
|
showMark: {
|
|
@@ -187,7 +185,7 @@ export default {
|
|
|
187
185
|
selectedChange() {
|
|
188
186
|
return [this.minDate, this.maxDate, this.defaultDate];
|
|
189
187
|
},
|
|
190
|
-
dayStyle(
|
|
188
|
+
dayStyle() {
|
|
191
189
|
return (index1, index2, item) => {
|
|
192
190
|
const style = {};
|
|
193
191
|
let week = item.week;
|
|
@@ -217,6 +215,29 @@ export default {
|
|
|
217
215
|
return style;
|
|
218
216
|
};
|
|
219
217
|
},
|
|
218
|
+
daySelectClass() {
|
|
219
|
+
return (index1, index2, item) => {
|
|
220
|
+
const date = dayjs(item.date).format("YYYY-MM-DD");
|
|
221
|
+
const len = this.selected.length - 1;
|
|
222
|
+
const classes = ["hy-calendar-month__days__day__select"];
|
|
223
|
+
// 判断选中的
|
|
224
|
+
if (this.selected.some((item) => this.dateSame(item, date))) {
|
|
225
|
+
classes.push("hy-calendar-month__days__day__select--selected");
|
|
226
|
+
if (this.selected.length >= 2) {
|
|
227
|
+
// 判断非两边选中内容
|
|
228
|
+
if (
|
|
229
|
+
!this.dateSame(date, this.selected[0]) &&
|
|
230
|
+
!this.dateSame(date, this.selected[len])
|
|
231
|
+
) {
|
|
232
|
+
classes.push(
|
|
233
|
+
"hy-calendar-month__days__day__select--selected--center",
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return classes;
|
|
239
|
+
};
|
|
240
|
+
},
|
|
220
241
|
daySelectStyle() {
|
|
221
242
|
return (index1, index2, item) => {
|
|
222
243
|
let date = dayjs(item.date).format("YYYY-MM-DD"),
|
|
@@ -337,6 +358,7 @@ export default {
|
|
|
337
358
|
this.init();
|
|
338
359
|
},
|
|
339
360
|
methods: {
|
|
361
|
+
dayjs,
|
|
340
362
|
init() {
|
|
341
363
|
// 初始化默认选中
|
|
342
364
|
this.$emit("monthSelected", this.selected);
|
|
@@ -363,7 +385,7 @@ export default {
|
|
|
363
385
|
// 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度
|
|
364
386
|
getWrapperWidth() {
|
|
365
387
|
// #ifndef APP-NVUE
|
|
366
|
-
getRect(".
|
|
388
|
+
getRect(".hy-calendar-month-wrapper").then((size) => {
|
|
367
389
|
this.width = size.width;
|
|
368
390
|
});
|
|
369
391
|
// #endif
|
|
@@ -371,7 +393,7 @@ export default {
|
|
|
371
393
|
getMonthRect() {
|
|
372
394
|
// 获取每个月份数据的尺寸,用于父组件在scroll-view滚动事件中,监听当前滚动到了第几个月份
|
|
373
395
|
const promiseAllArr = this.months.map((item, index) =>
|
|
374
|
-
this.getMonthRectByPromise(`
|
|
396
|
+
this.getMonthRectByPromise(`hy-calendar-month-${index}`),
|
|
375
397
|
);
|
|
376
398
|
// 一次性返回
|
|
377
399
|
Promise.all(promiseAllArr).then((sizes) => {
|
|
@@ -70,6 +70,17 @@
|
|
|
70
70
|
</view>
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
|
+
<script lang="ts">
|
|
74
|
+
export default {
|
|
75
|
+
name: 'hy-card',
|
|
76
|
+
options: {
|
|
77
|
+
addGlobalClass: true,
|
|
78
|
+
virtualHost: true,
|
|
79
|
+
styleIsolation: 'shared'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</script>
|
|
83
|
+
|
|
73
84
|
<script setup lang="ts">
|
|
74
85
|
import defaultProps from "./props";
|
|
75
86
|
import type IProps from "./typing";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
@use "../../libs/css/mixin.scss" as *;
|
|
2
2
|
@use "../../theme.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
@include b(card) {
|
|
5
6
|
position: relative;
|
|
6
7
|
overflow: hidden;
|
|
7
8
|
font-size: 28rpx;
|
|
8
|
-
background-color:
|
|
9
|
+
background-color: $hy-background--container;
|
|
9
10
|
box-sizing: border-box;
|
|
10
11
|
|
|
11
12
|
&-full {
|
|
@@ -27,7 +28,6 @@
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
&--left {
|
|
30
|
-
color: #303133ff;
|
|
31
31
|
display: flex;
|
|
32
32
|
|
|
33
33
|
&__thumb {
|
|
@@ -36,22 +36,13 @@
|
|
|
36
36
|
|
|
37
37
|
&__title {
|
|
38
38
|
max-width: 400rpx;
|
|
39
|
-
|
|
40
|
-
@include line-feed;
|
|
39
|
+
@include lineEllipsis;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
&--right {
|
|
45
|
-
color: $hy-text-color
|
|
44
|
+
color: $hy-text-color--grey;
|
|
46
45
|
margin-left: 6rpx;
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
&__body {
|
|
51
|
-
color: $hy-bg-color;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&__foot {
|
|
55
|
-
color: $hy-text-color-grey;
|
|
56
|
-
}
|
|
57
48
|
}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :style="customStyle" class="hy-cell">
|
|
3
3
|
<view
|
|
4
|
-
class="hy-
|
|
5
|
-
:style="{ borderBottom: titleBorder ? '1rpx solid #c8c7cc66' : '' }"
|
|
4
|
+
:class="['hy-cell--title', showVertical && 'hy-cell--title__vertical']"
|
|
6
5
|
v-if="title || $slots['title']"
|
|
7
6
|
>
|
|
8
7
|
<slot name="title" :title="title">
|
|
9
|
-
<
|
|
10
|
-
<view
|
|
11
|
-
class="hy-cell__title-nav--ver"
|
|
12
|
-
:style="{ background: verticalColor }"
|
|
13
|
-
v-if="showVertical"
|
|
14
|
-
></view>
|
|
15
|
-
<text class="hy-cell__title-nav--text">{{ title }}</text>
|
|
16
|
-
</view>
|
|
8
|
+
<text class="hy-cell--title__text">{{ title }}</text>
|
|
17
9
|
</slot>
|
|
18
10
|
</view>
|
|
19
|
-
<view
|
|
11
|
+
<view
|
|
12
|
+
class="hy-cell__body"
|
|
13
|
+
:style="{ 'border-radius': addUnit(borderRadius) }"
|
|
14
|
+
>
|
|
20
15
|
<slot>
|
|
21
16
|
<template v-for="(item, i) in list" :key="i">
|
|
22
17
|
<view
|
|
23
18
|
:class="ItemClass"
|
|
24
19
|
:hover-class="containerClass(item)"
|
|
25
20
|
:hover-stay-time="250"
|
|
26
|
-
:style="{
|
|
21
|
+
:style="{
|
|
22
|
+
borderBottom:
|
|
23
|
+
border && i !== list.length - 1 ? '1rpx solid #c8c7cc66' : '',
|
|
24
|
+
}"
|
|
27
25
|
@tap="clickHandler($event, item, i)"
|
|
28
26
|
>
|
|
29
27
|
<view class="hy-cell__body--container__content">
|
|
@@ -130,6 +128,16 @@
|
|
|
130
128
|
</view>
|
|
131
129
|
</template>
|
|
132
130
|
|
|
131
|
+
<script lang="ts">
|
|
132
|
+
export default {
|
|
133
|
+
name: "hy-cell",
|
|
134
|
+
options: {
|
|
135
|
+
virtualHost: true,
|
|
136
|
+
styleIsolation: "shared",
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
</script>
|
|
140
|
+
|
|
133
141
|
<script setup lang="ts">
|
|
134
142
|
import defaultProps from "./props";
|
|
135
143
|
import type IProps from "./typing";
|
|
@@ -138,9 +146,10 @@ import { IconConfig } from "../../config";
|
|
|
138
146
|
|
|
139
147
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
140
148
|
import { computed, toRefs } from "vue";
|
|
149
|
+
import { addUnit } from "@/package";
|
|
141
150
|
|
|
142
151
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
143
|
-
const { size, disabled, clickable } = toRefs(props);
|
|
152
|
+
const { size, disabled, clickable, borderRadius } = toRefs(props);
|
|
144
153
|
const emit = defineEmits(["click"]);
|
|
145
154
|
|
|
146
155
|
/**
|