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
|
@@ -43,6 +43,17 @@
|
|
|
43
43
|
</view>
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
|
+
<script lang="ts">
|
|
47
|
+
export default {
|
|
48
|
+
name: 'hy-notice-bar',
|
|
49
|
+
options: {
|
|
50
|
+
addGlobalClass: true,
|
|
51
|
+
virtualHost: true,
|
|
52
|
+
styleIsolation: 'shared'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
46
57
|
<script setup lang="ts">
|
|
47
58
|
import { ref, toRefs } from "vue";
|
|
48
59
|
import defaultProps from "./props";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
@include b(notice) {
|
|
6
6
|
@include flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: space-between;
|
|
@@ -52,42 +52,42 @@
|
|
|
52
52
|
}
|
|
53
53
|
/* #endif */
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
@include b(notice-bar) {
|
|
56
56
|
overflow: hidden;
|
|
57
57
|
padding: 9px 12px;
|
|
58
58
|
flex: 1;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
@include flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: space-between;
|
|
65
|
-
|
|
66
|
-
&__left-icon {
|
|
67
|
-
align-items: center;
|
|
68
|
-
margin-right: 5px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&__right-icon {
|
|
72
|
-
margin-left: 5px;
|
|
73
|
-
align-items: center;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&__swiper {
|
|
77
|
-
height: 16px;
|
|
78
|
-
@include flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
flex: 1;
|
|
81
|
-
|
|
82
|
-
&__item {
|
|
83
|
-
@include flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
|
|
87
|
-
&__text {
|
|
88
|
-
font-size: 14px;
|
|
89
|
-
color: $hy-warning;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
61
|
+
//.hy-notice {
|
|
62
|
+
// @include flex;
|
|
63
|
+
// align-items: center;
|
|
64
|
+
// justify-content: space-between;
|
|
65
|
+
//
|
|
66
|
+
// &__left-icon {
|
|
67
|
+
// align-items: center;
|
|
68
|
+
// margin-right: 5px;
|
|
69
|
+
// }
|
|
70
|
+
//
|
|
71
|
+
// &__right-icon {
|
|
72
|
+
// margin-left: 5px;
|
|
73
|
+
// align-items: center;
|
|
74
|
+
// }
|
|
75
|
+
//
|
|
76
|
+
// &__swiper {
|
|
77
|
+
// height: 16px;
|
|
78
|
+
// @include flex;
|
|
79
|
+
// align-items: center;
|
|
80
|
+
// flex: 1;
|
|
81
|
+
//
|
|
82
|
+
// &__item {
|
|
83
|
+
// @include flex;
|
|
84
|
+
// align-items: center;
|
|
85
|
+
// overflow: hidden;
|
|
86
|
+
//
|
|
87
|
+
// &__text {
|
|
88
|
+
// font-size: 14px;
|
|
89
|
+
// color: $hy-warning;
|
|
90
|
+
// }
|
|
91
|
+
// }
|
|
92
|
+
// }
|
|
93
|
+
//}
|
|
@@ -24,13 +24,20 @@
|
|
|
24
24
|
]"
|
|
25
25
|
:style="buttonStyle('minus')"
|
|
26
26
|
>
|
|
27
|
-
<
|
|
28
|
-
:name="IconConfig.MINUS"
|
|
29
|
-
:color="isDisabled('minus') ? '#c8c9cc' :
|
|
30
|
-
size="
|
|
31
|
-
bold
|
|
32
|
-
:
|
|
33
|
-
|
|
27
|
+
<HyIcon
|
|
28
|
+
:name="minusIcon?.name || IconConfig.MINUS"
|
|
29
|
+
:color="isDisabled('minus') ? '#c8c9cc' : minusIcon?.color"
|
|
30
|
+
:size="minusIcon?.size"
|
|
31
|
+
:bold="minusIcon?.bold"
|
|
32
|
+
:customPrefix="minusIcon?.customPrefix"
|
|
33
|
+
:imgMode="minusIcon?.imgMode"
|
|
34
|
+
:width="minusIcon?.width"
|
|
35
|
+
:height="minusIcon?.height"
|
|
36
|
+
:top="minusIcon?.top"
|
|
37
|
+
:stop="minusIcon?.stop"
|
|
38
|
+
:round="minusIcon?.round"
|
|
39
|
+
:customStyle="minusIcon?.customStyle"
|
|
40
|
+
></HyIcon>
|
|
34
41
|
</view>
|
|
35
42
|
<!-- 减号 -->
|
|
36
43
|
|
|
@@ -99,18 +106,36 @@
|
|
|
99
106
|
]"
|
|
100
107
|
:style="[buttonStyle('plus')]"
|
|
101
108
|
>
|
|
102
|
-
<
|
|
103
|
-
:name="IconConfig.PLUS"
|
|
104
|
-
:color="isDisabled('plus') ? '#c8c9cc' :
|
|
105
|
-
size="
|
|
106
|
-
bold
|
|
107
|
-
:
|
|
108
|
-
|
|
109
|
+
<HyIcon
|
|
110
|
+
:name="plusIcon?.name || IconConfig.PLUS"
|
|
111
|
+
:color="isDisabled('plus') ? '#c8c9cc' : plusIcon?.color"
|
|
112
|
+
:size="plusIcon?.size"
|
|
113
|
+
:bold="plusIcon?.bold"
|
|
114
|
+
:customPrefix="plusIcon?.customPrefix"
|
|
115
|
+
:imgMode="plusIcon?.imgMode"
|
|
116
|
+
:width="plusIcon?.width"
|
|
117
|
+
:height="plusIcon?.height"
|
|
118
|
+
:top="plusIcon?.top"
|
|
119
|
+
:stop="plusIcon?.stop"
|
|
120
|
+
:round="plusIcon?.round"
|
|
121
|
+
:customStyle="plusIcon?.customStyle"
|
|
122
|
+
></HyIcon>
|
|
109
123
|
</view>
|
|
110
124
|
<!-- 加号 -->
|
|
111
125
|
</view>
|
|
112
126
|
</template>
|
|
113
127
|
|
|
128
|
+
<script lang="ts">
|
|
129
|
+
export default {
|
|
130
|
+
name: 'hy-number-step',
|
|
131
|
+
options: {
|
|
132
|
+
addGlobalClass: true,
|
|
133
|
+
virtualHost: true,
|
|
134
|
+
styleIsolation: 'shared'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
|
|
114
139
|
<script setup lang="ts">
|
|
115
140
|
import {
|
|
116
141
|
computed,
|
|
@@ -125,7 +150,7 @@ import defaultProps from "./props";
|
|
|
125
150
|
import type IProps from "./typing";
|
|
126
151
|
import { addUnit } from "../../utils";
|
|
127
152
|
import { IconConfig } from "../../config";
|
|
128
|
-
import
|
|
153
|
+
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
129
154
|
|
|
130
155
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
131
156
|
const {
|
|
@@ -221,9 +246,6 @@ const buttonStyle = computed(() => {
|
|
|
221
246
|
color: color.value,
|
|
222
247
|
borderRadius: buttonRadius.value,
|
|
223
248
|
};
|
|
224
|
-
if (isDisabled.value(type)) {
|
|
225
|
-
style.backgroundColor = "#f7f8fa";
|
|
226
|
-
}
|
|
227
249
|
return style;
|
|
228
250
|
};
|
|
229
251
|
});
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
$
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
$
|
|
13
|
-
|
|
14
|
-
$
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme){
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
@include b(number-box) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
&__input,
|
|
10
|
+
&__plus,
|
|
11
|
+
&__minus {
|
|
12
|
+
background-color: $hy-dark-background--empty;
|
|
13
|
+
&--disabled {
|
|
14
|
+
color: $hy-dark-text-disabled;
|
|
15
|
+
background-color: $hy-dark-bg-disabled;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+
@include b(number-box) {
|
|
17
24
|
@include flex(row);
|
|
18
25
|
align-items: center;
|
|
19
26
|
|
|
@@ -23,8 +30,10 @@ $u-numberBox-input-disabled-bgColor: #f2f3f5 !default;
|
|
|
23
30
|
/* #endif */
|
|
24
31
|
}
|
|
25
32
|
|
|
33
|
+
&__input,
|
|
26
34
|
&__plus,
|
|
27
35
|
&__minus {
|
|
36
|
+
background-color: #EBECEE;
|
|
28
37
|
width: 35px;
|
|
29
38
|
@include flex;
|
|
30
39
|
justify-content: center;
|
|
@@ -34,38 +43,38 @@ $u-numberBox-input-disabled-bgColor: #f2f3f5 !default;
|
|
|
34
43
|
/* #endif */
|
|
35
44
|
|
|
36
45
|
&--hover {
|
|
37
|
-
background-color: $
|
|
46
|
+
background-color: $hy-light-background-hover;
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
&--disabled {
|
|
41
|
-
color: $
|
|
42
|
-
background-color: $
|
|
50
|
+
color: $hy-text-color-disable;
|
|
51
|
+
background-color: $hy-light-background-disabled;
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
&__plus {
|
|
47
|
-
border-top-right-radius:
|
|
48
|
-
border-bottom-right-radius:
|
|
56
|
+
border-top-right-radius: 4px;
|
|
57
|
+
border-bottom-right-radius: 4px;
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
&__minus {
|
|
52
|
-
border-top-left-radius:
|
|
53
|
-
border-bottom-left-radius:
|
|
61
|
+
border-top-left-radius: 4px;
|
|
62
|
+
border-bottom-left-radius: 4px;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
&__input {
|
|
57
66
|
position: relative;
|
|
58
|
-
text-align:
|
|
59
|
-
font-size:
|
|
60
|
-
padding:
|
|
61
|
-
margin:
|
|
67
|
+
text-align: center;
|
|
68
|
+
font-size: 15px;
|
|
69
|
+
padding: 0;
|
|
70
|
+
margin: 0 2px;
|
|
62
71
|
@include flex;
|
|
63
72
|
align-items: center;
|
|
64
73
|
justify-content: center;
|
|
65
74
|
|
|
66
75
|
&--disabled {
|
|
67
|
-
color:
|
|
68
|
-
background-color:
|
|
76
|
+
color: #c8c9cc;
|
|
77
|
+
background-color: #f2f3f5;
|
|
69
78
|
}
|
|
70
79
|
}
|
|
71
80
|
}
|
|
@@ -14,12 +14,12 @@ const defaultProps: IProps = {
|
|
|
14
14
|
showPlus: true,
|
|
15
15
|
decimalLength: null,
|
|
16
16
|
longPress: true,
|
|
17
|
-
color: "
|
|
17
|
+
color: "",
|
|
18
18
|
buttonWidth: 30,
|
|
19
19
|
buttonSize: 30,
|
|
20
|
-
buttonRadius: "
|
|
21
|
-
bgColor: "
|
|
22
|
-
inputBgColor: "
|
|
20
|
+
buttonRadius: "",
|
|
21
|
+
bgColor: "",
|
|
22
|
+
inputBgColor: "",
|
|
23
23
|
cursorSpacing: 100,
|
|
24
24
|
disableMinus: false,
|
|
25
25
|
disablePlus: false,
|
|
@@ -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 HyNumberStepProps {
|
|
4
5
|
/**
|
|
5
6
|
* @description 用于双向绑定的值,初始化时设置设为默认min值(最小值) (默认 0 )
|
|
6
7
|
* */
|
|
@@ -90,9 +91,13 @@ export default interface IProps {
|
|
|
90
91
|
* */
|
|
91
92
|
disablePlus?: boolean;
|
|
92
93
|
/**
|
|
93
|
-
* @description
|
|
94
|
+
* @description 减号按钮图标
|
|
94
95
|
* */
|
|
95
|
-
|
|
96
|
+
minusIcon?: Partial<HyIconProps>;
|
|
97
|
+
/**
|
|
98
|
+
* @description 加号按钮图标
|
|
99
|
+
* */
|
|
100
|
+
plusIcon?: Partial<HyIconProps>;
|
|
96
101
|
/**
|
|
97
102
|
* @description 迷你模式(默认 false )
|
|
98
103
|
* */
|
|
@@ -8,12 +8,22 @@
|
|
|
8
8
|
<slot>
|
|
9
9
|
<HyInput
|
|
10
10
|
v-model="inputLabelValue"
|
|
11
|
-
:disabled="disabled"
|
|
12
11
|
:readonly="true"
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
:
|
|
16
|
-
:
|
|
12
|
+
:disabled="input?.disabled"
|
|
13
|
+
:disabledColor="input?.disabledColor"
|
|
14
|
+
:shape="input?.shape"
|
|
15
|
+
:border="input?.border"
|
|
16
|
+
:prefixIcon="input?.prefixIcon"
|
|
17
|
+
:suffixIcon="input?.suffixIcon"
|
|
18
|
+
:color="input?.color"
|
|
19
|
+
:fontSize="input?.fontSize"
|
|
20
|
+
:inputAlign="input?.inputAlign"
|
|
21
|
+
:placeholder="input?.placeholder || '请选择'"
|
|
22
|
+
:placeholderStyle="input?.placeholderStyle"
|
|
23
|
+
:placeholderClass="input?.placeholderClass"
|
|
24
|
+
:customStyle="
|
|
25
|
+
Object.assign({ 'pointer-events': 'none' }, input?.customStyle)
|
|
26
|
+
"
|
|
17
27
|
></HyInput>
|
|
18
28
|
<div class="input-cover"></div>
|
|
19
29
|
</slot>
|
|
@@ -60,6 +70,7 @@
|
|
|
60
70
|
:style="{
|
|
61
71
|
height: `${addUnit(visibleItemCount * itemHeight)}`,
|
|
62
72
|
}"
|
|
73
|
+
maskStyle="backgroundImage: none;"
|
|
63
74
|
@change="changeHandler"
|
|
64
75
|
>
|
|
65
76
|
<picker-view-column
|
|
@@ -98,6 +109,17 @@
|
|
|
98
109
|
</view>
|
|
99
110
|
</template>
|
|
100
111
|
|
|
112
|
+
<script lang="ts">
|
|
113
|
+
export default {
|
|
114
|
+
name: 'hy-picker',
|
|
115
|
+
options: {
|
|
116
|
+
addGlobalClass: true,
|
|
117
|
+
virtualHost: true,
|
|
118
|
+
styleIsolation: 'shared'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
</script>
|
|
122
|
+
|
|
101
123
|
<script setup lang="ts">
|
|
102
124
|
import { computed, ref, toRefs, watch } from "vue";
|
|
103
125
|
import { deepClone, sleep, addUnit } from "../../utils";
|
|
@@ -112,7 +134,6 @@ import HyPopup from "../hy-popup/hy-popup.vue";
|
|
|
112
134
|
|
|
113
135
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
114
136
|
const {
|
|
115
|
-
disabled,
|
|
116
137
|
keyName,
|
|
117
138
|
closeOnClickOverlay,
|
|
118
139
|
hasInput,
|
|
@@ -120,6 +141,7 @@ const {
|
|
|
120
141
|
modelValue,
|
|
121
142
|
columns,
|
|
122
143
|
separator,
|
|
144
|
+
input,
|
|
123
145
|
} = toRefs(props);
|
|
124
146
|
const emit = defineEmits([
|
|
125
147
|
"update:show",
|
|
@@ -157,7 +179,7 @@ const setColumns = (columns: any[]) => {
|
|
|
157
179
|
* */
|
|
158
180
|
watch(
|
|
159
181
|
() => defaultIndex.value,
|
|
160
|
-
(newValue
|
|
182
|
+
(newValue) => {
|
|
161
183
|
setIndexs(newValue, true);
|
|
162
184
|
},
|
|
163
185
|
);
|
|
@@ -232,7 +254,7 @@ const inputValue = computed(() => {
|
|
|
232
254
|
* @description 显示
|
|
233
255
|
* */
|
|
234
256
|
const onShowByClickInput = () => {
|
|
235
|
-
if (!
|
|
257
|
+
if (!input.value.disabled) {
|
|
236
258
|
showByClickInput.value = !showByClickInput.value;
|
|
237
259
|
}
|
|
238
260
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
@include b(picker) {
|
|
5
6
|
position: relative;
|
|
6
7
|
&-input {
|
|
7
8
|
position: relative;
|
|
@@ -24,6 +25,10 @@
|
|
|
24
25
|
font-size: $hy-font-size-subtitle;
|
|
25
26
|
color: $hy-color-subtitle;
|
|
26
27
|
}
|
|
28
|
+
|
|
29
|
+
&--right {
|
|
30
|
+
color: $hy-primary;
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
&__view {
|
|
@@ -41,7 +46,6 @@
|
|
|
41
46
|
/* #ifndef APP-NVUE */
|
|
42
47
|
display: block;
|
|
43
48
|
/* #endif */
|
|
44
|
-
color: #303133ff;
|
|
45
49
|
|
|
46
50
|
&--disabled {
|
|
47
51
|
/* #ifndef APP-NVUE */
|
|
@@ -53,7 +57,7 @@
|
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
@include m(loading) {
|
|
57
61
|
position: absolute;
|
|
58
62
|
top: 0;
|
|
59
63
|
right: 0;
|
|
@@ -2,7 +2,6 @@ import type IProps from "./typing";
|
|
|
2
2
|
|
|
3
3
|
const defaultProps: IProps = {
|
|
4
4
|
modelValue: "",
|
|
5
|
-
disabled: false,
|
|
6
5
|
show: false,
|
|
7
6
|
popupMode: "bottom",
|
|
8
7
|
separator: "/",
|
|
@@ -14,7 +13,7 @@ const defaultProps: IProps = {
|
|
|
14
13
|
cancelText: "取消",
|
|
15
14
|
confirmText: "确定",
|
|
16
15
|
cancelColor: "#909193",
|
|
17
|
-
confirmColor: "
|
|
16
|
+
confirmColor: "",
|
|
18
17
|
visibleItemCount: 5,
|
|
19
18
|
keyName: "text",
|
|
20
19
|
closeOnClickOverlay: false,
|
|
@@ -22,10 +21,8 @@ const defaultProps: IProps = {
|
|
|
22
21
|
immediateChange: true,
|
|
23
22
|
zIndex: 10076,
|
|
24
23
|
hasInput: false,
|
|
25
|
-
|
|
24
|
+
input: {},
|
|
26
25
|
toolbarRightSlot: false,
|
|
27
|
-
shape: "square",
|
|
28
|
-
border: "surround",
|
|
29
26
|
};
|
|
30
27
|
|
|
31
28
|
export default defaultProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
|
+
import type HyInputProps from "../hy-input/typing";
|
|
2
3
|
|
|
3
4
|
interface PickerColumnVo extends AnyObject {
|
|
4
5
|
/**
|
|
@@ -11,7 +12,7 @@ interface PickerColumnVo extends AnyObject {
|
|
|
11
12
|
text?: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export default interface
|
|
15
|
+
export default interface HyPickerProps {
|
|
15
16
|
/**
|
|
16
17
|
* @description 显示到输入框值
|
|
17
18
|
* */
|
|
@@ -24,10 +25,6 @@ export default interface IProps {
|
|
|
24
25
|
* @description 是否显示弹窗(默认 false )
|
|
25
26
|
* */
|
|
26
27
|
show?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* @description 是否禁用输入框(hasInput为true可以设置)
|
|
29
|
-
* */
|
|
30
|
-
disabled?: boolean;
|
|
31
28
|
/**
|
|
32
29
|
* @description 弹窗弹出模式
|
|
33
30
|
* */
|
|
@@ -97,21 +94,13 @@ export default interface IProps {
|
|
|
97
94
|
* */
|
|
98
95
|
hasInput?: boolean;
|
|
99
96
|
/**
|
|
100
|
-
* @description
|
|
97
|
+
* @description 输入框集合属性
|
|
101
98
|
* */
|
|
102
|
-
|
|
99
|
+
input?: Partial<HyInputProps>;
|
|
103
100
|
/**
|
|
104
101
|
* @description 是否自定义选择器nav左边内容
|
|
105
102
|
* */
|
|
106
103
|
toolbarRightSlot?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* @description 输入框形状
|
|
109
|
-
* */
|
|
110
|
-
shape?: HyApp.ShapeType;
|
|
111
|
-
/**
|
|
112
|
-
* @description 输入框边框
|
|
113
|
-
* */
|
|
114
|
-
border?: HyApp.BorderType;
|
|
115
104
|
/**
|
|
116
105
|
* @description 自定义输入框外部样式
|
|
117
106
|
* */
|
|
@@ -42,6 +42,17 @@
|
|
|
42
42
|
</view>
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
|
+
<script lang="ts">
|
|
46
|
+
export default {
|
|
47
|
+
name: 'hy-popup',
|
|
48
|
+
options: {
|
|
49
|
+
addGlobalClass: true,
|
|
50
|
+
virtualHost: true,
|
|
51
|
+
styleIsolation: 'shared'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
55
|
+
|
|
45
56
|
<script setup lang="ts">
|
|
46
57
|
import { computed, type CSSProperties, ref, toRefs, watch } from "vue";
|
|
47
58
|
import defaultProps from "./props";
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme) {
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
@include b(popup__content) {
|
|
8
|
+
background-color: $hy-dark-background--2;
|
|
9
|
+
color: $hy-dark-color;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
4
13
|
|
|
5
|
-
|
|
14
|
+
@include b(popup) {
|
|
6
15
|
flex: 1;
|
|
7
16
|
|
|
8
17
|
&__content {
|
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
</text>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
export default {
|
|
21
|
+
name: 'hy-price',
|
|
22
|
+
options: {
|
|
23
|
+
addGlobalClass: true,
|
|
24
|
+
virtualHost: true,
|
|
25
|
+
styleIsolation: 'shared'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
19
30
|
<script setup lang="ts">
|
|
20
31
|
import { computed, type CSSProperties, toRefs } from "vue";
|
|
21
32
|
import defaultProps from "./props";
|