hy-app 0.1.5 → 0.2.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-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 +11 -1
- package/components/hy-badge/hy-badge.vue +11 -0
- package/components/hy-badge/index.scss +18 -40
- package/components/hy-button/hy-button.vue +15 -5
- package/components/hy-button/index.scss +25 -45
- package/components/hy-calendar/header.vue +12 -12
- package/components/hy-calendar/hy-calendar.vue +11 -2
- package/components/hy-calendar/index.scss +140 -131
- package/components/hy-calendar/month.vue +18 -18
- package/components/hy-card/hy-card.vue +11 -0
- package/components/hy-card/index.scss +12 -12
- package/components/hy-card/props.ts +2 -2
- package/components/hy-cell/hy-cell.vue +22 -13
- package/components/hy-cell/index.scss +55 -28
- 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 +31 -8
- package/components/hy-checkbox/index.scss +15 -5
- 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 +52 -0
- package/components/hy-config-provider/index.scss +21 -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 +13 -1
- package/components/hy-count-to/hy-count-to.vue +12 -1
- package/components/hy-count-to/index.scss +14 -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 +1 -1
- package/components/hy-dropdown/hy-dropdown.vue +13 -1
- package/components/hy-dropdown/index.scss +4 -1
- 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 +35 -2
- package/components/hy-empty/hy-empty.vue +22 -10
- package/components/hy-empty/index.scss +17 -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 +13 -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 +12 -2
- package/components/hy-grid/hy-grid.vue +11 -0
- package/components/hy-grid/index.scss +1 -1
- package/components/hy-icon/hy-icon.vue +12 -1
- package/components/hy-icon/index.scss +16 -7
- package/components/hy-icon/props.ts +2 -2
- package/components/hy-image/hy-image.vue +11 -0
- package/components/hy-image/index.scss +4 -3
- package/components/hy-input/hy-input.vue +31 -3
- package/components/hy-input/index.scss +12 -2
- package/components/hy-input/props.ts +1 -1
- package/components/hy-input/typing.d.ts +8 -0
- package/components/hy-line/hy-line.vue +11 -0
- package/components/hy-line/index.scss +4 -1
- package/components/hy-line-progress/hy-line-progress.vue +17 -2
- package/components/hy-line-progress/index.scss +20 -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 +2 -2
- 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 +15 -7
- package/components/hy-modal/index.scss +19 -3
- package/components/hy-navbar/hy-navbar.vue +11 -0
- package/components/hy-navbar/index.scss +14 -3
- 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 +35 -35
- package/components/hy-number-step/hy-number-step.vue +15 -8
- package/components/hy-number-step/index.scss +34 -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 +7 -3
- package/components/hy-picker/props.ts +1 -1
- package/components/hy-popup/hy-popup.vue +11 -0
- package/components/hy-popup/index.scss +10 -1
- package/components/hy-price/hy-price.vue +11 -0
- package/components/hy-price/index.scss +4 -1
- package/components/hy-qrcode/hy-qrcode.vue +11 -0
- package/components/hy-qrcode/index.scss +4 -1
- package/components/hy-radio/hy-radio.vue +19 -3
- package/components/hy-radio/index.scss +17 -5
- package/components/hy-radio/props.ts +1 -2
- package/components/hy-rate/hy-rate.vue +11 -0
- package/components/hy-rate/index.scss +6 -6
- package/components/hy-read-more/hy-read-more.vue +23 -2
- package/components/hy-read-more/index.scss +29 -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 +25 -4
- package/components/hy-search/props.ts +2 -2
- package/components/hy-slider/hy-slider.vue +11 -0
- package/components/hy-slider/index.scss +3 -2
- package/components/hy-slider/props.ts +1 -1
- package/components/hy-steps/hy-steps.vue +38 -20
- package/components/hy-steps/index.scss +57 -17
- 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 +45 -0
- package/components/hy-subsection/hy-subsection.vue +12 -0
- package/components/hy-subsection/index.scss +28 -8
- package/components/hy-subsection/props.ts +3 -3
- package/components/hy-swiper/hy-swiper.vue +11 -0
- package/components/hy-swiper/index.scss +13 -2
- package/components/hy-switch/hy-switch.vue +17 -3
- package/components/hy-switch/index.scss +25 -7
- package/components/hy-switch/props.ts +1 -2
- package/components/hy-switch/typing.d.ts +3 -3
- package/components/hy-tabs/hy-tabs.vue +27 -15
- package/components/hy-tabs/index.scss +25 -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 +12 -1
- package/components/hy-text/index.scss +20 -37
- package/components/hy-textarea/hy-textarea.vue +16 -5
- package/components/hy-textarea/index.scss +16 -5
- package/components/hy-toast/hy-toast.vue +12 -1
- package/components/hy-toast/index.scss +26 -26
- package/components/hy-tooltip/hy-tooltip.vue +11 -0
- package/components/hy-tooltip/index.scss +3 -3
- package/components/hy-tooltip/props.ts +1 -1
- package/components/hy-upload/hy-upload.vue +11 -0
- package/components/hy-upload/index.scss +12 -1
- 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/libs/css/common.scss +9 -0
- package/libs/css/mixin.scss +78 -0
- package/package.json +2 -2
- package/public/font/iconfont.css +3 -3
- package/store/userInfo.ts +26 -25
- package/theme.scss +76 -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,178 @@
|
|
|
1
1
|
@use "../../libs/css/mixin.scss" as *;
|
|
2
2
|
@use "../../theme.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
@include b(theme) {
|
|
5
|
+
@include m(dark) {
|
|
6
|
+
background-color: $hy-dark-background;
|
|
7
|
+
color: $hy-dark-color;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
11
|
+
/* 主样式 */
|
|
12
|
+
@include b(calendar){
|
|
13
|
+
/* 确认按钮 */
|
|
14
|
+
&__confirm {
|
|
15
|
+
padding: 7px 18px;
|
|
24
16
|
}
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
line-height: 40px;
|
|
32
|
-
font-weight: bold;
|
|
33
|
-
}
|
|
18
|
+
/* 头部样式 */
|
|
19
|
+
&-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
padding-bottom: 4px;
|
|
34
23
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
&__title {
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
color: $hy-color-title;
|
|
27
|
+
text-align: center;
|
|
28
|
+
height: 42px;
|
|
29
|
+
line-height: 42px;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
}
|
|
38
32
|
|
|
39
|
-
&
|
|
40
|
-
font-size:
|
|
41
|
-
color: $
|
|
42
|
-
|
|
43
|
-
flex: 1;
|
|
33
|
+
&__subtitle {
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
color: $hy-color-hint;
|
|
36
|
+
height: 40px;
|
|
44
37
|
text-align: center;
|
|
38
|
+
line-height: 40px;
|
|
39
|
+
font-weight: bold;
|
|
45
40
|
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
42
|
+
&__weekdays {
|
|
43
|
+
@include flex;
|
|
44
|
+
justify-content: space-between;
|
|
53
45
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
text-align: center;
|
|
63
|
-
font-weight: bold;
|
|
46
|
+
&__weekday {
|
|
47
|
+
font-size: 13px;
|
|
48
|
+
color: $hy-tips-color;
|
|
49
|
+
line-height: 30px;
|
|
50
|
+
flex: 1;
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
64
54
|
}
|
|
65
55
|
|
|
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
56
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
57
|
+
&-month {
|
|
58
|
+
&__title {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
line-height: 42px;
|
|
63
|
+
height: 42px;
|
|
64
|
+
color: $hy-color-hint;
|
|
65
|
+
text-align: center;
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* 内容样式 */
|
|
70
|
+
&-wrapper {
|
|
71
|
+
margin-top: 4px;
|
|
85
72
|
}
|
|
86
73
|
|
|
87
|
-
&
|
|
74
|
+
&__days {
|
|
75
|
+
position: relative;
|
|
88
76
|
@include flex;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
flex: 1;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
|
|
79
|
+
&__month-mark-wrapper {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 0;
|
|
82
|
+
bottom: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
right: 0;
|
|
98
85
|
@include flex;
|
|
99
|
-
align-items: center;
|
|
100
86
|
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
|
-
}
|
|
87
|
+
align-items: center;
|
|
112
88
|
|
|
113
|
-
&
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
font-size: 10px;
|
|
119
|
-
text-align: center;
|
|
120
|
-
left: 0;
|
|
121
|
-
right: 0;
|
|
89
|
+
&__text {
|
|
90
|
+
font-size: 155px;
|
|
91
|
+
color: $hy-info-dark;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
122
94
|
|
|
123
|
-
|
|
124
|
-
|
|
95
|
+
&__day {
|
|
96
|
+
@include flex;
|
|
97
|
+
padding: 2px;
|
|
98
|
+
/* #ifndef APP-NVUE */
|
|
99
|
+
// vue下使用css进行宽度计算,因为某些安卓机会无法进行js获取父元素宽度进行计算得出,会有偏移
|
|
100
|
+
width: calc(100% / 7);
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
/* #endif */
|
|
103
|
+
|
|
104
|
+
&__select {
|
|
105
|
+
flex: 1;
|
|
106
|
+
@include flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
position: relative;
|
|
110
|
+
|
|
111
|
+
&__dot {
|
|
112
|
+
width: 7px;
|
|
113
|
+
height: 7px;
|
|
114
|
+
border-radius: 100px;
|
|
115
|
+
background-color: $hy-error;
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: 12px;
|
|
118
|
+
right: 7px;
|
|
125
119
|
}
|
|
126
120
|
|
|
127
|
-
|
|
128
|
-
color:
|
|
121
|
+
&__buttom-info {
|
|
122
|
+
color: $hy-color-hint;
|
|
123
|
+
text-align: center;
|
|
124
|
+
position: absolute;
|
|
125
|
+
bottom: 5px;
|
|
126
|
+
font-size: 10px;
|
|
127
|
+
text-align: center;
|
|
128
|
+
left: 0;
|
|
129
|
+
right: 0;
|
|
130
|
+
|
|
131
|
+
&--selected {
|
|
132
|
+
color: #ffffff;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&--disabled {
|
|
136
|
+
color: #cacbcd;
|
|
137
|
+
}
|
|
129
138
|
}
|
|
130
|
-
}
|
|
131
139
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
&__info {
|
|
141
|
+
text-align: center;
|
|
142
|
+
font-size: 16px;
|
|
135
143
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
144
|
+
&--selected {
|
|
145
|
+
color: #ffffff;
|
|
146
|
+
}
|
|
139
147
|
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
&--disabled {
|
|
149
|
+
color: $hy-info-dark;
|
|
150
|
+
}
|
|
142
151
|
}
|
|
143
|
-
}
|
|
144
152
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
&--selected {
|
|
154
|
+
background-color: var(--hy-theme-dark, $hy-primary);
|
|
155
|
+
@include flex;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
align-items: center;
|
|
158
|
+
flex: 1;
|
|
159
|
+
border-radius: 3px;
|
|
160
|
+
}
|
|
153
161
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
162
|
+
&--range-selected {
|
|
163
|
+
opacity: 0.3;
|
|
164
|
+
border-radius: 0;
|
|
165
|
+
}
|
|
158
166
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
167
|
+
&--range-start-selected {
|
|
168
|
+
border-top-right-radius: 0;
|
|
169
|
+
border-bottom-right-radius: 0;
|
|
170
|
+
}
|
|
163
171
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
&--range-end-selected {
|
|
173
|
+
border-top-left-radius: 0;
|
|
174
|
+
border-bottom-left-radius: 0;
|
|
175
|
+
}
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
178
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
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
28
|
:class="[
|
|
29
|
-
item1.selected && '
|
|
29
|
+
item1.selected && 'hy-calendar-month__days__day__select--selected',
|
|
30
30
|
]"
|
|
31
31
|
>
|
|
32
32
|
<view
|
|
33
|
-
class="
|
|
33
|
+
class="hy-calendar-month__days__day__select"
|
|
34
34
|
:style="[daySelectStyle(index, index1, item1)]"
|
|
35
35
|
>
|
|
36
36
|
<text
|
|
37
|
-
class="
|
|
37
|
+
class="hy-calendar-month__days__day__select__info"
|
|
38
38
|
:class="[
|
|
39
39
|
item1.disabled || isForbid(item1)
|
|
40
|
-
? '
|
|
40
|
+
? 'hy-calendar-month__days__day__select__info--disabled'
|
|
41
41
|
: '',
|
|
42
42
|
]"
|
|
43
43
|
:style="[textStyle(item1)]"
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
>
|
|
46
46
|
<text
|
|
47
47
|
v-if="getBottomInfo(index, index1, item1)"
|
|
48
|
-
class="
|
|
48
|
+
class="hy-calendar-month__days__day__select__buttom-info"
|
|
49
49
|
:class="[
|
|
50
50
|
item1.disabled || isForbid(item1)
|
|
51
|
-
? '
|
|
51
|
+
? 'hy-calendar-month__days__day__select__buttom-info--disabled'
|
|
52
52
|
: '',
|
|
53
53
|
]"
|
|
54
54
|
:style="[textStyle(item1)]"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
>
|
|
57
57
|
<text
|
|
58
58
|
v-if="item1.dot"
|
|
59
|
-
class="
|
|
59
|
+
class="hy-calendar-month__days__day__select__dot"
|
|
60
60
|
></text>
|
|
61
61
|
</view>
|
|
62
62
|
</view>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
import { addUnit, colorGradient, deepClone, getRect, sleep } from "../../utils";
|
|
70
70
|
import dayjs from "dayjs/esm/index";
|
|
71
71
|
export default {
|
|
72
|
-
name: "
|
|
72
|
+
name: "hy-calendar-month",
|
|
73
73
|
props: {
|
|
74
74
|
// 是否显示月份背景色
|
|
75
75
|
showMark: {
|
|
@@ -363,7 +363,7 @@ export default {
|
|
|
363
363
|
// 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度
|
|
364
364
|
getWrapperWidth() {
|
|
365
365
|
// #ifndef APP-NVUE
|
|
366
|
-
getRect(".
|
|
366
|
+
getRect(".hy-calendar-month-wrapper").then((size) => {
|
|
367
367
|
this.width = size.width;
|
|
368
368
|
});
|
|
369
369
|
// #endif
|
|
@@ -371,7 +371,7 @@ export default {
|
|
|
371
371
|
getMonthRect() {
|
|
372
372
|
// 获取每个月份数据的尺寸,用于父组件在scroll-view滚动事件中,监听当前滚动到了第几个月份
|
|
373
373
|
const promiseAllArr = this.months.map((item, index) =>
|
|
374
|
-
this.getMonthRectByPromise(`
|
|
374
|
+
this.getMonthRectByPromise(`hy-calendar-month-${index}`),
|
|
375
375
|
);
|
|
376
376
|
// 一次性返回
|
|
377
377
|
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,7 +1,17 @@
|
|
|
1
1
|
@use "../../libs/css/mixin.scss" as *;
|
|
2
2
|
@use "../../theme.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme){
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
@include b(card) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
background-color: $hy-dark-background--container;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@include b(card) {
|
|
5
15
|
position: relative;
|
|
6
16
|
overflow: hidden;
|
|
7
17
|
font-size: 28rpx;
|
|
@@ -27,7 +37,6 @@
|
|
|
27
37
|
}
|
|
28
38
|
|
|
29
39
|
&--left {
|
|
30
|
-
color: #303133ff;
|
|
31
40
|
display: flex;
|
|
32
41
|
|
|
33
42
|
&__thumb {
|
|
@@ -36,8 +45,7 @@
|
|
|
36
45
|
|
|
37
46
|
&__title {
|
|
38
47
|
max-width: 400rpx;
|
|
39
|
-
|
|
40
|
-
@include line-feed;
|
|
48
|
+
@include lineEllipsis;
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
|
|
@@ -46,12 +54,4 @@
|
|
|
46
54
|
margin-left: 6rpx;
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
|
-
|
|
50
|
-
&__body {
|
|
51
|
-
color: $hy-bg-color;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&__foot {
|
|
55
|
-
color: $hy-text-color-grey;
|
|
56
|
-
}
|
|
57
57
|
}
|
|
@@ -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
|
/**
|