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
|
@@ -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">
|
|
@@ -31,8 +29,19 @@
|
|
|
31
29
|
<slot name="icon" :icon="item?.icon">
|
|
32
30
|
<HyIcon
|
|
33
31
|
:size="iconSize"
|
|
34
|
-
:name="item?.icon"
|
|
35
|
-
:color="
|
|
32
|
+
:name="item?.icon?.name"
|
|
33
|
+
:color="
|
|
34
|
+
disabled || item?.disabled ? '#c0c0c0' : item?.icon?.color
|
|
35
|
+
"
|
|
36
|
+
:bold="item?.icon?.bold"
|
|
37
|
+
:customPrefix="item?.icon?.customPrefix"
|
|
38
|
+
:imgMode="item?.icon?.imgMode"
|
|
39
|
+
:width="item?.icon?.width"
|
|
40
|
+
:height="item?.icon?.height"
|
|
41
|
+
:top="item?.icon?.top"
|
|
42
|
+
:stop="item?.icon?.stop"
|
|
43
|
+
:round="item?.icon?.round"
|
|
44
|
+
:customStyle="item?.icon?.customStyle"
|
|
36
45
|
></HyIcon>
|
|
37
46
|
</slot>
|
|
38
47
|
</view>
|
|
@@ -86,10 +95,27 @@
|
|
|
86
95
|
>
|
|
87
96
|
<slot name="right-icon" :icon="item?.rightIcon || rightIcon">
|
|
88
97
|
<HyIcon
|
|
89
|
-
:name="
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
:
|
|
98
|
+
:name="
|
|
99
|
+
item?.rightIcon?.name || rightIcon?.name || IconConfig.RIGHT
|
|
100
|
+
"
|
|
101
|
+
:color="
|
|
102
|
+
disabled || item?.disabled
|
|
103
|
+
? '#c0c0c0'
|
|
104
|
+
: item?.rightIcon?.color || rightIcon?.color
|
|
105
|
+
"
|
|
106
|
+
:bold="item?.rightIcon?.bold || rightIcon?.bold"
|
|
107
|
+
:customPrefix="
|
|
108
|
+
item?.rightIcon?.customPrefix || rightIcon?.customPrefix
|
|
109
|
+
"
|
|
110
|
+
:imgMode="item?.rightIcon?.imgMode || rightIcon?.imgMode"
|
|
111
|
+
:width="item?.rightIcon?.width || rightIcon?.width"
|
|
112
|
+
:height="item?.rightIcon?.height || rightIcon?.height"
|
|
113
|
+
:top="item?.rightIcon?.top || rightIcon?.name"
|
|
114
|
+
:stop="item?.rightIcon?.stop || rightIcon?.stop"
|
|
115
|
+
:round="item?.rightIcon?.round || rightIcon?.round"
|
|
116
|
+
:customStyle="
|
|
117
|
+
item?.rightIcon?.customStyle || rightIcon?.customStyle
|
|
118
|
+
"
|
|
93
119
|
></HyIcon>
|
|
94
120
|
</slot>
|
|
95
121
|
</view>
|
|
@@ -102,16 +128,28 @@
|
|
|
102
128
|
</view>
|
|
103
129
|
</template>
|
|
104
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
|
+
|
|
105
141
|
<script setup lang="ts">
|
|
106
142
|
import defaultProps from "./props";
|
|
107
143
|
import type IProps from "./typing";
|
|
108
144
|
import type { CellContentVo } from "./typing";
|
|
145
|
+
import { IconConfig } from "../../config";
|
|
109
146
|
|
|
110
147
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
111
148
|
import { computed, toRefs } from "vue";
|
|
149
|
+
import { addUnit } from "@/package";
|
|
112
150
|
|
|
113
151
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
114
|
-
const { size, disabled, clickable } = toRefs(props);
|
|
152
|
+
const { size, disabled, clickable, borderRadius } = toRefs(props);
|
|
115
153
|
const emit = defineEmits(["click"]);
|
|
116
154
|
|
|
117
155
|
/**
|
|
@@ -1,29 +1,62 @@
|
|
|
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(cell) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
&__body--container {
|
|
10
|
+
background-color: $hy-dark-background--container;
|
|
11
|
+
&__right-icon {
|
|
12
|
+
:deep() {
|
|
13
|
+
@include b(icon) {
|
|
14
|
+
color: $hy-dark-icon;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@include b(cell) {
|
|
5
23
|
flex: 1;
|
|
6
24
|
|
|
7
25
|
/*标题*/
|
|
8
|
-
|
|
9
|
-
padding: $hy-border-margin-padding-lg $hy-border-margin-padding-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
@include m(title) {
|
|
27
|
+
padding: $hy-border-margin-padding-lg $hy-border-margin-padding-base;
|
|
28
|
+
&__vertical {
|
|
29
|
+
position: relative;
|
|
30
|
+
&::after {
|
|
31
|
+
content: "";
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 0;
|
|
34
|
+
top: 51%;
|
|
35
|
+
transform: translateY(-50%);
|
|
17
36
|
width: 4px;
|
|
18
37
|
height: 20px;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
&--text {
|
|
22
|
-
font-size: $hy-font-size-subtitle;
|
|
23
|
-
line-height: 16px;
|
|
24
|
-
color: $hy-color-title;
|
|
38
|
+
background: $hy-primary;
|
|
39
|
+
border-radius: $hy-border-radius-semicircle;
|
|
25
40
|
}
|
|
26
41
|
}
|
|
42
|
+
&__text {
|
|
43
|
+
font-size: $hy-font-size-lg;
|
|
44
|
+
}
|
|
45
|
+
//&-nav {
|
|
46
|
+
// display: flex;
|
|
47
|
+
// align-items: center;
|
|
48
|
+
//
|
|
49
|
+
// &--ver {
|
|
50
|
+
// border-radius: 4rpx;
|
|
51
|
+
// width: 4px;
|
|
52
|
+
// height: 20px;
|
|
53
|
+
// margin-right: 16rpx;
|
|
54
|
+
// }
|
|
55
|
+
// &--text {
|
|
56
|
+
// font-size: $hy-font-size-subtitle;
|
|
57
|
+
// line-height: 16px;
|
|
58
|
+
// }
|
|
59
|
+
//}
|
|
27
60
|
}
|
|
28
61
|
|
|
29
62
|
/*row内容*/
|
|
@@ -32,10 +65,9 @@
|
|
|
32
65
|
box-sizing: border-box;
|
|
33
66
|
/* #endif */
|
|
34
67
|
font-size: $hy-font-size-paragraph;
|
|
35
|
-
color: $hy-color-paragraph;
|
|
36
|
-
// line-height: $u-cell-line-height;
|
|
37
68
|
align-items: center;
|
|
38
|
-
|
|
69
|
+
border-radius: $hy-border-margin-padding-sm;
|
|
70
|
+
overflow: hidden;
|
|
39
71
|
|
|
40
72
|
&--container {
|
|
41
73
|
@include flex(row);
|
|
@@ -66,14 +98,14 @@
|
|
|
66
98
|
|
|
67
99
|
/*点击状态*/
|
|
68
100
|
&__clickable {
|
|
69
|
-
background-color: $hy-
|
|
101
|
+
background-color: $hy-light-background-hover;
|
|
70
102
|
}
|
|
71
103
|
|
|
72
104
|
&__content {
|
|
73
105
|
@include flex(row);
|
|
74
106
|
/*左边icon*/
|
|
75
107
|
&-icon {
|
|
76
|
-
@include flex
|
|
108
|
+
@include flex;
|
|
77
109
|
align-items: center;
|
|
78
110
|
margin-right: 10px;
|
|
79
111
|
}
|
|
@@ -84,11 +116,6 @@
|
|
|
84
116
|
display: flex;
|
|
85
117
|
flex-direction: column;
|
|
86
118
|
|
|
87
|
-
/*标题*/
|
|
88
|
-
&--text {
|
|
89
|
-
color: $hy-color-title;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
119
|
/*sub值*/
|
|
93
120
|
&--sub {
|
|
94
121
|
margin-top: $hy-border-margin-padding-sm;
|
|
@@ -99,7 +126,7 @@
|
|
|
99
126
|
|
|
100
127
|
/*cell值*/
|
|
101
128
|
&__center {
|
|
102
|
-
@include flex
|
|
129
|
+
@include flex;
|
|
103
130
|
max-width: 90%;
|
|
104
131
|
flex: 1;
|
|
105
132
|
&__value {
|
|
@@ -128,7 +155,7 @@
|
|
|
128
155
|
}
|
|
129
156
|
}
|
|
130
157
|
|
|
131
|
-
|
|
158
|
+
@include m(disabled) {
|
|
132
159
|
color: $hy-text-color-disable;
|
|
133
160
|
/* #ifndef APP-NVUE */
|
|
134
161
|
cursor: not-allowed;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import type IProps from "./typing";
|
|
2
|
-
import { ColorConfig
|
|
2
|
+
import { ColorConfig } from "../../config";
|
|
3
3
|
|
|
4
4
|
const defaultProps: IProps = {
|
|
5
5
|
list: [],
|
|
6
6
|
title: "",
|
|
7
|
-
titleBorder: false,
|
|
8
|
-
border: true,
|
|
9
|
-
verticalColor: ColorConfig.primary,
|
|
10
7
|
showVertical: true,
|
|
8
|
+
border: true,
|
|
9
|
+
borderRadius: "5px",
|
|
11
10
|
disabled: false,
|
|
12
11
|
clickable: false,
|
|
13
12
|
size: "medium",
|
|
14
13
|
value: "",
|
|
15
14
|
arrange: "right",
|
|
16
|
-
rightIcon:
|
|
15
|
+
rightIcon: {},
|
|
17
16
|
arrowDirection: "right",
|
|
18
17
|
};
|
|
19
18
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
2
|
import { HyApp } from "@/package/typing/modules/common";
|
|
3
|
+
import type HyIconProps from "../hy-icon/typing";
|
|
3
4
|
|
|
4
5
|
export interface CellContentVo extends AnyObject {
|
|
5
6
|
/**
|
|
6
7
|
* @description 单元格左图标
|
|
7
8
|
* */
|
|
8
|
-
icon?:
|
|
9
|
+
icon?: Partial<HyIconProps>;
|
|
9
10
|
/**
|
|
10
11
|
* @description 单元格标题
|
|
11
12
|
* */
|
|
@@ -19,9 +20,9 @@ export interface CellContentVo extends AnyObject {
|
|
|
19
20
|
* */
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
/**
|
|
22
|
-
* @description
|
|
23
|
+
* @description 单元格右图标集合
|
|
23
24
|
* */
|
|
24
|
-
rightIcon?:
|
|
25
|
+
rightIcon?: Partial<HyIconProps>;
|
|
25
26
|
/**
|
|
26
27
|
* @description 单元格值
|
|
27
28
|
* */
|
|
@@ -31,11 +32,11 @@ export interface CellContentVo extends AnyObject {
|
|
|
31
32
|
* */
|
|
32
33
|
url?: string;
|
|
33
34
|
/**
|
|
34
|
-
* @description 单元格右侧箭头的方向,可选值为:left,up,down
|
|
35
|
+
* @description 单元格右侧箭头的方向,可选值为:left,up,down,right
|
|
35
36
|
* */
|
|
36
37
|
arrowDirection?: HyApp.RotateType;
|
|
37
38
|
}
|
|
38
|
-
export default interface
|
|
39
|
+
export default interface HyCellProps {
|
|
39
40
|
/**
|
|
40
41
|
* @description cell列表数据
|
|
41
42
|
* */
|
|
@@ -45,21 +46,14 @@ export default interface IProps {
|
|
|
45
46
|
* */
|
|
46
47
|
title?: string;
|
|
47
48
|
/**
|
|
48
|
-
* @description
|
|
49
|
+
* @description 是否显示标题前缀竖线
|
|
49
50
|
* */
|
|
50
|
-
|
|
51
|
+
showVertical?: boolean;
|
|
51
52
|
/**
|
|
52
53
|
* @description 是否显示cell下边框 (默认 true )
|
|
53
54
|
* */
|
|
54
55
|
border?: boolean;
|
|
55
|
-
|
|
56
|
-
* @description 标题前缀竖线颜色
|
|
57
|
-
* */
|
|
58
|
-
verticalColor?: string;
|
|
59
|
-
/**
|
|
60
|
-
* @description 是否显示标题前缀竖线
|
|
61
|
-
* */
|
|
62
|
-
showVertical?: boolean;
|
|
56
|
+
borderRadius?: string | number;
|
|
63
57
|
/**
|
|
64
58
|
* @description 是否禁用cell(默认false)
|
|
65
59
|
* */
|
|
@@ -81,17 +75,13 @@ export default interface IProps {
|
|
|
81
75
|
* */
|
|
82
76
|
arrange?: HyApp.LeftRightType | "center";
|
|
83
77
|
/**
|
|
84
|
-
* @description 右侧的图标箭头
|
|
78
|
+
* @description 右侧的图标箭头icon集合
|
|
85
79
|
* */
|
|
86
|
-
rightIcon?:
|
|
80
|
+
rightIcon?: Partial<HyIconProps>;
|
|
87
81
|
/**
|
|
88
82
|
* @description 右侧箭头的方向,可选值为:left,up,down
|
|
89
83
|
* */
|
|
90
84
|
arrowDirection?: "left" | "up" | "down" | "right";
|
|
91
|
-
/**
|
|
92
|
-
* @description 自定义右侧icon样式
|
|
93
|
-
* */
|
|
94
|
-
rightIconStyle?: CSSProperties;
|
|
95
85
|
/**
|
|
96
86
|
* @description 定义需要用到的外部样式
|
|
97
87
|
* */
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
</view>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
export default {
|
|
20
|
+
name: 'hy-check-button',
|
|
21
|
+
options: {
|
|
22
|
+
addGlobalClass: true,
|
|
23
|
+
virtualHost: true,
|
|
24
|
+
styleIsolation: 'shared'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
18
29
|
<script setup lang="ts">
|
|
19
30
|
import { toRefs, watch, ref } from "vue";
|
|
20
31
|
import defaultProps from "./props";
|
|
@@ -69,8 +80,8 @@ const onCheckbox = ({ name }: { name: number }) => {
|
|
|
69
80
|
</script>
|
|
70
81
|
|
|
71
82
|
<style lang="scss" scoped>
|
|
72
|
-
|
|
73
|
-
|
|
83
|
+
@import "../../libs/css/mixin.scss";
|
|
84
|
+
@include b(check-button) {
|
|
74
85
|
display: grid;
|
|
75
86
|
grid-template-columns: v-bind(col);
|
|
76
87
|
gap: v-bind(gap);
|
|
@@ -35,7 +35,7 @@ export type FieldNamesType = {
|
|
|
35
35
|
[key in keyof IFieldNames as IFieldNames[key]]?: string | number | boolean;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
export default interface
|
|
38
|
+
export default interface HyCheckButtonProps {
|
|
39
39
|
/**
|
|
40
40
|
* @description 选中得值,radio是字符串,checkbox是数组
|
|
41
41
|
* */
|
|
@@ -48,6 +48,17 @@
|
|
|
48
48
|
</view>
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
|
+
<script lang="ts">
|
|
52
|
+
export default {
|
|
53
|
+
name: 'hy-checkbox',
|
|
54
|
+
options: {
|
|
55
|
+
addGlobalClass: true,
|
|
56
|
+
virtualHost: true,
|
|
57
|
+
styleIsolation: 'shared'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
51
62
|
<script setup lang="ts">
|
|
52
63
|
import defaultProps from "./props";
|
|
53
64
|
import type { CheckboxColumnsVo } from "./typing";
|
|
@@ -72,6 +83,7 @@ const {
|
|
|
72
83
|
customStyle,
|
|
73
84
|
borderBottom,
|
|
74
85
|
placement,
|
|
86
|
+
labelDisabled,
|
|
75
87
|
} = toRefs(props);
|
|
76
88
|
const emit = defineEmits(["change", "update:modelValue"]);
|
|
77
89
|
|
|
@@ -84,8 +96,12 @@ const sizeType: AnyObject = reactive({
|
|
|
84
96
|
|
|
85
97
|
watch(
|
|
86
98
|
() => modelValue.value,
|
|
87
|
-
(newValue) => {
|
|
88
|
-
|
|
99
|
+
(newValue: boolean | (string | number)[]) => {
|
|
100
|
+
// 判断数组长度为1可以传true/false
|
|
101
|
+
if (columns.value?.length === 1 && typeof newValue === "boolean") {
|
|
102
|
+
columns.value[0][fieldNames.value.checked] = newValue;
|
|
103
|
+
columns_1.value = columns.value;
|
|
104
|
+
} else if (Array.isArray(newValue)) {
|
|
89
105
|
columns_1.value = columns.value.map((item) => {
|
|
90
106
|
item[fieldNames.value.checked] = newValue.includes(
|
|
91
107
|
item[fieldNames.value.value] as string,
|
|
@@ -130,8 +146,11 @@ const iconClasses = computed(() => {
|
|
|
130
146
|
if (isDisabled(temp?.disabled)) {
|
|
131
147
|
classes.push("hy-checkbox__icon-wrap--disabled");
|
|
132
148
|
}
|
|
133
|
-
if (temp[fieldNames.value.checked]
|
|
134
|
-
classes.push("hy-checkbox__icon-wrap--
|
|
149
|
+
if (temp[fieldNames.value.checked]) {
|
|
150
|
+
classes.push("hy-checkbox__icon-wrap--checked");
|
|
151
|
+
if (isDisabled(temp?.disabled)) {
|
|
152
|
+
classes.push("hy-checkbox__icon-wrap--disabled--checked");
|
|
153
|
+
}
|
|
135
154
|
}
|
|
136
155
|
return classes;
|
|
137
156
|
};
|
|
@@ -147,7 +166,9 @@ const iconWrapStyle = computed(() => {
|
|
|
147
166
|
style.backgroundColor =
|
|
148
167
|
temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
|
|
149
168
|
? activeColor.value
|
|
150
|
-
:
|
|
169
|
+
: !isDisabled(temp?.disabled)
|
|
170
|
+
? "#ffffff"
|
|
171
|
+
: "";
|
|
151
172
|
style.borderColor =
|
|
152
173
|
temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
|
|
153
174
|
? activeColor.value
|
|
@@ -172,7 +193,7 @@ const iconClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
|
172
193
|
* */
|
|
173
194
|
const wrapperClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
174
195
|
e.stopPropagation();
|
|
175
|
-
if (!isDisabled(temp?.disabled)) {
|
|
196
|
+
if (!isDisabled(temp?.disabled) || !labelDisabled.value) {
|
|
176
197
|
setRadioCheckedStatus(temp);
|
|
177
198
|
}
|
|
178
199
|
};
|
|
@@ -181,7 +202,7 @@ const wrapperClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
|
181
202
|
* */
|
|
182
203
|
const labelClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
|
|
183
204
|
e.stopPropagation();
|
|
184
|
-
if (!isDisabled(temp?.disabled)) {
|
|
205
|
+
if (!isDisabled(temp?.disabled) || !labelDisabled.value) {
|
|
185
206
|
setRadioCheckedStatus(temp);
|
|
186
207
|
}
|
|
187
208
|
};
|
|
@@ -198,11 +219,14 @@ const setRadioCheckedStatus = (temp: CheckboxColumnsVo) => {
|
|
|
198
219
|
return item;
|
|
199
220
|
});
|
|
200
221
|
emit("change", temp);
|
|
222
|
+
console.log(columns_1.value[0].checked, "前");
|
|
201
223
|
emit(
|
|
202
224
|
"update:modelValue",
|
|
203
|
-
columns_1.value
|
|
204
|
-
|
|
205
|
-
|
|
225
|
+
columns_1.value.length === 1
|
|
226
|
+
? columns_1.value[0].checked
|
|
227
|
+
: columns_1.value
|
|
228
|
+
.filter((item: CheckboxColumnsVo) => item[fieldNames.value.checked])
|
|
229
|
+
.map((item: CheckboxColumnsVo) => item[fieldNames.value.value]),
|
|
206
230
|
);
|
|
207
231
|
// 双向绑定
|
|
208
232
|
// if (this.usedAlone) {
|
|
@@ -1,7 +1,16 @@
|
|
|
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(checkbox) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include b(checkbox) {
|
|
5
14
|
&-group {
|
|
6
15
|
&--row {
|
|
7
16
|
/* #ifndef APP-NVUE */
|
|
@@ -65,17 +74,19 @@
|
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
&--checked {
|
|
68
|
-
color:
|
|
77
|
+
color: #FFFFFF;
|
|
69
78
|
background-color: $hy-primary;
|
|
70
79
|
border-color: $hy-primary;
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
&--disabled {
|
|
74
|
-
background-color: $hy-
|
|
83
|
+
background-color: $hy-light-background-disabled;
|
|
75
84
|
}
|
|
76
85
|
|
|
77
86
|
&--disabled--checked {
|
|
78
|
-
color: $hy-
|
|
87
|
+
background-color: $hy-primary;
|
|
88
|
+
border-color: $hy-primary;
|
|
89
|
+
opacity: 0.5;
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
|
|
@@ -83,7 +94,6 @@
|
|
|
83
94
|
/* #ifndef APP-NVUE */
|
|
84
95
|
word-wrap: break-word;
|
|
85
96
|
/* #endif */
|
|
86
|
-
color: $hy-text-color;
|
|
87
97
|
font-size: $hy-font-size-base;
|
|
88
98
|
margin-right: $hy-border-margin-padding-sm;
|
|
89
99
|
|
|
@@ -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: "square",
|
|
13
12
|
size: "medium",
|
|
14
13
|
disabled: false,
|
|
15
|
-
activeColor:
|
|
14
|
+
activeColor: "",
|
|
16
15
|
inactiveColor: "#c8c9cc",
|
|
17
16
|
iconSize: "20",
|
|
18
17
|
iconColor: "",
|
|
@@ -20,7 +19,7 @@ const defaultProps: IProps = {
|
|
|
20
19
|
borderBottom: false,
|
|
21
20
|
labelSize: "",
|
|
22
21
|
labelColor: "",
|
|
23
|
-
labelDisabled:
|
|
22
|
+
labelDisabled: false,
|
|
24
23
|
placement: "row",
|
|
25
24
|
};
|
|
26
25
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
2
|
import type { CheckboxColumnsVo, IFieldNames } from "../hy-check-button/typing";
|
|
3
3
|
|
|
4
|
-
export default interface
|
|
4
|
+
export default interface HyCheckboxProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description 双向绑定值,数组类型
|
|
7
7
|
* */
|
|
8
|
-
modelValue: (string | number)[];
|
|
8
|
+
modelValue: (string | number)[] | boolean;
|
|
9
9
|
/**
|
|
10
10
|
* @description 接收数组值
|
|
11
11
|
* */
|
|
@@ -61,7 +61,7 @@ export default interface IProps {
|
|
|
61
61
|
/**
|
|
62
62
|
* @description 是否禁止点击提示语选中复选框
|
|
63
63
|
* */
|
|
64
|
-
labelDisabled?:
|
|
64
|
+
labelDisabled?: boolean;
|
|
65
65
|
/**
|
|
66
66
|
* @description 定义需要用到的外部样式
|
|
67
67
|
* */
|