hy-app 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/http.ts +8 -8
- package/components/dialog/index.ts +2 -2
- package/components/hy-address-picker/hy-address-picker.vue +14 -42
- package/components/hy-address-picker/index.scss +27 -0
- package/components/hy-address-picker/props.ts +2 -3
- package/components/hy-address-picker/typing.d.ts +1 -2
- package/components/hy-avatar/hy-avatar.vue +10 -54
- package/components/hy-avatar/index.scss +45 -0
- package/components/hy-avatar/props.ts +2 -2
- package/components/hy-avatar/typing.d.ts +2 -2
- package/components/hy-back-top/hy-back-top.vue +7 -22
- package/components/hy-back-top/index.scss +16 -0
- package/components/hy-back-top/props.ts +4 -4
- package/components/hy-back-top/typing.d.ts +2 -3
- package/components/hy-badge/hy-badge.vue +5 -75
- package/components/hy-badge/index.scss +72 -0
- package/components/hy-badge/props.ts +2 -2
- package/components/hy-badge/typing.d.ts +2 -2
- package/components/hy-button/hy-button.vue +22 -134
- package/components/hy-button/index.scss +116 -0
- package/components/hy-button/props.ts +4 -5
- package/components/hy-button/typing.d.ts +3 -3
- package/components/hy-calendar/header.vue +76 -0
- package/components/hy-calendar/hy-calendar.vue +366 -0
- package/components/hy-calendar/index.scss +171 -0
- package/components/hy-calendar/month.vue +524 -0
- package/components/hy-calendar/props.ts +37 -0
- package/components/hy-calendar/typing.d.ts +126 -0
- package/components/hy-card/hy-card.vue +21 -84
- package/components/hy-card/index.scss +57 -0
- package/components/hy-card/props.ts +2 -2
- package/components/hy-card/typing.d.ts +1 -1
- package/components/hy-cell/hy-cell.vue +30 -131
- package/components/hy-cell/index.scss +137 -0
- package/components/hy-cell/props.ts +2 -2
- package/components/hy-cell/typing.d.ts +4 -3
- package/components/hy-check-button/hy-check-button.vue +14 -7
- package/components/hy-check-button/index.scss +5 -0
- package/components/hy-check-button/props.ts +3 -3
- package/components/hy-checkbox/hy-checkbox.vue +24 -107
- package/components/hy-checkbox/index.scss +94 -0
- package/components/hy-checkbox/props.ts +4 -5
- package/components/hy-checkbox/typing.d.ts +3 -7
- package/components/hy-count-down/hy-count-down.vue +150 -0
- package/components/hy-count-down/index.scss +6 -0
- package/components/hy-count-down/index.ts +52 -0
- package/components/hy-count-down/props.ts +10 -0
- package/components/hy-count-down/typing.d.ts +20 -0
- package/components/hy-count-to/hy-count-to.vue +213 -0
- package/components/hy-count-to/index.scss +6 -0
- package/components/hy-count-to/props.ts +17 -0
- package/components/hy-count-to/typing.d.ts +48 -0
- package/components/hy-datetime-picker/hy-datetime-picker.vue +38 -64
- package/components/hy-datetime-picker/index.scss +28 -0
- package/components/hy-datetime-picker/props.ts +2 -2
- package/components/hy-datetime-picker/typing.d.ts +1 -1
- package/components/hy-divider/hy-divider.vue +24 -49
- package/components/hy-divider/index.scss +25 -0
- package/components/hy-divider/props.ts +2 -2
- package/components/hy-divider/typing.d.ts +1 -1
- package/components/hy-dropdown/hy-dropdown.vue +43 -0
- package/components/hy-dropdown/index.scss +17 -0
- package/components/hy-dropdown/props.ts +17 -0
- package/components/hy-dropdown/typing.d.ts +48 -0
- package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
- package/components/hy-dropdown-item/index.scss +96 -0
- package/components/hy-dropdown-item/props.ts +10 -0
- package/components/hy-dropdown-item/typing.d.ts +31 -0
- package/components/hy-empty/hy-empty.vue +8 -26
- package/components/hy-empty/index.scss +19 -0
- package/components/hy-empty/props.ts +2 -2
- package/components/hy-empty/typing.d.ts +1 -1
- package/components/hy-float-button/hy-float-button.vue +201 -0
- package/components/hy-float-button/index.scss +69 -0
- package/components/hy-float-button/props.ts +25 -0
- package/components/hy-float-button/typing.d.ts +93 -0
- package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
- package/components/hy-folding-panel/index.scss +6 -0
- package/components/hy-folding-panel/props.ts +2 -2
- package/components/hy-folding-panel/typing.d.ts +2 -2
- package/components/hy-form/hy-form.vue +22 -39
- package/components/hy-form/index.scss +30 -0
- package/components/hy-form/props.ts +4 -2
- package/components/hy-form/typing.d.ts +10 -2
- package/components/hy-grid/hy-grid.vue +4 -45
- package/components/hy-grid/index.scss +40 -0
- package/components/hy-grid/props.ts +5 -5
- package/components/hy-grid/typing.d.ts +2 -2
- package/components/hy-icon/hy-icon.vue +7 -97
- package/components/hy-icon/index.scss +84 -0
- package/components/hy-icon/props.ts +5 -5
- package/components/hy-image/hy-image.vue +212 -0
- package/components/hy-image/index.scss +26 -0
- package/components/hy-image/props.ts +24 -0
- package/components/hy-image/typing.d.ts +76 -0
- package/components/hy-input/hy-input.vue +11 -82
- package/components/hy-input/index.scss +65 -0
- package/components/hy-input/props.ts +2 -2
- package/components/hy-input/typing.d.ts +2 -2
- package/components/hy-line/hy-line.vue +4 -8
- package/components/hy-line/index.scss +5 -0
- package/components/hy-line/props.ts +3 -3
- package/components/hy-line/typing.d.ts +2 -2
- package/components/hy-line-progress/hy-line-progress.vue +15 -44
- package/components/hy-line-progress/index.scss +38 -0
- package/components/hy-line-progress/props.ts +2 -2
- package/components/hy-line-progress/typing.d.ts +1 -1
- package/components/hy-list/hy-list.vue +11 -41
- package/components/hy-list/index.scss +32 -0
- package/components/hy-list/props.ts +2 -2
- package/components/hy-loading/hy-loading.vue +95 -0
- package/components/hy-loading/index.scss +103 -0
- package/components/hy-loading/props.ts +17 -0
- package/components/hy-loading/typing.d.ts +52 -0
- package/components/hy-login/TheUserLogin.vue +16 -16
- package/components/hy-login/hy-login.vue +9 -9
- package/components/hy-login/props.ts +4 -4
- package/components/hy-modal/hy-modal.vue +11 -89
- package/components/hy-modal/index.scss +77 -0
- package/components/hy-modal/props.ts +2 -2
- package/components/hy-modal/typing.d.ts +1 -1
- package/components/hy-navbar/hy-navbar.vue +20 -92
- package/components/hy-navbar/index.scss +67 -0
- package/components/hy-navbar/props.ts +2 -2
- package/components/hy-navbar/typing.d.ts +1 -1
- package/components/hy-notice-bar/hy-column-notice.vue +11 -39
- package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
- package/components/hy-notice-bar/hy-row-notice.vue +5 -56
- package/components/hy-notice-bar/index.scss +93 -0
- package/components/hy-notice-bar/props.ts +4 -2
- package/components/hy-notice-bar/typing.d.ts +13 -3
- package/components/hy-number-step/hy-number-step.vue +55 -105
- package/components/hy-number-step/index.scss +71 -0
- package/components/hy-number-step/props.ts +2 -2
- package/components/hy-number-step/typing.d.ts +1 -1
- package/components/hy-overlay/hy-overlay.vue +5 -17
- package/components/hy-overlay/index.scss +9 -0
- package/components/hy-overlay/props.ts +2 -2
- package/components/hy-overlay/typing.d.ts +1 -1
- package/components/hy-picker/hy-picker.vue +21 -87
- package/components/hy-picker/index.scss +68 -0
- package/components/hy-picker/props.ts +3 -2
- package/components/hy-picker/typing.d.ts +5 -1
- package/components/hy-popup/hy-popup.vue +7 -80
- package/components/hy-popup/index.scss +60 -0
- package/components/hy-popup/props.ts +2 -2
- package/components/hy-popup/typing.d.ts +1 -1
- package/components/hy-price/hy-price.vue +5 -15
- package/components/hy-price/index.scss +11 -0
- package/components/hy-price/props.ts +2 -2
- package/components/hy-price/typing.d.ts +1 -1
- package/components/hy-qrcode/hy-qrcode.vue +15 -37
- package/components/hy-qrcode/index.scss +23 -0
- package/components/hy-qrcode/props.ts +2 -2
- package/components/hy-qrcode/typing.d.ts +2 -2
- package/components/hy-radio/hy-radio.vue +27 -113
- package/components/hy-radio/index.scss +93 -0
- package/components/hy-radio/props.ts +4 -4
- package/components/hy-radio/typing.d.ts +2 -2
- package/components/hy-rate/hy-rate.vue +33 -53
- package/components/hy-rate/index.scss +33 -0
- package/components/hy-rate/props.ts +4 -3
- package/components/hy-rate/typing.d.ts +1 -1
- package/components/hy-read-more/hy-read-more.vue +7 -30
- package/components/hy-read-more/index.scss +25 -0
- package/components/hy-read-more/props.ts +3 -3
- package/components/hy-read-more/typing.d.ts +1 -1
- package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
- package/components/hy-safe-bottom/index.scss +5 -0
- package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
- package/components/hy-scroll-list/index.scss +34 -0
- package/components/hy-scroll-list/props.ts +2 -2
- package/components/hy-scroll-list/typing.d.ts +1 -1
- package/components/hy-search/hy-search.vue +12 -94
- package/components/hy-search/index.scss +83 -0
- package/components/hy-search/props.ts +2 -2
- package/components/hy-search/typing.d.ts +1 -2
- package/components/hy-slider/hy-slider.vue +42 -119
- package/components/hy-slider/index.scss +77 -0
- package/components/hy-slider/props.ts +2 -2
- package/components/hy-status-bar/hy-status-bar.vue +41 -0
- package/components/hy-status-bar/index.scss +6 -0
- package/components/hy-status-bar/props.ts +8 -0
- package/components/hy-status-bar/typing.d.ts +12 -0
- package/components/hy-steps/hy-steps.vue +36 -163
- package/components/hy-steps/index.scss +131 -0
- package/components/hy-steps/props.ts +2 -2
- package/components/hy-steps/typing.d.ts +2 -2
- package/components/hy-subsection/hy-subsection.vue +62 -125
- package/components/hy-subsection/index.scss +82 -0
- package/components/hy-subsection/props.ts +7 -3
- package/components/hy-subsection/typing.d.ts +20 -8
- package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
- package/components/hy-swipe-action/index.scss +9 -0
- package/components/hy-swipe-action/index.wxs +235 -0
- package/components/hy-swipe-action/props.ts +16 -0
- package/components/hy-swipe-action/typing.d.ts +55 -0
- package/components/hy-swipe-action/wxs.js +15 -0
- package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
- package/components/hy-swiper/hy-swiper.vue +45 -65
- package/components/hy-swiper/index.scss +82 -0
- package/components/hy-swiper/props.ts +3 -3
- package/components/hy-swiper/typing.d.ts +7 -4
- package/components/hy-switch/hy-switch.vue +65 -68
- package/components/hy-switch/index.scss +46 -0
- package/components/hy-switch/props.ts +6 -3
- package/components/hy-switch/typing.d.ts +14 -1
- package/components/hy-tabs/hy-tabs.vue +22 -81
- package/components/hy-tabs/index.scss +63 -0
- package/components/hy-tabs/props.ts +5 -5
- package/components/hy-tabs/typing.d.ts +1 -1
- package/components/hy-tag/hy-tag.vue +15 -230
- package/components/hy-tag/index.scss +204 -0
- package/components/hy-tag/props.ts +2 -2
- package/components/hy-tag/typing.d.ts +2 -2
- package/components/hy-text/hy-text.vue +238 -0
- package/components/hy-text/index.scss +70 -0
- package/components/hy-text/index.ts +0 -0
- package/components/hy-text/props.ts +30 -0
- package/components/hy-text/typing.d.ts +98 -0
- package/components/hy-textarea/hy-textarea.vue +13 -51
- package/components/hy-textarea/index.scss +40 -0
- package/components/hy-textarea/props.ts +2 -2
- package/components/hy-textarea/typing.d.ts +1 -1
- package/components/hy-tooltip/hy-tooltip.vue +42 -95
- package/components/hy-tooltip/index.scss +64 -0
- package/components/hy-tooltip/props.ts +2 -2
- package/components/hy-tooltip/typing.d.ts +1 -1
- package/components/hy-transition/hy-transition.vue +17 -8
- package/components/hy-transition/props.ts +2 -2
- package/components/hy-transition/typing.d.ts +2 -14
- package/components/hy-upload/hy-upload.vue +37 -182
- package/components/hy-upload/index.scss +147 -0
- package/components/hy-upload/props.ts +2 -2
- package/components/hy-upload/typing.d.ts +11 -11
- package/components/hy-warn/hy-warn.vue +15 -123
- package/components/hy-warn/index.scss +109 -0
- package/components/hy-warn/props.ts +3 -3
- package/components/hy-warn/typing.d.ts +4 -3
- package/components/hy-waterfall/index.scss +82 -0
- package/components/index.ts +25 -1
- package/components/message/index.ts +54 -54
- package/config/color.ts +2 -1
- package/global/index.ts +6 -6
- package/global/register-properties.ts +2 -2
- package/index.scss +2 -0
- package/libs/css/common.scss +16 -0
- package/package.json +4 -4
- package/{libs/css → public/font}/iconfont.css +5 -5
- package/{libs/css → public/font}/iconfont.ttf +0 -0
- package/public/font/iconfont.woff +0 -0
- package/public/font/iconfont.woff2 +0 -0
- package/theme.scss +9 -7
- package/typing/index.ts +0 -1
- package/typing/modules/common.d.ts +66 -1
- package/typing/modules/form.ts +3 -3
- package/utils/calendar.js +1021 -0
- package/utils/colorGradient.ts +112 -0
- package/utils/index.ts +2 -0
- package/utils/inside.ts +80 -34
- package/utils/inspect.ts +66 -0
- package/utils/utils.ts +27 -19
- package/typing/modules/img.ts +0 -15
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
2
|
+
@use "../../theme.scss" as *;
|
|
3
|
+
|
|
4
|
+
$hy-badge-dot-size: 8px !default;
|
|
5
|
+
$hy-badge-text-font-size: 11px !default;
|
|
6
|
+
|
|
7
|
+
.hy-badge {
|
|
8
|
+
border-radius: 100px;
|
|
9
|
+
@include flex;
|
|
10
|
+
line-height: $hy-badge-text-font-size;
|
|
11
|
+
text-align: center;
|
|
12
|
+
font-size: $hy-badge-text-font-size;
|
|
13
|
+
color: $hy-text-color-inverse;
|
|
14
|
+
z-index: 999;
|
|
15
|
+
|
|
16
|
+
&--dot {
|
|
17
|
+
height: $hy-badge-dot-size;
|
|
18
|
+
width: $hy-badge-dot-size;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--inverted {
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--not-dot {
|
|
26
|
+
padding: 2px 5px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--horn {
|
|
30
|
+
border-bottom-left-radius: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--primary {
|
|
34
|
+
background-color: $hy-primary;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--primary--inverted {
|
|
38
|
+
color: $hy-primary;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--error {
|
|
42
|
+
background-color: $hy-error;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--error--inverted {
|
|
46
|
+
color: $hy-error;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--success {
|
|
50
|
+
background-color: $hy-success;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--success--inverted {
|
|
54
|
+
color: $hy-success;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--info {
|
|
58
|
+
background-color: $hy-info;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&--info--inverted {
|
|
62
|
+
color: $hy-info;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--warning {
|
|
66
|
+
background-color: $hy-warning;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&--warning--inverted {
|
|
70
|
+
color: $hy-warning;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IProps from "./typing";
|
|
1
|
+
import type IProps from "./typing";
|
|
2
2
|
|
|
3
3
|
const defaultProps: IProps = {
|
|
4
4
|
isDot: false,
|
|
@@ -13,7 +13,7 @@ const defaultProps: IProps = {
|
|
|
13
13
|
numberType: "overflow",
|
|
14
14
|
offset: null,
|
|
15
15
|
inverted: false,
|
|
16
|
-
absolute: false
|
|
16
|
+
absolute: false,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export default defaultProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from "vue";
|
|
1
|
+
import type { CSSProperties } from "vue";
|
|
2
2
|
|
|
3
3
|
export default interface IProps {
|
|
4
4
|
/**
|
|
@@ -18,7 +18,7 @@ export default interface IProps {
|
|
|
18
18
|
* */
|
|
19
19
|
max?: number;
|
|
20
20
|
/**
|
|
21
|
-
* @description 主题类型,error|warning|success|primary (默认 'error' )
|
|
21
|
+
* @description 主题类型,error|warning|success|primary|info (默认 'error' )
|
|
22
22
|
* */
|
|
23
23
|
type?: HyApp.ThemeType;
|
|
24
24
|
/**
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
:class="bemClass"
|
|
28
28
|
>
|
|
29
29
|
<template v-if="loading">
|
|
30
|
-
<
|
|
30
|
+
<HyIcon
|
|
31
31
|
:mode="loadingMode"
|
|
32
32
|
:is-rotate="true"
|
|
33
33
|
:name="IconConfig.LOADING"
|
|
34
|
-
:size="loadingSize
|
|
34
|
+
:size="loadingSize"
|
|
35
35
|
:color="loadingColor"
|
|
36
|
-
></
|
|
36
|
+
></HyIcon>
|
|
37
37
|
<text
|
|
38
38
|
class="hy-button__loading-text"
|
|
39
39
|
:style="[{ fontSize: textSize + 'px' }]"
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
>
|
|
42
42
|
</template>
|
|
43
43
|
<template v-else>
|
|
44
|
-
<
|
|
44
|
+
<HyIcon
|
|
45
45
|
v-if="icon"
|
|
46
46
|
:name="icon"
|
|
47
47
|
:color="iconColorCom"
|
|
48
48
|
:size="textSize * 1.35"
|
|
49
49
|
:customStyle="{ marginRight: '2px' }"
|
|
50
|
-
></
|
|
50
|
+
></HyIcon>
|
|
51
51
|
<slot>
|
|
52
52
|
<text
|
|
53
53
|
class="hy-button__text"
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
!disabled && !loading && !color && (plain || type === 'info')
|
|
69
69
|
? 'hy-button--active--plain'
|
|
70
70
|
: !disabled && !loading && !plain
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
? 'hy-button--active'
|
|
72
|
+
: ''
|
|
73
73
|
"
|
|
74
74
|
@tap="clickHandler"
|
|
75
75
|
:class="bemClass"
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
class="hy-button__text"
|
|
100
100
|
:style="[
|
|
101
101
|
{
|
|
102
|
-
marginLeft: icon ? '2px' : 0
|
|
102
|
+
marginLeft: icon ? '2px' : 0,
|
|
103
103
|
},
|
|
104
|
-
nvueTextStyle
|
|
104
|
+
nvueTextStyle,
|
|
105
105
|
]"
|
|
106
106
|
:class="[plain && `hy-button__text--plain--${type}`]"
|
|
107
107
|
>{{ text }}</text
|
|
@@ -112,12 +112,12 @@
|
|
|
112
112
|
</template>
|
|
113
113
|
|
|
114
114
|
<script setup lang="ts">
|
|
115
|
-
import { computed, CSSProperties, toRefs } from "vue";
|
|
115
|
+
import { computed, type CSSProperties, toRefs } from "vue";
|
|
116
116
|
import { bem, throttle } from "../../utils";
|
|
117
117
|
import defaultProps from "./props";
|
|
118
118
|
import { ColorConfig, IconConfig } from "../../config";
|
|
119
119
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
120
|
-
import IProps from "./typing";
|
|
120
|
+
import type IProps from "./typing";
|
|
121
121
|
|
|
122
122
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
123
123
|
const {
|
|
@@ -129,7 +129,7 @@ const {
|
|
|
129
129
|
type,
|
|
130
130
|
plain,
|
|
131
131
|
color,
|
|
132
|
-
iconColor
|
|
132
|
+
iconColor,
|
|
133
133
|
} = toRefs(props);
|
|
134
134
|
const emit = defineEmits([
|
|
135
135
|
"click",
|
|
@@ -138,7 +138,7 @@ const emit = defineEmits([
|
|
|
138
138
|
"error",
|
|
139
139
|
"opensetting",
|
|
140
140
|
"launchapp",
|
|
141
|
-
"agreeprivacyauthorization"
|
|
141
|
+
"agreeprivacyauthorization",
|
|
142
142
|
]);
|
|
143
143
|
|
|
144
144
|
const textColor = (ColorConfig as any)[type.value];
|
|
@@ -153,7 +153,7 @@ const bemClass = computed(() => {
|
|
|
153
153
|
"button",
|
|
154
154
|
props,
|
|
155
155
|
["type", "shape", "size"],
|
|
156
|
-
["disabled", "plain", "hairline"]
|
|
156
|
+
["disabled", "plain", "hairline"],
|
|
157
157
|
);
|
|
158
158
|
} else {
|
|
159
159
|
// 由于nvue的原因,在有color参数时,不需要传入type,否则会生成type相关的类型,影响最终的样式
|
|
@@ -161,7 +161,7 @@ const bemClass = computed(() => {
|
|
|
161
161
|
"button",
|
|
162
162
|
props,
|
|
163
163
|
["shape", "size"],
|
|
164
|
-
["disabled", "plain", "hairline"]
|
|
164
|
+
["disabled", "plain", "hairline"],
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
167
|
});
|
|
@@ -169,7 +169,7 @@ const bemClass = computed(() => {
|
|
|
169
169
|
const loadingColor = computed(() => {
|
|
170
170
|
if (plain.value) {
|
|
171
171
|
// 如果有设置color值,则用color值,否则使用type主题颜色
|
|
172
|
-
return color.value ? color.value :
|
|
172
|
+
return color.value ? color.value : textColor;
|
|
173
173
|
}
|
|
174
174
|
if (type.value === "info") {
|
|
175
175
|
return "#c9c9c9";
|
|
@@ -182,7 +182,7 @@ const iconColorCom = computed((): string => {
|
|
|
182
182
|
// u-icon的color能接受一个主题颜色的值
|
|
183
183
|
if (iconColor.value) return iconColor.value;
|
|
184
184
|
if (plain.value) {
|
|
185
|
-
return color.value ? color.value :
|
|
185
|
+
return color.value ? color.value : textColor;
|
|
186
186
|
} else {
|
|
187
187
|
return type.value === "info" ? "#000000" : "#ffffff";
|
|
188
188
|
}
|
|
@@ -213,6 +213,9 @@ const baseColor = computed((): CSSProperties => {
|
|
|
213
213
|
style.borderWidth = "1px";
|
|
214
214
|
style.borderStyle = "solid";
|
|
215
215
|
}
|
|
216
|
+
} else {
|
|
217
|
+
// 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
|
|
218
|
+
style.color = plain.value ? textColor : "";
|
|
216
219
|
}
|
|
217
220
|
return style;
|
|
218
221
|
});
|
|
@@ -236,7 +239,7 @@ const nvueTextStyle = computed((): CSSProperties => {
|
|
|
236
239
|
const textSize = computed((): number => {
|
|
237
240
|
let fontSize = 14;
|
|
238
241
|
if (size.value === "large") fontSize = 16;
|
|
239
|
-
if (size.value === "
|
|
242
|
+
if (size.value === "medium") fontSize = 14;
|
|
240
243
|
if (size.value === "small") fontSize = 12;
|
|
241
244
|
if (size.value === "mini") fontSize = 10;
|
|
242
245
|
return fontSize;
|
|
@@ -275,120 +278,5 @@ const agreeprivacyauthorization = (e: any) => {
|
|
|
275
278
|
</script>
|
|
276
279
|
|
|
277
280
|
<style lang="scss" scoped>
|
|
278
|
-
@import "
|
|
279
|
-
@import "../../theme.scss";
|
|
280
|
-
|
|
281
|
-
.hy-button {
|
|
282
|
-
height: 40px;
|
|
283
|
-
position: relative;
|
|
284
|
-
align-items: center;
|
|
285
|
-
justify-content: center;
|
|
286
|
-
@include flex;
|
|
287
|
-
/* #ifndef APP-NVUE */
|
|
288
|
-
box-sizing: border-box;
|
|
289
|
-
/* #endif */
|
|
290
|
-
flex-direction: row;
|
|
291
|
-
|
|
292
|
-
&__text {
|
|
293
|
-
font-size: 15px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
&__loading-text {
|
|
297
|
-
font-size: 15px;
|
|
298
|
-
margin-left: 4px;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
&--large {
|
|
302
|
-
/* #ifndef APP-NVUE */
|
|
303
|
-
width: 100%;
|
|
304
|
-
/* #endif */
|
|
305
|
-
height: 50px;
|
|
306
|
-
padding: 0 15px;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
&--normal {
|
|
310
|
-
padding: 0 12px;
|
|
311
|
-
font-size: 14px;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
&--small {
|
|
315
|
-
/* #ifndef APP-NVUE */
|
|
316
|
-
min-width: 60px;
|
|
317
|
-
/* #endif */
|
|
318
|
-
height: 80px;
|
|
319
|
-
padding: 0 8px;
|
|
320
|
-
font-size: 12px;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
&--mini {
|
|
324
|
-
height: 22px;
|
|
325
|
-
font-size: 10px;
|
|
326
|
-
/* #ifndef APP-NVUE */
|
|
327
|
-
min-width: 50px;
|
|
328
|
-
/* #endif */
|
|
329
|
-
padding: 0 8px;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
&--disabled {
|
|
333
|
-
opacity: 0.5;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
&--info {
|
|
337
|
-
color: #323233;
|
|
338
|
-
background-color: #fff;
|
|
339
|
-
border: 1px solid #ebedf0;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
&--success {
|
|
343
|
-
color: #fff;
|
|
344
|
-
background-color: $hy-success;
|
|
345
|
-
border: 1px solid $hy-success;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
&--primary {
|
|
349
|
-
color: #fff;
|
|
350
|
-
background-color: $hy-primary;
|
|
351
|
-
border: 1px solid $hy-primary;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
&--error {
|
|
355
|
-
color: #fff;
|
|
356
|
-
background-color: $hy-error;
|
|
357
|
-
border: 1px solid $hy-error;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
&--warning {
|
|
361
|
-
color: #fff;
|
|
362
|
-
background-color: $hy-warning;
|
|
363
|
-
border: 1px solid $hy-warning;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
&--block {
|
|
367
|
-
@include flex;
|
|
368
|
-
width: 100%;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
&--circle {
|
|
372
|
-
border-radius: 100px;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
&--square {
|
|
376
|
-
border-radius: 3px;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
&__icon {
|
|
380
|
-
min-width: 1em;
|
|
381
|
-
line-height: inherit !important;
|
|
382
|
-
vertical-align: top;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
&--plain {
|
|
386
|
-
color: v-bind(textColor);
|
|
387
|
-
background-color: #fff;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
&--hairline {
|
|
391
|
-
border-width: 0.5;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
281
|
+
@import "./index.scss";
|
|
394
282
|
</style>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
2
|
+
@use "../../theme.scss" as *;
|
|
3
|
+
|
|
4
|
+
.hy-button {
|
|
5
|
+
height: 40px;
|
|
6
|
+
position: relative;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
@include flex;
|
|
10
|
+
/* #ifndef APP-NVUE */
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
/* #endif */
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
|
|
15
|
+
&__text {
|
|
16
|
+
font-size: 15px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__loading-text {
|
|
20
|
+
font-size: 15px;
|
|
21
|
+
margin-left: 4px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--large {
|
|
25
|
+
/* #ifndef APP-NVUE */
|
|
26
|
+
width: 100%;
|
|
27
|
+
/* #endif */
|
|
28
|
+
height: 50px;
|
|
29
|
+
padding: 0 15px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--medium {
|
|
33
|
+
padding: 0 12px;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--small {
|
|
38
|
+
/* #ifndef APP-NVUE */
|
|
39
|
+
min-width: 60px;
|
|
40
|
+
/* #endif */
|
|
41
|
+
height: 30px;
|
|
42
|
+
padding: 0 8px;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--mini {
|
|
47
|
+
height: 22px;
|
|
48
|
+
font-size: 10px;
|
|
49
|
+
/* #ifndef APP-NVUE */
|
|
50
|
+
min-width: 50px;
|
|
51
|
+
/* #endif */
|
|
52
|
+
padding: 0 8px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--disabled {
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--info {
|
|
60
|
+
color: #323233;
|
|
61
|
+
background-color: #fff;
|
|
62
|
+
border: 1px solid #909399;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--success {
|
|
66
|
+
color: #fff;
|
|
67
|
+
background-color: $hy-success;
|
|
68
|
+
border: 1px solid $hy-success;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--primary {
|
|
72
|
+
color: #fff;
|
|
73
|
+
background-color: $hy-primary;
|
|
74
|
+
border: 1px solid $hy-primary;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--error {
|
|
78
|
+
color: #fff;
|
|
79
|
+
background-color: $hy-error;
|
|
80
|
+
border: 1px solid $hy-error;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&--warning {
|
|
84
|
+
color: #fff;
|
|
85
|
+
background-color: $hy-warning;
|
|
86
|
+
border: 1px solid $hy-warning;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&--block {
|
|
90
|
+
@include flex;
|
|
91
|
+
width: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&--circle {
|
|
95
|
+
border-radius: 100px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--square {
|
|
99
|
+
border-radius: 3px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__icon {
|
|
103
|
+
min-width: 1em;
|
|
104
|
+
line-height: inherit !important;
|
|
105
|
+
vertical-align: top;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&--plain {
|
|
109
|
+
color: v-bind(textColor);
|
|
110
|
+
background-color: #fff;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--hairline {
|
|
114
|
+
border-width: 0.5px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import IProps from "./typing";
|
|
2
|
-
import type { CSSProperties } from "vue";
|
|
1
|
+
import type IProps from "./typing";
|
|
3
2
|
|
|
4
3
|
const defaultProps: IProps = {
|
|
5
4
|
hairline: false,
|
|
6
|
-
type: "
|
|
7
|
-
size: "
|
|
5
|
+
type: "primary",
|
|
6
|
+
size: "medium",
|
|
8
7
|
shape: "square",
|
|
9
8
|
plain: false,
|
|
10
9
|
disabled: false,
|
|
@@ -30,7 +29,7 @@ const defaultProps: IProps = {
|
|
|
30
29
|
icon: "",
|
|
31
30
|
iconColor: "",
|
|
32
31
|
color: "",
|
|
33
|
-
stop: true
|
|
32
|
+
stop: true,
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
export default defaultProps;
|
|
@@ -6,13 +6,13 @@ export default interface IProps {
|
|
|
6
6
|
* */
|
|
7
7
|
hairline?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* @description 按钮的预置样式,info,primary,error,warning,success (默认 '
|
|
9
|
+
* @description 按钮的预置样式,info,primary,error,warning,success (默认 'primary' )
|
|
10
10
|
* */
|
|
11
11
|
type?: HyApp.ThemeType;
|
|
12
12
|
/**
|
|
13
|
-
* @description 按钮尺寸,large,
|
|
13
|
+
* @description 按钮尺寸,large,medium,mini (默认 medium)
|
|
14
14
|
* */
|
|
15
|
-
size?:
|
|
15
|
+
size?: HyApp.SizeType | "mini";
|
|
16
16
|
/**
|
|
17
17
|
* @description 按钮形状,circle(两边为半圆),square(带圆角) (默认 'square' )
|
|
18
18
|
* */
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="u-calendar-header u-border-bottom">
|
|
3
|
+
<text class="u-calendar-header__title" v-if="showTitle">{{ title }}</text>
|
|
4
|
+
<text class="u-calendar-header__subtitle" v-if="showSubtitle">{{
|
|
5
|
+
subtitle
|
|
6
|
+
}}</text>
|
|
7
|
+
<view class="u-calendar-header__weekdays">
|
|
8
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
9
|
+
weekText[0]
|
|
10
|
+
}}</text>
|
|
11
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
12
|
+
weekText[1]
|
|
13
|
+
}}</text>
|
|
14
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
15
|
+
weekText[2]
|
|
16
|
+
}}</text>
|
|
17
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
18
|
+
weekText[3]
|
|
19
|
+
}}</text>
|
|
20
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
21
|
+
weekText[4]
|
|
22
|
+
}}</text>
|
|
23
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
24
|
+
weekText[5]
|
|
25
|
+
}}</text>
|
|
26
|
+
<text class="u-calendar-header__weekdays__weekday">{{
|
|
27
|
+
weekText[6]
|
|
28
|
+
}}</text>
|
|
29
|
+
</view>
|
|
30
|
+
</view>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: "u-calendar-header",
|
|
36
|
+
props: {
|
|
37
|
+
// 标题
|
|
38
|
+
title: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "",
|
|
41
|
+
},
|
|
42
|
+
// 副标题
|
|
43
|
+
subtitle: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "",
|
|
46
|
+
},
|
|
47
|
+
// 是否显示标题
|
|
48
|
+
showTitle: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true,
|
|
51
|
+
},
|
|
52
|
+
// 是否显示副标题
|
|
53
|
+
showSubtitle: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true,
|
|
56
|
+
},
|
|
57
|
+
// 星期文本
|
|
58
|
+
weekText: {
|
|
59
|
+
type: Array,
|
|
60
|
+
default: () => {
|
|
61
|
+
return ["一", "二", "三", "四", "五", "六", "日"];
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
data() {
|
|
66
|
+
return {};
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
name() {},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style lang="scss" scoped>
|
|
75
|
+
@import "./index.scss";
|
|
76
|
+
</style>
|