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,8 @@
|
|
|
1
1
|
@use "../../theme.scss" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
@include b(slider) {
|
|
5
6
|
position: relative;
|
|
6
7
|
@include flex;
|
|
7
8
|
align-items: center;
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
// transform: translate3d(50%, -50%, 0);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
@include m(disabled) {
|
|
75
76
|
opacity: 0.5;
|
|
76
77
|
}
|
|
77
78
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
>
|
|
8
8
|
<!-- 线条 -->
|
|
9
9
|
<view
|
|
10
|
-
v-if="i
|
|
11
|
-
:class="[`hy-steps-item__line--${direction}`, 'hy-steps-item__line']"
|
|
10
|
+
v-if="i > 0"
|
|
11
|
+
:class="[`hy-steps-item__line--${direction}`, 'hy-steps-item__line', statusClass(i, item.error)]"
|
|
12
12
|
:style="lineStyle(item, i)"
|
|
13
13
|
></view>
|
|
14
14
|
<!-- 线条 -->
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
<view
|
|
18
18
|
:class="[
|
|
19
19
|
`hy-steps-item__wrapper--${direction}`,
|
|
20
|
-
dot
|
|
21
|
-
'hy-steps-item__wrapper'
|
|
20
|
+
dot ? `hy-steps-item__wrapper--dot` : statusClass(i, item.error),
|
|
21
|
+
'hy-steps-item__wrapper'
|
|
22
22
|
]"
|
|
23
23
|
:style="itemStyleInner"
|
|
24
24
|
>
|
|
25
25
|
<slot name="icon" :error="item?.error" :index="i">
|
|
26
26
|
<view
|
|
27
|
-
class="hy-steps-
|
|
27
|
+
:class="['hy-steps-item__wrapper--dot__item', `hy-steps-item__wrapper--dot__${statusClass(i, item.error)}`]"
|
|
28
28
|
v-if="dot"
|
|
29
29
|
:style="{
|
|
30
30
|
backgroundColor: statusColor(i, item?.error),
|
|
@@ -111,19 +111,30 @@
|
|
|
111
111
|
</view>
|
|
112
112
|
</template>
|
|
113
113
|
|
|
114
|
+
<script lang="ts">
|
|
115
|
+
export default {
|
|
116
|
+
name: 'hy-steps',
|
|
117
|
+
options: {
|
|
118
|
+
addGlobalClass: true,
|
|
119
|
+
virtualHost: true,
|
|
120
|
+
styleIsolation: 'shared'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
|
|
114
125
|
<script setup lang="ts">
|
|
115
|
-
import {computed, type CSSProperties, toRefs, ref, onMounted, getCurrentInstance} from "vue";
|
|
126
|
+
import {computed, type CSSProperties, toRefs, ref, onMounted, getCurrentInstance, watch} from "vue";
|
|
116
127
|
import defaultProps from "./props";
|
|
117
128
|
import type IProps from "./typing";
|
|
118
129
|
import type { StepListVo } from "./typing";
|
|
119
|
-
import {
|
|
130
|
+
import {addUnit, getRect} from "../../utils";
|
|
120
131
|
import { ColorConfig, IconConfig } from "../../config";
|
|
121
132
|
|
|
122
133
|
// 组件
|
|
123
134
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
124
135
|
|
|
125
136
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
126
|
-
const { current, direction, dot, inactiveColor, activeColor } = toRefs(props);
|
|
137
|
+
const { current, list, direction, dot, inactiveColor, activeColor } = toRefs(props);
|
|
127
138
|
const emit = defineEmits(["click", "update:current"]);
|
|
128
139
|
|
|
129
140
|
const size = ref<UniApp.NodeInfo>({
|
|
@@ -132,29 +143,38 @@ const size = ref<UniApp.NodeInfo>({
|
|
|
132
143
|
});
|
|
133
144
|
const instance = getCurrentInstance();
|
|
134
145
|
|
|
146
|
+
watch(
|
|
147
|
+
() => current.value,
|
|
148
|
+
(newVal: number) => {
|
|
149
|
+
if(list.value[newVal - 1]?.error) {
|
|
150
|
+
const index = list.value.findIndex(item => item.error);
|
|
151
|
+
emit("update:current", index);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @description 线条样式
|
|
158
|
+
* */
|
|
135
159
|
const lineStyle = computed(() => {
|
|
136
160
|
return (temp: StepListVo, index: number): CSSProperties => {
|
|
137
161
|
const style: CSSProperties = {};
|
|
138
162
|
if (direction.value === "row") {
|
|
139
|
-
style.width = addUnit(size.value.width);
|
|
140
|
-
style.left = addUnit(size.value.width! / 2);
|
|
163
|
+
style.width = addUnit(size.value.width! - 25);
|
|
164
|
+
style.left = addUnit(-size.value.width! / 2 + 12);
|
|
141
165
|
} else {
|
|
142
|
-
style.height = addUnit(size.value.height);
|
|
143
|
-
|
|
166
|
+
style.height = addUnit(size.value.height! - 30);
|
|
167
|
+
style.top = addUnit(25)
|
|
144
168
|
}
|
|
145
169
|
style.backgroundColor = temp.error
|
|
146
|
-
?
|
|
170
|
+
? ''
|
|
147
171
|
: index < current.value
|
|
148
172
|
? activeColor.value
|
|
149
173
|
: inactiveColor.value;
|
|
150
174
|
return style;
|
|
151
175
|
};
|
|
152
176
|
});
|
|
153
|
-
|
|
154
|
-
// return {
|
|
155
|
-
// ...itemStyle.value
|
|
156
|
-
// }
|
|
157
|
-
// }
|
|
177
|
+
|
|
158
178
|
const itemStyleInner = computed(() => {
|
|
159
179
|
return {};
|
|
160
180
|
});
|
|
@@ -165,8 +185,6 @@ const statusClass = computed(() => {
|
|
|
165
185
|
return (index: number, error: boolean = false) => {
|
|
166
186
|
if (current.value == index) {
|
|
167
187
|
return error ? "error" : "process";
|
|
168
|
-
} else if (error) {
|
|
169
|
-
return "error";
|
|
170
188
|
} else if (current.value > index) {
|
|
171
189
|
return "finish";
|
|
172
190
|
} else {
|
|
@@ -1,8 +1,21 @@
|
|
|
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(steps) {
|
|
8
|
+
//color: $hy-dark-color;
|
|
9
|
+
&__wrapper__nav__item--active {
|
|
10
|
+
.hy-tabs__wrapper__nav__item--text {
|
|
11
|
+
color: $hy-dark-color;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
4
17
|
|
|
5
|
-
|
|
18
|
+
@include b(steps) {
|
|
6
19
|
@include flex;
|
|
7
20
|
|
|
8
21
|
&--column {
|
|
@@ -40,26 +53,46 @@
|
|
|
40
53
|
justify-content: center;
|
|
41
54
|
align-items: center;
|
|
42
55
|
position: relative;
|
|
43
|
-
background-color:
|
|
56
|
+
background-color: transparent;
|
|
44
57
|
border-radius: $hy-border-radius-semicircle;
|
|
45
58
|
|
|
59
|
+
/* 选择 */
|
|
60
|
+
&.process {
|
|
61
|
+
background-color: $hy-primary;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* 已完成 */
|
|
65
|
+
&.finish {
|
|
66
|
+
border: 1px solid $hy-primary;
|
|
67
|
+
:deep(.hy-icon) {
|
|
68
|
+
color: $hy-primary;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
46
72
|
&--column {
|
|
47
73
|
width: 20px;
|
|
48
74
|
height: 20px;
|
|
49
|
-
|
|
50
|
-
&--dot {
|
|
51
|
-
height: 20px;
|
|
52
|
-
width: 20px;
|
|
53
|
-
}
|
|
54
75
|
}
|
|
55
76
|
|
|
56
77
|
&--row {
|
|
57
78
|
width: 20px;
|
|
58
79
|
height: 20px;
|
|
80
|
+
}
|
|
59
81
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
82
|
+
/* 点形状 */
|
|
83
|
+
&--dot {
|
|
84
|
+
&__item {
|
|
85
|
+
width: 10px;
|
|
86
|
+
height: 10px;
|
|
87
|
+
border-radius: $hy-border-radius-circle;
|
|
88
|
+
background-color: $hy-info;
|
|
89
|
+
border: none;
|
|
90
|
+
}
|
|
91
|
+
&__finish {
|
|
92
|
+
background-color: $hy-primary;
|
|
93
|
+
}
|
|
94
|
+
&__process {
|
|
95
|
+
background-color: $hy-primary;
|
|
63
96
|
}
|
|
64
97
|
}
|
|
65
98
|
|
|
@@ -87,13 +120,6 @@
|
|
|
87
120
|
line-height: 11px;
|
|
88
121
|
}
|
|
89
122
|
}
|
|
90
|
-
|
|
91
|
-
&__dot {
|
|
92
|
-
width: 10px;
|
|
93
|
-
height: 10px;
|
|
94
|
-
border-radius: $hy-border-radius-semicircle;
|
|
95
|
-
background-color: $hy-color-subtitle;
|
|
96
|
-
}
|
|
97
123
|
}
|
|
98
124
|
|
|
99
125
|
&__content {
|
|
@@ -113,10 +139,24 @@
|
|
|
113
139
|
}
|
|
114
140
|
}
|
|
115
141
|
|
|
142
|
+
/* 线条样式 */
|
|
116
143
|
&__line {
|
|
117
144
|
position: absolute;
|
|
118
145
|
background: $hy-tips-color;
|
|
119
146
|
|
|
147
|
+
&.finish {
|
|
148
|
+
background-color: $hy-primary;
|
|
149
|
+
}
|
|
150
|
+
&.process {
|
|
151
|
+
background-color: $hy-primary;
|
|
152
|
+
}
|
|
153
|
+
&.error {
|
|
154
|
+
background-color: $hy-error;
|
|
155
|
+
}
|
|
156
|
+
&.wait {
|
|
157
|
+
background-color: $hy-info;
|
|
158
|
+
}
|
|
159
|
+
|
|
120
160
|
&--row {
|
|
121
161
|
top: $hy-border-margin-padding-base;
|
|
122
162
|
height: 1px;
|
|
@@ -69,6 +69,17 @@
|
|
|
69
69
|
</view>
|
|
70
70
|
</template>
|
|
71
71
|
|
|
72
|
+
<script lang="ts">
|
|
73
|
+
export default {
|
|
74
|
+
name: "hy-submit-bar",
|
|
75
|
+
options: {
|
|
76
|
+
addGlobalClass: true,
|
|
77
|
+
virtualHost: true,
|
|
78
|
+
styleIsolation: "shared",
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
82
|
+
|
|
72
83
|
<script setup lang="ts">
|
|
73
84
|
import type IProps from "./typing";
|
|
74
85
|
import defaultProps from "./props";
|
|
@@ -102,6 +113,7 @@ const emit = defineEmits(["click", "menuClick"]);
|
|
|
102
113
|
const submitBarStyle = computed(() => {
|
|
103
114
|
const style: CSSProperties = {
|
|
104
115
|
bottom: 0,
|
|
116
|
+
left: 0,
|
|
105
117
|
};
|
|
106
118
|
if (fixed.value) style.position = "fixed";
|
|
107
119
|
return Object.assign(style, customStyle.value);
|
|
@@ -179,38 +191,5 @@ const confirmClickFn = debounce((i: number) => {
|
|
|
179
191
|
</script>
|
|
180
192
|
|
|
181
193
|
<style lang="scss" scoped>
|
|
182
|
-
@import "
|
|
183
|
-
.hy-submit-bar {
|
|
184
|
-
display: flex;
|
|
185
|
-
background-color: #ffffff;
|
|
186
|
-
padding: $hy-border-margin-padding-base;
|
|
187
|
-
width: 100%;
|
|
188
|
-
box-sizing: border-box;
|
|
189
|
-
/*左边内容*/
|
|
190
|
-
&__left {
|
|
191
|
-
display: flex;
|
|
192
|
-
font-size: 20rpx;
|
|
193
|
-
flex: 1;
|
|
194
|
-
&--item {
|
|
195
|
-
margin: 0 $hy-border-margin-padding-base;
|
|
196
|
-
position: relative;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/*右边内容*/
|
|
201
|
-
&__right {
|
|
202
|
-
display: flex;
|
|
203
|
-
justify-content: flex-end;
|
|
204
|
-
font-size: 26rpx;
|
|
205
|
-
align-items: center;
|
|
206
|
-
width: 400rpx;
|
|
207
|
-
&--button {
|
|
208
|
-
padding: $hy-border-margin-padding-base $hy-border-margin-padding-lg;
|
|
209
|
-
color: #ffffff;
|
|
210
|
-
display: flex;
|
|
211
|
-
justify-content: center;
|
|
212
|
-
align-items: center;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
194
|
+
@import "./index.scss";
|
|
216
195
|
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
/* 暗色主题 */
|
|
5
|
+
@include b(theme){
|
|
6
|
+
@include m(dark) {
|
|
7
|
+
@include b(submit-bar) {
|
|
8
|
+
background-color: $hy-dark-background;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include b(submit-bar) {
|
|
14
|
+
display: flex;
|
|
15
|
+
background-color: $hy-light-background-color;
|
|
16
|
+
padding: $hy-border-margin-padding-base;
|
|
17
|
+
width: 100%;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
/*左边内容*/
|
|
20
|
+
&__left {
|
|
21
|
+
display: flex;
|
|
22
|
+
font-size: 20rpx;
|
|
23
|
+
flex: 1;
|
|
24
|
+
&--item {
|
|
25
|
+
margin: 0 $hy-border-margin-padding-base;
|
|
26
|
+
position: relative;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*右边内容*/
|
|
31
|
+
&__right {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: flex-end;
|
|
34
|
+
font-size: 26rpx;
|
|
35
|
+
align-items: center;
|
|
36
|
+
width: 400rpx;
|
|
37
|
+
&--button {
|
|
38
|
+
padding: $hy-border-margin-padding-base $hy-border-margin-padding-lg;
|
|
39
|
+
color: #ffffff;
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -20,6 +20,17 @@
|
|
|
20
20
|
</view>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
export default {
|
|
25
|
+
name: 'hy-subsection',
|
|
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 {computed, toRefs, ref, onMounted, watch, getCurrentInstance} from "vue";
|
|
25
36
|
import type { CSSProperties } from "vue";
|
|
@@ -72,6 +83,7 @@ const wrapperClass = computed(() => {
|
|
|
72
83
|
"hy-subsection__item",
|
|
73
84
|
"cursor-pointer",
|
|
74
85
|
`hy-subsection__item--${innerCurrent.value}__${guidClass}`,
|
|
86
|
+
`hy-subsection__item--${mode.value}`,
|
|
75
87
|
index < list.value.length - 1 && "hy-subsection__item--no-border-right",
|
|
76
88
|
index === 0 && "hy-subsection__item--first",
|
|
77
89
|
index === list.value.length - 1 && "hy-subsection__item--last",
|
|
@@ -1,7 +1,22 @@
|
|
|
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(subsection) {
|
|
8
|
+
color: $hy-dark-color;
|
|
9
|
+
@include m(button) {
|
|
10
|
+
background-color: $hy-dark-background--track;
|
|
11
|
+
&__bar {
|
|
12
|
+
background-color: $hy-dark-background--container;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include b(subsection) {
|
|
5
20
|
@include flex;
|
|
6
21
|
position: relative;
|
|
7
22
|
overflow: hidden;
|
|
@@ -10,7 +25,7 @@
|
|
|
10
25
|
box-sizing: border-box;
|
|
11
26
|
/* #endif */
|
|
12
27
|
|
|
13
|
-
|
|
28
|
+
@include m(button) {
|
|
14
29
|
height: 35px;
|
|
15
30
|
background-color: rgb(238, 238, 239);
|
|
16
31
|
padding: 3px;
|
|
@@ -23,7 +38,7 @@
|
|
|
23
38
|
}
|
|
24
39
|
}
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
@include m(subsection) {
|
|
27
42
|
height: 32px;
|
|
28
43
|
}
|
|
29
44
|
|
|
@@ -34,16 +49,17 @@
|
|
|
34
49
|
transition-duration: 0.3s;
|
|
35
50
|
transition-timing-function: ease-in-out;
|
|
36
51
|
/* #endif */
|
|
52
|
+
background-color: $hy-primary;
|
|
37
53
|
|
|
38
|
-
|
|
54
|
+
@include m(first) {
|
|
39
55
|
border-radius: $hy-border-radius-sm 0 0 $hy-border-radius-sm;
|
|
40
56
|
}
|
|
41
57
|
|
|
42
|
-
|
|
58
|
+
@include m(center) {
|
|
43
59
|
border-radius: 0;
|
|
44
60
|
}
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
@include m(last) {
|
|
47
63
|
border-radius: 0 $hy-border-radius-sm $hy-border-radius-sm 0;
|
|
48
64
|
}
|
|
49
65
|
}
|
|
@@ -56,16 +72,20 @@
|
|
|
56
72
|
// vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
|
|
57
73
|
position: relative;
|
|
58
74
|
|
|
75
|
+
@include m(subsection) {
|
|
76
|
+
border: 1px solid $hy-primary;
|
|
77
|
+
}
|
|
78
|
+
|
|
59
79
|
&--no-border-right {
|
|
60
80
|
border-right-width: 0 !important;
|
|
61
81
|
}
|
|
62
82
|
|
|
63
|
-
|
|
83
|
+
@include m(first) {
|
|
64
84
|
border-top-left-radius: $hy-border-radius-sm;
|
|
65
85
|
border-bottom-left-radius: $hy-border-radius-sm;
|
|
66
86
|
}
|
|
67
87
|
|
|
68
|
-
|
|
88
|
+
@include m(last) {
|
|
69
89
|
border-top-right-radius: $hy-border-radius-sm;
|
|
70
90
|
border-bottom-right-radius: $hy-border-radius-sm;
|
|
71
91
|
}
|
|
@@ -9,12 +9,12 @@ const defaultProps: IProps = {
|
|
|
9
9
|
label: "name",
|
|
10
10
|
value: "value",
|
|
11
11
|
},
|
|
12
|
-
activeColor:
|
|
13
|
-
inactiveColor: "
|
|
12
|
+
activeColor: "",
|
|
13
|
+
inactiveColor: "",
|
|
14
14
|
mode: "button",
|
|
15
15
|
fontSize: 12,
|
|
16
16
|
bold: true,
|
|
17
|
-
bgColor: "
|
|
17
|
+
bgColor: "",
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export default defaultProps;
|
|
@@ -91,6 +91,17 @@
|
|
|
91
91
|
</view>
|
|
92
92
|
</template>
|
|
93
93
|
|
|
94
|
+
<script lang="ts">
|
|
95
|
+
export default {
|
|
96
|
+
name: 'hy-swiper',
|
|
97
|
+
options: {
|
|
98
|
+
addGlobalClass: true,
|
|
99
|
+
virtualHost: true,
|
|
100
|
+
styleIsolation: 'shared'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
|
|
94
105
|
<script setup lang="ts">
|
|
95
106
|
import {
|
|
96
107
|
computed,
|
|
@@ -1,7 +1,18 @@
|
|
|
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(swiper__wrapper) {
|
|
8
|
+
:deep(.uni-swiper-wrapper) {
|
|
9
|
+
background-color: $hy-dark-background--container;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include b(swiper) {
|
|
5
16
|
@include flex;
|
|
6
17
|
justify-content: center;
|
|
7
18
|
align-items: center;
|
|
@@ -51,7 +62,7 @@
|
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
|
|
54
|
-
|
|
65
|
+
@include b(swiper-indicator) {
|
|
55
66
|
&__wrapper {
|
|
56
67
|
@include flex;
|
|
57
68
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties, PropType } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
HyApp,
|
|
4
|
-
type SwiperIndicatorModeType,
|
|
5
|
-
} from "@/package/typing/modules/common";
|
|
2
|
+
import { HyApp } from "@/package/typing/modules/common";
|
|
6
3
|
|
|
7
|
-
export default interface
|
|
4
|
+
export default interface HySwiperProps {
|
|
8
5
|
/**
|
|
9
6
|
* @description 轮播图数据
|
|
10
7
|
* */
|