hy-app 0.1.4 → 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 +31 -10
- package/components/hy-address-picker/index.scss +1 -1
- package/components/hy-address-picker/props.ts +1 -3
- package/components/hy-address-picker/typing.d.ts +4 -11
- package/components/hy-avatar/hy-avatar.vue +11 -0
- package/components/hy-avatar/index.scss +8 -8
- package/components/hy-avatar/typing.d.ts +1 -1
- package/components/hy-back-top/hy-back-top.vue +27 -2
- package/components/hy-back-top/index.scss +11 -1
- package/components/hy-back-top/props.ts +1 -6
- package/components/hy-back-top/typing.d.ts +4 -7
- package/components/hy-badge/hy-badge.vue +11 -0
- package/components/hy-badge/index.scss +18 -40
- package/components/hy-badge/typing.d.ts +1 -1
- package/components/hy-button/hy-button.vue +44 -17
- package/components/hy-button/index.scss +25 -45
- package/components/hy-button/props.ts +1 -2
- package/components/hy-button/typing.d.ts +4 -7
- 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-calendar/typing.d.ts +1 -1
- 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-card/typing.d.ts +1 -1
- package/components/hy-cell/hy-cell.vue +57 -19
- package/components/hy-cell/index.scss +55 -28
- package/components/hy-cell/props.ts +4 -5
- package/components/hy-cell/typing.d.ts +11 -21
- package/components/hy-check-button/hy-check-button.vue +13 -2
- package/components/hy-check-button/index.scss +0 -5
- package/components/hy-check-button/typing.d.ts +1 -1
- package/components/hy-checkbox/hy-checkbox.vue +34 -10
- package/components/hy-checkbox/index.scss +15 -5
- package/components/hy-checkbox/props.ts +2 -3
- package/components/hy-checkbox/typing.d.ts +3 -3
- 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-down/typing.d.ts +1 -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-count-to/typing.d.ts +1 -3
- package/components/hy-datetime-picker/hy-datetime-picker.vue +29 -14
- package/components/hy-datetime-picker/index.scss +1 -1
- package/components/hy-datetime-picker/props.ts +1 -3
- package/components/hy-datetime-picker/typing.d.ts +6 -13
- package/components/hy-divider/hy-divider.vue +11 -0
- package/components/hy-divider/index.scss +1 -1
- package/components/hy-divider/typing.d.ts +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/typing.d.ts +1 -1
- package/components/hy-dropdown-item/hy-dropdown-item.vue +21 -3
- package/components/hy-dropdown-item/index.scss +35 -2
- package/components/hy-dropdown-item/typing.d.ts +1 -3
- 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 +4 -19
- 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-float-button/typing.d.ts +1 -1
- package/components/hy-folding-panel/hy-folding-panel.vue +11 -0
- package/components/hy-folding-panel/index.scss +4 -1
- package/components/hy-folding-panel/typing.d.ts +1 -1
- package/components/hy-form/hy-form.vue +214 -36
- package/components/hy-form/index.scss +13 -3
- package/components/hy-form/props.ts +0 -2
- package/components/hy-form/typing.d.ts +25 -7
- package/components/hy-grid/hy-grid.vue +27 -5
- package/components/hy-grid/index.scss +1 -1
- package/components/hy-grid/props.ts +1 -3
- package/components/hy-grid/typing.d.ts +13 -16
- package/components/hy-icon/hy-icon.vue +17 -10
- package/components/hy-icon/index.scss +16 -7
- package/components/hy-icon/props.ts +2 -2
- package/components/hy-icon/typing.d.ts +1 -1
- package/components/hy-image/hy-image.vue +11 -0
- package/components/hy-image/index.scss +4 -3
- package/components/hy-image/typing.d.ts +1 -1
- package/components/hy-input/hy-input.vue +58 -19
- package/components/hy-input/index.scss +12 -2
- package/components/hy-input/props.ts +3 -5
- package/components/hy-input/typing.d.ts +13 -12
- package/components/hy-line/hy-line.vue +11 -0
- package/components/hy-line/index.scss +4 -1
- package/components/hy-line/typing.d.ts +1 -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 +5 -1
- package/components/hy-list/hy-list.vue +23 -8
- package/components/hy-list/index.scss +1 -4
- package/components/hy-list/typing.d.ts +1 -1
- package/components/hy-loading/hy-loading.vue +11 -0
- package/components/hy-loading/index.scss +2 -2
- package/components/hy-loading/typing.d.ts +1 -2
- package/components/hy-login/TheUserLogin.vue +63 -106
- package/components/hy-login/hy-login.vue +15 -10
- package/components/hy-login/props.ts +1 -1
- package/components/hy-login/typing.d.ts +6 -1
- package/components/hy-modal/hy-modal.vue +15 -7
- package/components/hy-modal/index.scss +19 -3
- package/components/hy-modal/typing.d.ts +1 -1
- 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-navbar/typing.d.ts +1 -2
- package/components/hy-notice-bar/hy-notice-bar.vue +11 -0
- package/components/hy-notice-bar/index.scss +35 -35
- package/components/hy-notice-bar/typing.d.ts +1 -1
- package/components/hy-number-step/hy-number-step.vue +40 -18
- package/components/hy-number-step/index.scss +34 -25
- package/components/hy-number-step/props.ts +4 -4
- package/components/hy-number-step/typing.d.ts +8 -3
- package/components/hy-overlay/index.scss +3 -1
- package/components/hy-overlay/typing.d.ts +1 -1
- package/components/hy-parse/typing.d.ts +1 -1
- package/components/hy-picker/hy-picker.vue +30 -8
- package/components/hy-picker/index.scss +7 -3
- package/components/hy-picker/props.ts +2 -5
- package/components/hy-picker/typing.d.ts +4 -15
- package/components/hy-popup/hy-popup.vue +11 -0
- package/components/hy-popup/index.scss +10 -1
- package/components/hy-popup/typing.d.ts +1 -1
- package/components/hy-price/hy-price.vue +11 -0
- package/components/hy-price/index.scss +4 -1
- package/components/hy-price/typing.d.ts +1 -1
- package/components/hy-qrcode/hy-qrcode.vue +11 -0
- package/components/hy-qrcode/index.scss +4 -1
- package/components/hy-qrcode/typing.d.ts +1 -1
- package/components/hy-radio/hy-radio.vue +25 -5
- package/components/hy-radio/index.scss +17 -5
- package/components/hy-radio/props.ts +2 -3
- package/components/hy-radio/typing.d.ts +2 -2
- package/components/hy-rate/hy-rate.vue +11 -0
- package/components/hy-rate/index.scss +6 -6
- package/components/hy-rate/typing.d.ts +1 -1
- 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-read-more/typing.d.ts +1 -1
- 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-scroll-list/typing.d.ts +1 -1
- package/components/hy-search/hy-search.vue +23 -3
- package/components/hy-search/index.scss +25 -4
- package/components/hy-search/props.ts +3 -5
- package/components/hy-search/typing.d.ts +6 -13
- 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-slider/typing.d.ts +1 -1
- package/components/hy-status-bar/typing.d.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-steps/typing.d.ts +1 -1
- 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-submitBar → hy-submit-bar}/typing.d.ts +1 -1
- 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-subsection/typing.d.ts +1 -1
- package/components/hy-swipe-action/typing.d.ts +1 -1
- package/components/hy-swiper/hy-swiper.vue +11 -0
- package/components/hy-swiper/index.scss +13 -2
- package/components/hy-swiper/typing.d.ts +2 -5
- package/components/hy-switch/hy-switch.vue +28 -5
- package/components/hy-switch/index.scss +25 -7
- package/components/hy-switch/props.ts +1 -3
- package/components/hy-switch/typing.d.ts +6 -5
- 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-tabs/typing.d.ts +1 -1
- package/components/hy-tag/hy-tag.vue +38 -22
- package/components/hy-tag/index.scss +27 -115
- package/components/hy-tag/props.ts +1 -2
- package/components/hy-tag/typing.d.ts +3 -10
- package/components/hy-text/hy-text.vue +12 -1
- package/components/hy-text/index.scss +20 -37
- package/components/hy-text/typing.d.ts +1 -1
- package/components/hy-textarea/hy-textarea.vue +17 -6
- package/components/hy-textarea/index.scss +16 -5
- package/components/hy-textarea/typing.d.ts +2 -2
- package/components/hy-toast/hy-toast.vue +13 -2
- package/components/hy-toast/index.scss +26 -26
- package/components/hy-toast/typing.d.ts +1 -1
- 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-tooltip/typing.d.ts +1 -1
- package/components/hy-transition/typing.d.ts +1 -1
- package/components/hy-upload/hy-upload.vue +11 -0
- package/components/hy-upload/index.scss +12 -1
- package/components/hy-upload/typing.d.ts +1 -1
- package/components/hy-warn/hy-warn.vue +22 -11
- package/components/hy-warn/index.scss +46 -1
- package/components/hy-warn/typing.d.ts +1 -1
- package/components/hy-waterfall/hy-waterfall.vue +11 -0
- package/components/hy-waterfall/index.scss +1 -1
- package/components/hy-waterfall/typing.d.ts +1 -3
- package/components/index.ts +2 -2
- package/config/icon.ts +4 -0
- package/libs/css/common.scss +9 -0
- package/libs/css/mixin.scss +78 -0
- package/package.json +3 -3
- package/public/font/iconfont.css +3 -3
- package/store/userInfo.ts +26 -25
- package/theme.scss +76 -60
- package/typing/modules/common.d.ts +5 -1
- package/typing/modules/form.ts +29 -14
- 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
|
@@ -20,6 +20,17 @@
|
|
|
20
20
|
</view>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
export default {
|
|
25
|
+
name: 'hy-qrcode',
|
|
26
|
+
options: {
|
|
27
|
+
addGlobalClass: true,
|
|
28
|
+
virtualHost: true,
|
|
29
|
+
styleIsolation: 'shared'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
23
34
|
<script setup lang="ts">
|
|
24
35
|
import { getCurrentInstance, toRefs, ref, onMounted } from "vue";
|
|
25
36
|
import defaultProps from "./props";
|
|
@@ -49,6 +49,17 @@
|
|
|
49
49
|
</view>
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
export default {
|
|
54
|
+
name: 'hy-radio',
|
|
55
|
+
options: {
|
|
56
|
+
addGlobalClass: true,
|
|
57
|
+
virtualHost: true,
|
|
58
|
+
styleIsolation: 'shared'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
|
|
52
63
|
<script setup lang="ts">
|
|
53
64
|
import type IProps from "./typing";
|
|
54
65
|
import type { CheckboxColumnsVo } from "../hy-check-button/typing";
|
|
@@ -81,6 +92,7 @@ const {
|
|
|
81
92
|
borderBottom,
|
|
82
93
|
placement,
|
|
83
94
|
iconColor,
|
|
95
|
+
labelDisabled,
|
|
84
96
|
} = toRefs(props);
|
|
85
97
|
const emit = defineEmits(["change", "update:modelValue"]);
|
|
86
98
|
|
|
@@ -153,8 +165,11 @@ const iconClasses = computed(() => {
|
|
|
153
165
|
if (isDisabled(temp?.disabled)) {
|
|
154
166
|
classes.push("hy-radio__icon-wrap--disabled");
|
|
155
167
|
}
|
|
156
|
-
if (temp[fieldNames.value.checked]
|
|
157
|
-
classes.push("hy-radio__icon-wrap--
|
|
168
|
+
if (temp[fieldNames.value.checked]) {
|
|
169
|
+
classes.push("hy-radio__icon-wrap--checked");
|
|
170
|
+
if (isDisabled(temp?.disabled)) {
|
|
171
|
+
classes.push("hy-radio__icon-wrap--disabled--checked");
|
|
172
|
+
}
|
|
158
173
|
}
|
|
159
174
|
return classes;
|
|
160
175
|
};
|
|
@@ -170,7 +185,9 @@ const iconWrapStyle = computed(() => {
|
|
|
170
185
|
style.backgroundColor =
|
|
171
186
|
temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
|
|
172
187
|
? activeColor.value
|
|
173
|
-
:
|
|
188
|
+
: !isDisabled(temp?.disabled)
|
|
189
|
+
? "#ffffff"
|
|
190
|
+
: "";
|
|
174
191
|
style.borderColor =
|
|
175
192
|
temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
|
|
176
193
|
? activeColor.value
|
|
@@ -190,9 +207,12 @@ const iconClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
|
190
207
|
setRadioCheckedStatus(temp);
|
|
191
208
|
}
|
|
192
209
|
};
|
|
210
|
+
/**
|
|
211
|
+
* @description 点击整体
|
|
212
|
+
* */
|
|
193
213
|
const wrapperClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
194
214
|
e.stopPropagation();
|
|
195
|
-
if (!isDisabled(temp?.disabled)) {
|
|
215
|
+
if (!isDisabled(temp?.disabled) || !labelDisabled.value) {
|
|
196
216
|
setRadioCheckedStatus(temp);
|
|
197
217
|
}
|
|
198
218
|
};
|
|
@@ -201,7 +221,7 @@ const wrapperClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
|
201
221
|
* */
|
|
202
222
|
const labelClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
203
223
|
e.stopPropagation();
|
|
204
|
-
if (!isDisabled(temp?.disabled)) {
|
|
224
|
+
if (!isDisabled(temp?.disabled) || !labelDisabled.value) {
|
|
205
225
|
setRadioCheckedStatus(temp);
|
|
206
226
|
}
|
|
207
227
|
};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme){
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
@include b(radio__label-wrap) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include b(radio) {
|
|
5
14
|
@include flex(row);
|
|
6
15
|
overflow: hidden;
|
|
7
16
|
flex-direction: row;
|
|
@@ -64,17 +73,19 @@
|
|
|
64
73
|
}
|
|
65
74
|
|
|
66
75
|
&--checked {
|
|
67
|
-
color:
|
|
76
|
+
color: #FFFFFF;
|
|
68
77
|
background-color: $hy-primary;
|
|
69
78
|
border-color: $hy-primary;
|
|
70
79
|
}
|
|
71
80
|
|
|
72
81
|
&--disabled {
|
|
73
|
-
background-color: $hy-
|
|
82
|
+
background-color: $hy-light-background-disabled;
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
&--disabled--checked {
|
|
77
|
-
color: $hy-
|
|
86
|
+
background-color: $hy-primary;
|
|
87
|
+
border-color: $hy-primary;
|
|
88
|
+
opacity: 0.5;
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
|
|
@@ -82,7 +93,8 @@
|
|
|
82
93
|
/* #ifndef APP-NVUE */
|
|
83
94
|
word-wrap: break-word;
|
|
84
95
|
/* #endif */
|
|
85
|
-
color:
|
|
96
|
+
color:
|
|
97
|
+
$hy-light-color;
|
|
86
98
|
font-size: $hy-font-size-base;
|
|
87
99
|
margin-right: $hy-border-margin-padding-sm;
|
|
88
100
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type IProps from "./typing";
|
|
2
|
-
import { ColorConfig } from "../../config";
|
|
3
2
|
|
|
4
3
|
const defaultProps: IProps = {
|
|
5
4
|
modelValue: "",
|
|
@@ -12,7 +11,7 @@ const defaultProps: IProps = {
|
|
|
12
11
|
shape: "circle",
|
|
13
12
|
size: "medium",
|
|
14
13
|
disabled: false,
|
|
15
|
-
activeColor:
|
|
14
|
+
activeColor: "",
|
|
16
15
|
inactiveColor: "#c8c9cc",
|
|
17
16
|
iconSize: "20",
|
|
18
17
|
iconColor: "",
|
|
@@ -21,7 +20,7 @@ const defaultProps: IProps = {
|
|
|
21
20
|
label: "",
|
|
22
21
|
labelSize: "",
|
|
23
22
|
labelColor: "",
|
|
24
|
-
labelDisabled:
|
|
23
|
+
labelDisabled: false,
|
|
25
24
|
placement: "row",
|
|
26
25
|
};
|
|
27
26
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
2
|
import { CheckboxColumnsVo, IFieldNames } from "../hy-check-button/typing";
|
|
3
3
|
|
|
4
|
-
export default interface
|
|
4
|
+
export default interface HyRadioProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description 双向绑定值,数组类型
|
|
7
7
|
* */
|
|
@@ -73,7 +73,7 @@ export default interface IProps {
|
|
|
73
73
|
/**
|
|
74
74
|
* @description 是否禁止点击提示语选中复选框
|
|
75
75
|
* */
|
|
76
|
-
labelDisabled?:
|
|
76
|
+
labelDisabled?: boolean;
|
|
77
77
|
/**
|
|
78
78
|
* @description 定义需要用到的外部样式
|
|
79
79
|
* */
|
|
@@ -62,6 +62,17 @@
|
|
|
62
62
|
</view>
|
|
63
63
|
</template>
|
|
64
64
|
|
|
65
|
+
<script lang="ts">
|
|
66
|
+
export default {
|
|
67
|
+
name: 'hy-rate',
|
|
68
|
+
options: {
|
|
69
|
+
addGlobalClass: true,
|
|
70
|
+
virtualHost: true,
|
|
71
|
+
styleIsolation: 'shared'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
65
76
|
<script setup lang="ts">
|
|
66
77
|
import { addUnit, getRect, guid, range, sleep } from "../../utils";
|
|
67
78
|
import { ref, watch, toRefs, onMounted, getCurrentInstance } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use "../../libs/css/mixin.scss" as *;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
@include b(rate) {
|
|
4
4
|
@include flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
margin: 0;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
/* #ifndef APP-NVUE */
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
/* #endif */
|
|
33
|
-
}
|
|
29
|
+
//.hy-icon {
|
|
30
|
+
// /* #ifndef APP-NVUE */
|
|
31
|
+
// box-sizing: border-box;
|
|
32
|
+
// /* #endif */
|
|
33
|
+
//}
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
</view>
|
|
20
20
|
</view>
|
|
21
21
|
<view
|
|
22
|
-
class="
|
|
22
|
+
:class="[
|
|
23
|
+
'hy-read-more__toggle',
|
|
24
|
+
status !== 'open' && 'hy-read-more__toggle--mask',
|
|
25
|
+
]"
|
|
23
26
|
:style="[innerShadowStyle]"
|
|
24
27
|
v-if="isLongContent"
|
|
25
28
|
>
|
|
@@ -47,8 +50,26 @@
|
|
|
47
50
|
</view>
|
|
48
51
|
</template>
|
|
49
52
|
|
|
53
|
+
<script lang="ts">
|
|
54
|
+
export default {
|
|
55
|
+
name: 'hy-read-more',
|
|
56
|
+
options: {
|
|
57
|
+
addGlobalClass: true,
|
|
58
|
+
virtualHost: true,
|
|
59
|
+
styleIsolation: 'shared'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
50
64
|
<script setup lang="ts">
|
|
51
|
-
import {
|
|
65
|
+
import {
|
|
66
|
+
computed,
|
|
67
|
+
type CSSProperties,
|
|
68
|
+
toRefs,
|
|
69
|
+
ref,
|
|
70
|
+
onMounted,
|
|
71
|
+
getCurrentInstance,
|
|
72
|
+
} from "vue";
|
|
52
73
|
import defaultProps from "./props";
|
|
53
74
|
import type IProps from "./typing";
|
|
54
75
|
import { addUnit, getRect, guid, sleep } from "../../utils";
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme){
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
@include b(read-more) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
&__toggle--mask {
|
|
10
|
+
background-image:
|
|
11
|
+
linear-gradient(-180deg, rgba(0, 0, 0, 0) 0%, $hy-dark-background 80%);
|
|
12
|
+
padding-top: 100px;
|
|
13
|
+
margin-top: -100px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include b(read-more) {
|
|
5
20
|
&__content {
|
|
6
21
|
overflow: hidden;
|
|
7
|
-
color: $hy-color-paragraph;
|
|
8
22
|
font-size: 15px;
|
|
9
23
|
text-align: left;
|
|
10
24
|
transition: height 0.3s ease;
|
|
@@ -15,11 +29,24 @@
|
|
|
15
29
|
justify-content: center;
|
|
16
30
|
position: relative;
|
|
17
31
|
|
|
32
|
+
&--mask {
|
|
33
|
+
background-image:
|
|
34
|
+
linear-gradient(-180deg, rgba(0, 0, 0, 0) 0%, #fff 80%);
|
|
35
|
+
padding-top: 100px;
|
|
36
|
+
margin-top: -100px;
|
|
37
|
+
}
|
|
38
|
+
|
|
18
39
|
&__text {
|
|
19
40
|
@include flex;
|
|
20
41
|
align-items: center;
|
|
21
42
|
justify-content: center;
|
|
22
43
|
margin-top: 5px;
|
|
44
|
+
color: $hy-primary;
|
|
45
|
+
:deep() {
|
|
46
|
+
@include b(icon) {
|
|
47
|
+
color: $hy-primary;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
23
50
|
}
|
|
24
51
|
}
|
|
25
52
|
}
|
|
@@ -5,16 +5,11 @@ const defaultProps: IProps = {
|
|
|
5
5
|
toggle: true,
|
|
6
6
|
closeText: "展开阅读全文",
|
|
7
7
|
openText: "收起",
|
|
8
|
-
color: "
|
|
8
|
+
color: "",
|
|
9
9
|
fontSize: 14,
|
|
10
10
|
textIndent: "2em",
|
|
11
11
|
name: "",
|
|
12
|
-
shadowStyle: {
|
|
13
|
-
backgroundImage:
|
|
14
|
-
"linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)",
|
|
15
|
-
paddingTop: "100px",
|
|
16
|
-
marginTop: "-100px",
|
|
17
|
-
},
|
|
12
|
+
shadowStyle: {},
|
|
18
13
|
};
|
|
19
14
|
|
|
20
15
|
export default defaultProps;
|
|
@@ -19,11 +19,7 @@
|
|
|
19
19
|
<slot></slot>
|
|
20
20
|
</scroll-view>
|
|
21
21
|
<!-- #endif -->
|
|
22
|
-
<view
|
|
23
|
-
class="hy-scroll-list__indicator"
|
|
24
|
-
v-if="indicator"
|
|
25
|
-
:style="indicatorStyle"
|
|
26
|
-
>
|
|
22
|
+
<view class="hy-scroll-list__indicator" v-if="indicator">
|
|
27
23
|
<view class="hy-scroll-list__indicator__line" :style="lineStyle">
|
|
28
24
|
<view
|
|
29
25
|
class="hy-scroll-list__indicator__line__bar"
|
|
@@ -36,11 +32,29 @@
|
|
|
36
32
|
</view>
|
|
37
33
|
</template>
|
|
38
34
|
|
|
35
|
+
<script lang="ts">
|
|
36
|
+
export default {
|
|
37
|
+
name: 'hy-scroll-list',
|
|
38
|
+
options: {
|
|
39
|
+
addGlobalClass: true,
|
|
40
|
+
virtualHost: true,
|
|
41
|
+
styleIsolation: 'shared'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
39
46
|
<script setup lang="ts">
|
|
40
|
-
import {
|
|
47
|
+
import {
|
|
48
|
+
computed,
|
|
49
|
+
type CSSProperties,
|
|
50
|
+
toRefs,
|
|
51
|
+
ref,
|
|
52
|
+
onMounted,
|
|
53
|
+
getCurrentInstance,
|
|
54
|
+
} from "vue";
|
|
41
55
|
import defaultProps from "./props";
|
|
42
56
|
import type IProps from "./typing";
|
|
43
|
-
import { addUnit, getRect, sleep } from "../../utils";
|
|
57
|
+
import { addUnit, colorGradient, getRect, sleep } from "../../utils";
|
|
44
58
|
|
|
45
59
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
46
60
|
const {
|
|
@@ -59,6 +73,9 @@ const scrollInfo = ref({
|
|
|
59
73
|
const scrollWidth = ref(0);
|
|
60
74
|
const barLeft = ref(0);
|
|
61
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @description 线条样式
|
|
78
|
+
* */
|
|
62
79
|
const barStyle = computed<CSSProperties>(() => {
|
|
63
80
|
const style: CSSProperties = {};
|
|
64
81
|
style.transform = `translateX(${barLeft.value}px)`;
|
|
@@ -67,12 +84,17 @@ const barStyle = computed<CSSProperties>(() => {
|
|
|
67
84
|
style.backgroundColor = indicatorActiveColor.value;
|
|
68
85
|
return style;
|
|
69
86
|
});
|
|
70
|
-
|
|
87
|
+
/**
|
|
88
|
+
* @description 轨道样式
|
|
89
|
+
* */
|
|
71
90
|
const lineStyle = computed<CSSProperties>(() => {
|
|
72
91
|
const style: CSSProperties = {};
|
|
73
92
|
// 指示器整体的样式,需要设置其宽度和背景色
|
|
74
93
|
style.width = addUnit(indicatorWidth.value);
|
|
75
|
-
style.backgroundColor =
|
|
94
|
+
style.backgroundColor =
|
|
95
|
+
indicatorColor.value ||
|
|
96
|
+
(indicatorActiveColor.value &&
|
|
97
|
+
colorGradient(indicatorActiveColor.value)[90]);
|
|
76
98
|
return style;
|
|
77
99
|
});
|
|
78
100
|
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme){
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include b(scroll-list) {
|
|
5
12
|
padding-bottom: $hy-border-margin-padding-base;
|
|
6
13
|
|
|
7
14
|
&__scroll-view {
|
|
@@ -23,11 +30,13 @@
|
|
|
23
30
|
height: 4px;
|
|
24
31
|
border-radius: $hy-border-radius-semicircle;
|
|
25
32
|
overflow: hidden;
|
|
33
|
+
background-color: var(--hy-theme-color--light, $hy-border-color);
|
|
26
34
|
|
|
27
35
|
&__bar {
|
|
28
36
|
width: 20px;
|
|
29
37
|
height: 4px;
|
|
30
38
|
border-radius: $hy-border-radius-semicircle;
|
|
39
|
+
background-color: $hy-primary;
|
|
31
40
|
}
|
|
32
41
|
}
|
|
33
42
|
}
|
|
@@ -5,8 +5,8 @@ const defaultProps: IProps = {
|
|
|
5
5
|
indicatorWidth: 50,
|
|
6
6
|
indicatorBarWidth: 20,
|
|
7
7
|
indicator: true,
|
|
8
|
-
indicatorColor: "
|
|
9
|
-
indicatorActiveColor:
|
|
8
|
+
indicatorColor: "",
|
|
9
|
+
indicatorActiveColor: "",
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export default defaultProps;
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
<view class="hy-search__content__icon">
|
|
26
26
|
<HyIcon
|
|
27
|
+
:name="searchIcon?.name || IconConfig.SEARCH"
|
|
28
|
+
:size="searchIcon?.size"
|
|
29
|
+
:color="searchIcon?.color || color"
|
|
30
|
+
:bold="searchIcon?.bold"
|
|
31
|
+
:customPrefix="searchIcon?.customPrefix"
|
|
32
|
+
:imgMode="searchIcon?.imgMode"
|
|
33
|
+
:width="searchIcon?.width"
|
|
34
|
+
:height="searchIcon?.height"
|
|
35
|
+
:top="searchIcon?.top"
|
|
36
|
+
:stop="searchIcon?.stop"
|
|
37
|
+
:round="searchIcon?.round"
|
|
38
|
+
:customStyle="searchIcon?.customStyle"
|
|
27
39
|
@tap="clickIcon"
|
|
28
|
-
:size="searchIconSize"
|
|
29
|
-
:name="IconConfig.SEARCH"
|
|
30
|
-
:color="searchIconColor ? searchIconColor : color"
|
|
31
40
|
></HyIcon>
|
|
32
41
|
</view>
|
|
33
42
|
<input
|
|
@@ -83,6 +92,17 @@
|
|
|
83
92
|
</view>
|
|
84
93
|
</template>
|
|
85
94
|
|
|
95
|
+
<script lang="ts">
|
|
96
|
+
export default {
|
|
97
|
+
name: 'hy-search',
|
|
98
|
+
options: {
|
|
99
|
+
addGlobalClass: true,
|
|
100
|
+
virtualHost: true,
|
|
101
|
+
styleIsolation: 'shared'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
|
|
86
106
|
<script setup lang="ts">
|
|
87
107
|
import { computed, nextTick, toRefs, ref, watch } from "vue";
|
|
88
108
|
import defaultProps from "./props";
|
|
@@ -10,7 +10,25 @@ $hy-search-close-size: 20px !default;
|
|
|
10
10
|
}
|
|
11
11
|
/* #endif */
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/* 暗色主题 */
|
|
14
|
+
@include b(theme){
|
|
15
|
+
@include m(dark) {
|
|
16
|
+
@include b(search) {
|
|
17
|
+
color: $hy-dark-color;
|
|
18
|
+
&__content {
|
|
19
|
+
background-color: $hy-dark-background--empty;
|
|
20
|
+
&__input {
|
|
21
|
+
color: $hy-dark-color;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&__action {
|
|
25
|
+
color: $hy-dark-color;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include b(search) {
|
|
14
32
|
@include flex(row);
|
|
15
33
|
align-items: center;
|
|
16
34
|
flex: 1;
|
|
@@ -32,7 +50,8 @@ $hy-search-close-size: 20px !default;
|
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
&__label {
|
|
35
|
-
color:
|
|
53
|
+
color:
|
|
54
|
+
$hy-light-color;
|
|
36
55
|
font-size: $hy-font-size-base;
|
|
37
56
|
margin: 0 4px;
|
|
38
57
|
}
|
|
@@ -55,7 +74,8 @@ $hy-search-close-size: 20px !default;
|
|
|
55
74
|
font-size: $hy-font-size-base;
|
|
56
75
|
line-height: 1;
|
|
57
76
|
margin: 0 $hy-border-margin-padding-sm;
|
|
58
|
-
color:
|
|
77
|
+
color:
|
|
78
|
+
$hy-light-color;
|
|
59
79
|
|
|
60
80
|
&--placeholder {
|
|
61
81
|
color: $hy-text-color-grey;
|
|
@@ -65,7 +85,8 @@ $hy-search-close-size: 20px !default;
|
|
|
65
85
|
|
|
66
86
|
&__action {
|
|
67
87
|
font-size: $hy-font-size-base;
|
|
68
|
-
color:
|
|
88
|
+
color:
|
|
89
|
+
$hy-light-color;
|
|
69
90
|
width: 0;
|
|
70
91
|
overflow: hidden;
|
|
71
92
|
transition-property: width;
|
|
@@ -3,7 +3,7 @@ import type IProps from "./typing";
|
|
|
3
3
|
const defaultProps: IProps = {
|
|
4
4
|
modelValue: "",
|
|
5
5
|
shape: "circle",
|
|
6
|
-
bgColor: "
|
|
6
|
+
bgColor: "",
|
|
7
7
|
placeholder: "请输入关键字",
|
|
8
8
|
clear: true,
|
|
9
9
|
focus: false,
|
|
@@ -12,11 +12,9 @@ const defaultProps: IProps = {
|
|
|
12
12
|
inputAlign: "left",
|
|
13
13
|
disabled: false,
|
|
14
14
|
borderColor: "transparent",
|
|
15
|
-
|
|
16
|
-
searchIconSize: 18,
|
|
17
|
-
color: "#606266",
|
|
15
|
+
color: "",
|
|
18
16
|
placeholderColor: "#909399",
|
|
19
|
-
searchIcon:
|
|
17
|
+
searchIcon: {},
|
|
20
18
|
margin: "0",
|
|
21
19
|
animation: false,
|
|
22
20
|
maxlength: "-1",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
|
+
import type HyIconProps from "../hy-icon/typing";
|
|
2
3
|
|
|
3
|
-
export default interface
|
|
4
|
+
export default interface HySearchProps {
|
|
4
5
|
/**
|
|
5
6
|
* @description 输入框初始值
|
|
6
7
|
* */
|
|
@@ -40,11 +41,11 @@ export default interface IProps {
|
|
|
40
41
|
/**
|
|
41
42
|
* @description 输入框内容水平对齐方式 (默认 'left' )
|
|
42
43
|
* */
|
|
43
|
-
inputAlign?:
|
|
44
|
+
inputAlign?: HyApp.RowCenterType;
|
|
44
45
|
/**
|
|
45
46
|
* @description 自定义输入框样式,对象形式
|
|
46
47
|
* */
|
|
47
|
-
inputStyle?:
|
|
48
|
+
inputStyle?: CSSProperties;
|
|
48
49
|
/**
|
|
49
50
|
* @description 是否启用输入框(默认 false )
|
|
50
51
|
* */
|
|
@@ -53,14 +54,6 @@ export default interface IProps {
|
|
|
53
54
|
* @description 边框颜色,配置了颜色,才会有边框 (默认 'transparent' )
|
|
54
55
|
* */
|
|
55
56
|
borderColor?: string;
|
|
56
|
-
/**
|
|
57
|
-
* @description 搜索图标的颜色,默认同输入框字体颜色 (默认 '#909399' )
|
|
58
|
-
* */
|
|
59
|
-
searchIconColor?: string;
|
|
60
|
-
/**
|
|
61
|
-
* @description 搜索图标的字体,默认18
|
|
62
|
-
* */
|
|
63
|
-
searchIconSize?: number;
|
|
64
57
|
/**
|
|
65
58
|
* @description 输入框字体颜色(默认 '#606266' )
|
|
66
59
|
* */
|
|
@@ -70,9 +63,9 @@ export default interface IProps {
|
|
|
70
63
|
* */
|
|
71
64
|
placeholderColor?: string;
|
|
72
65
|
/**
|
|
73
|
-
* @description
|
|
66
|
+
* @description 输入框左边的图标属性集合,可以为图标名称或图片路径 (默认 'search' )
|
|
74
67
|
* */
|
|
75
|
-
searchIcon?:
|
|
68
|
+
searchIcon?: Partial<HyIconProps>;
|
|
76
69
|
/**
|
|
77
70
|
* @description 组件与其他上下左右之间的距离,带单位的字符串形式,如"30px" (默认 '0' )
|
|
78
71
|
* */
|
|
@@ -147,6 +147,17 @@
|
|
|
147
147
|
</view>
|
|
148
148
|
</template>
|
|
149
149
|
|
|
150
|
+
<script lang="ts">
|
|
151
|
+
export default {
|
|
152
|
+
name: 'hy-slider',
|
|
153
|
+
options: {
|
|
154
|
+
addGlobalClass: true,
|
|
155
|
+
virtualHost: true,
|
|
156
|
+
styleIsolation: 'shared'
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
</script>
|
|
160
|
+
|
|
150
161
|
<script setup lang="ts">
|
|
151
162
|
import {
|
|
152
163
|
computed,
|