hy-app 0.3.16 → 0.4.1
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-action-sheet/hy-action-sheet.vue +2 -2
- package/components/hy-action-sheet/typing.d.ts +32 -33
- package/components/hy-back-top/hy-back-top.vue +36 -32
- package/components/hy-button/hy-button.vue +7 -7
- package/components/hy-button/typing.d.ts +39 -40
- package/components/hy-calendar/index.scss +1 -1
- package/components/hy-card/hy-card.vue +3 -3
- package/components/hy-cell/hy-cell.vue +125 -118
- package/components/hy-cell/index.scss +7 -7
- package/components/hy-checkbox/hy-checkbox.vue +17 -16
- package/components/hy-checkbox/index.scss +1 -1
- package/components/hy-checkbox-item/hy-checkbox-item.vue +25 -30
- package/components/hy-checkbox-item/index.scss +1 -1
- package/components/hy-code-input/hy-code-input.vue +314 -314
- package/components/hy-code-input/index.scss +12 -12
- package/components/hy-count-down/index.scss +1 -1
- package/components/hy-datetime-picker/index.scss +1 -1
- package/components/hy-datetime-picker/typing.d.ts +0 -1
- package/components/hy-divider/index.scss +3 -3
- package/components/hy-dropdown-item/hy-dropdown-item.vue +2 -2
- package/components/hy-dropdown-item/index.scss +5 -5
- package/components/hy-float-button/hy-float-button.vue +1 -1
- package/components/hy-float-button/index.scss +9 -18
- package/components/hy-folding-panel/index.scss +1 -1
- package/components/hy-form-item/hy-form-item.vue +10 -11
- package/components/hy-grid/hy-grid.vue +23 -23
- package/components/hy-grid/index.scss +2 -8
- package/components/hy-icon/index.scss +8 -8
- package/components/hy-input/hy-input.vue +45 -45
- package/components/hy-input/index.scss +20 -15
- package/components/hy-line-progress/index.scss +3 -3
- package/components/hy-list/hy-list.vue +2 -2
- package/components/hy-list/index.scss +4 -4
- package/components/hy-loading/hy-loading.vue +2 -3
- package/components/hy-loading/index.scss +17 -15
- package/components/hy-menu/hy-menu.vue +26 -16
- package/components/hy-menu/index.scss +1 -1
- package/components/hy-menu/typing.d.ts +16 -12
- package/components/hy-modal/hy-modal.vue +11 -11
- package/components/hy-modal/index.scss +17 -17
- package/components/hy-modal/typing.d.ts +0 -2
- package/components/hy-navbar/hy-navbar.vue +3 -3
- package/components/hy-navbar/index.scss +10 -11
- package/components/hy-notice-bar/hy-column-notice.vue +2 -2
- package/components/hy-notice-bar/hy-row-notice.vue +3 -3
- package/components/hy-notice-bar/index.scss +9 -12
- package/components/hy-notify/hy-notify.vue +8 -5
- package/components/hy-notify/index.scss +2 -2
- package/components/hy-number-step/index.scss +9 -10
- package/components/hy-pagination/index.scss +7 -2
- package/components/hy-parse/index.scss +0 -9
- package/components/hy-picker/hy-picker.vue +1 -1
- package/components/hy-picker/index.scss +9 -16
- package/components/hy-popover/hy-popover.vue +6 -4
- package/components/hy-popup/hy-popup.vue +4 -2
- package/components/hy-popup/index.scss +45 -32
- package/components/hy-qrcode/hy-qrcode.vue +3 -3
- package/components/hy-qrcode/index.scss +18 -17
- package/components/hy-radio/hy-radio.vue +20 -18
- package/components/hy-radio/index.scss +26 -22
- package/components/hy-rate/hy-rate.vue +5 -5
- package/components/hy-rate/index.scss +4 -4
- package/components/hy-read-more/hy-read-more.vue +19 -20
- package/components/hy-read-more/index.scss +12 -6
- package/components/hy-scroll-list/hy-scroll-list.vue +3 -6
- package/components/hy-scroll-list/index.scss +4 -4
- package/components/hy-search/index.scss +9 -8
- package/components/hy-slider/hy-slider.vue +17 -11
- package/components/hy-slider/index.scss +12 -12
- package/components/hy-status-bar/index.scss +3 -1
- package/components/hy-steps/hy-steps.vue +50 -23
- package/components/hy-submit-bar/hy-submit-bar.vue +1 -1
- package/components/hy-submit-bar/index.scss +5 -4
- package/components/hy-subsection/hy-subsection.vue +3 -3
- package/components/hy-subsection/index.scss +7 -7
- package/components/hy-swipe-action/hy-swipe-action.vue +8 -8
- package/components/hy-swipe-action/index.scss +8 -4
- package/components/hy-swiper/hy-swiper-indicator.vue +2 -2
- package/components/hy-swiper/hy-swiper.vue +6 -6
- package/components/hy-swiper/index.scss +6 -10
- package/components/hy-switch/hy-switch.vue +4 -4
- package/components/hy-switch/index.scss +4 -22
- package/components/hy-tabs/hy-tabs.vue +16 -16
- package/components/hy-tabs/index.scss +16 -16
- package/components/hy-tag/index.scss +1 -1
- package/components/hy-text/index.scss +3 -3
- package/components/hy-textarea/hy-textarea.vue +11 -11
- package/components/hy-textarea/index.scss +11 -10
- package/components/hy-toast/hy-toast.vue +5 -5
- package/components/hy-toast/index.scss +8 -8
- package/components/hy-tooltip/hy-tooltip.vue +193 -183
- package/components/hy-tooltip/index.scss +69 -45
- package/components/hy-upload/hy-upload.vue +15 -10
- package/components/hy-upload/index.scss +37 -36
- package/components/hy-warn/hy-warn.vue +11 -11
- package/components/hy-warn/index.scss +76 -82
- package/components/hy-waterfall/index.scss +2 -1
- package/composables/usePopover.ts +2 -2
- package/libs/css/mixin.scss +0 -9
- package/package.json +2 -2
- package/utils/inside.ts +4 -1
- package/utils/utils.ts +187 -162
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
border-radius: $hy-border-radius-semicircle;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
@include e(background) {
|
|
13
13
|
background-color: $hy-background--empty;
|
|
14
14
|
border-radius: $hy-border-radius-semicircle;
|
|
15
15
|
flex: 1;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
@include e(line) {
|
|
19
19
|
position: absolute;
|
|
20
20
|
top: 0;
|
|
21
21
|
left: 0;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
background-color: $hy-primary;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
@include e(text) {
|
|
33
33
|
font-size: 10px;
|
|
34
34
|
color: #ffffff;
|
|
35
35
|
margin-bottom: 1px;
|
|
@@ -186,7 +186,7 @@ const instance = getCurrentInstance();
|
|
|
186
186
|
onMounted(() => {
|
|
187
187
|
nextTick(async () => {
|
|
188
188
|
const res = await getRect(".hy-virtual-container", false, instance);
|
|
189
|
-
viewHeight.value = (res as UniApp.NodeInfo).height
|
|
189
|
+
viewHeight.value = (res as UniApp.NodeInfo).height || 0;
|
|
190
190
|
});
|
|
191
191
|
});
|
|
192
192
|
|
|
@@ -257,7 +257,7 @@ watch(
|
|
|
257
257
|
* @description 监听滚动条距离顶部距离,实时更新
|
|
258
258
|
*/
|
|
259
259
|
const onScroll = async (e: any) => {
|
|
260
|
-
scrollTop.value = e.detail.scrollTop
|
|
260
|
+
scrollTop.value = e.detail.scrollTop || 0;
|
|
261
261
|
};
|
|
262
262
|
|
|
263
263
|
/**
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
padding: 0 $hy-border-margin-padding-base;
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
@include e(list) {
|
|
9
9
|
overflow-anchor: none;
|
|
10
|
-
|
|
10
|
+
@include m(item) {
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
@include m(left) {
|
|
15
15
|
margin-right: $hy-border-margin-padding-base;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
@include m(box) {
|
|
18
18
|
box-sizing: border-box;
|
|
19
19
|
width: 50%;
|
|
20
20
|
display: flex;
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="hy-loading-icon"
|
|
4
4
|
:style="customStyle"
|
|
5
|
-
:class="[vertical && 'hy-loading-
|
|
5
|
+
:class="[vertical && 'hy-loading-icon__vertical']"
|
|
6
6
|
v-if="show"
|
|
7
7
|
>
|
|
8
8
|
<view
|
|
9
9
|
v-if="!webviewHide"
|
|
10
|
-
class="hy-loading-icon__spinner"
|
|
11
|
-
:class="[`hy-loading-icon__spinner--${mode}`]"
|
|
10
|
+
:class="['hy-loading-icon__spinner', `hy-loading-icon__spinner--${mode}`]"
|
|
12
11
|
ref="ani"
|
|
13
12
|
:style="{
|
|
14
13
|
color: color,
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
justify-content: center;
|
|
9
9
|
color: #c8c9cc;
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
@include e(text) {
|
|
12
12
|
margin-left: 4px;
|
|
13
13
|
color: $hy-text-color--grey;
|
|
14
14
|
font-size: 14px;
|
|
15
15
|
line-height: 20px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
@include e(spinner) {
|
|
19
19
|
width: 30px;
|
|
20
20
|
height: 30px;
|
|
21
21
|
position: relative;
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
max-height: 100%;
|
|
26
26
|
animation: hy-rotate 1s linear infinite;
|
|
27
27
|
/* #endif */
|
|
28
|
-
}
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
@include m(semicircle) {
|
|
30
|
+
border: 2px solid transparent;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
}
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
@include m(circle) {
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
border: 2px solid #e5e5e5;
|
|
37
|
+
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
@include m(vertical) {
|
|
41
41
|
flex-direction: column;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -49,20 +49,22 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
@include b(loading-icon) {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
@include e(spinner) {
|
|
53
|
+
@include m(spinner) {
|
|
54
|
+
animation-timing-function: steps(12);
|
|
55
|
+
}
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
&__text:empty {
|
|
57
59
|
display: none;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
@include e(vertical, text) {
|
|
61
63
|
margin: 6px 0 0;
|
|
62
64
|
color: $hy-text-color--grey;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
@include e(dot) {
|
|
66
68
|
position: absolute;
|
|
67
69
|
top: 0;
|
|
68
70
|
left: 0;
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
:class="menuItemClass(item, i)"
|
|
7
7
|
:style="customStyle"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
9
|
+
<template v-if="item.icon">
|
|
10
|
+
<slot v-if="$slots.icon" name="icon" :value="item.icon"></slot>
|
|
10
11
|
<hy-icon
|
|
11
|
-
|
|
12
|
+
v-else
|
|
13
|
+
class="hy-menu__item__icon"
|
|
12
14
|
:name="item.icon"
|
|
13
15
|
:color="current === i ? color || 'var(--hy-theme-color)' : ''"
|
|
14
16
|
:size="icon?.size || 16"
|
|
@@ -22,10 +24,9 @@
|
|
|
22
24
|
:round="icon?.round"
|
|
23
25
|
:customStyle="icon?.customStyle || { marginRight: '2px' }"
|
|
24
26
|
></hy-icon>
|
|
25
|
-
</
|
|
26
|
-
<slot>
|
|
27
|
-
|
|
28
|
-
</slot>
|
|
27
|
+
</template>
|
|
28
|
+
<slot v-if="$slots.default"></slot>
|
|
29
|
+
<text v-else class="hy-menu__item--title">{{ item.title }}</text>
|
|
29
30
|
<hy-badge
|
|
30
31
|
:value="item?.badge"
|
|
31
32
|
:offset="badge?.offset"
|
|
@@ -83,6 +84,15 @@ const props = defineProps({
|
|
|
83
84
|
type: Array as PropType<Array<MenusType>>,
|
|
84
85
|
default: [],
|
|
85
86
|
},
|
|
87
|
+
/** 对应的键 */
|
|
88
|
+
id: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "id",
|
|
91
|
+
},
|
|
92
|
+
name: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: "id",
|
|
95
|
+
},
|
|
86
96
|
/** 侧边菜单栏宽度 */
|
|
87
97
|
width: {
|
|
88
98
|
type: [String, Number],
|
|
@@ -110,23 +120,23 @@ const current = ref<string | number>(0);
|
|
|
110
120
|
watch(
|
|
111
121
|
() => props.modelValue,
|
|
112
122
|
(newVal) => {
|
|
113
|
-
|
|
114
|
-
// current.value = newVal;
|
|
123
|
+
if (newVal) current.value = newVal;
|
|
115
124
|
},
|
|
125
|
+
{ immediate: true },
|
|
116
126
|
);
|
|
117
127
|
|
|
118
128
|
const menuItemClass = computed(() => {
|
|
119
129
|
return (temp: MenusType, i: number) => {
|
|
120
130
|
const classes = [
|
|
121
|
-
"hy-
|
|
122
|
-
prefix.value && "hy-
|
|
123
|
-
suffix.value && "hy-
|
|
124
|
-
temp.disabled && "hy-
|
|
131
|
+
"hy-menu__item",
|
|
132
|
+
prefix.value && "hy-menu__item--prefix",
|
|
133
|
+
suffix.value && "hy-menu__item--suffix",
|
|
134
|
+
temp.disabled && "hy-menu__item--disabled",
|
|
125
135
|
];
|
|
126
|
-
if (current.value ===
|
|
136
|
+
if (current.value === temp[props.id]) {
|
|
127
137
|
classes.push(
|
|
128
|
-
"hy-
|
|
129
|
-
props.color && "hy-
|
|
138
|
+
"hy-menu__item--active",
|
|
139
|
+
props.color && "hy-menu__item--active__color",
|
|
130
140
|
);
|
|
131
141
|
}
|
|
132
142
|
|
|
@@ -182,7 +192,7 @@ function handleClick(temp: MenusType, i: number) {
|
|
|
182
192
|
|
|
183
193
|
<style lang="scss" scoped>
|
|
184
194
|
@import "./index.scss";
|
|
185
|
-
.hy-
|
|
195
|
+
.hy-menu__item--active__color {
|
|
186
196
|
color: v-bind(color);
|
|
187
197
|
&::before {
|
|
188
198
|
background: v-bind(color);
|
|
@@ -5,54 +5,58 @@ import type HyIconProps from "../hy-icon/typing";
|
|
|
5
5
|
export type ModelValueVo = string | number;
|
|
6
6
|
export interface MenusType {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 唯一id
|
|
9
9
|
* */
|
|
10
10
|
id: string | number;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 标题
|
|
13
13
|
* */
|
|
14
14
|
title: string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 是否禁用
|
|
17
17
|
* */
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* icon
|
|
21
21
|
* */
|
|
22
22
|
icon?: string;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* 徽标值
|
|
25
25
|
* */
|
|
26
26
|
badge?: number;
|
|
27
|
+
/**
|
|
28
|
+
* 键值
|
|
29
|
+
* */
|
|
30
|
+
[key: string]: string | number;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
export default interface HyMenuProps {
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* 当前值
|
|
32
36
|
* */
|
|
33
37
|
modelValue: string | number;
|
|
34
38
|
/**
|
|
35
|
-
*
|
|
39
|
+
* 菜单数据集
|
|
36
40
|
* */
|
|
37
41
|
list: MenusType[];
|
|
38
42
|
/**
|
|
39
|
-
*
|
|
43
|
+
* 侧边菜单栏宽度
|
|
40
44
|
* */
|
|
41
45
|
width?: string | number;
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* 选中颜色
|
|
44
48
|
* */
|
|
45
49
|
color?: string;
|
|
46
50
|
/**
|
|
47
|
-
*
|
|
51
|
+
* 图标属性值
|
|
48
52
|
* */
|
|
49
53
|
icon?: Partial<HyIconProps>;
|
|
50
54
|
/**
|
|
51
|
-
*
|
|
55
|
+
* 徽标属性值
|
|
52
56
|
* */
|
|
53
57
|
badge?: Partial<HyBadgeProps>;
|
|
54
58
|
/**
|
|
55
|
-
*
|
|
59
|
+
* 定义需要用到的外部样式
|
|
56
60
|
* */
|
|
57
61
|
customStyle?: CSSProperties;
|
|
58
62
|
}
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
}"
|
|
28
28
|
>
|
|
29
29
|
<slot>
|
|
30
|
-
<text class="hy-
|
|
30
|
+
<text class="hy-modal__content--text">
|
|
31
31
|
{{ content }}
|
|
32
32
|
</text>
|
|
33
33
|
</slot>
|
|
34
34
|
</view>
|
|
35
35
|
<view
|
|
36
|
-
class="hy-modal__button
|
|
36
|
+
class="hy-modal__button--group__confirm-button"
|
|
37
37
|
v-if="$slots.confirmButton"
|
|
38
38
|
>
|
|
39
39
|
<slot name="confirmButton"></slot>
|
|
@@ -41,26 +41,26 @@
|
|
|
41
41
|
<template v-else>
|
|
42
42
|
<view
|
|
43
43
|
:class="[
|
|
44
|
-
'hy-modal__button
|
|
44
|
+
'hy-modal__button--group',
|
|
45
45
|
showCancelButton &&
|
|
46
46
|
showConfirmButton &&
|
|
47
47
|
(!buttonReverse
|
|
48
|
-
? 'hy-modal__button
|
|
49
|
-
: 'hy-modal__button
|
|
48
|
+
? 'hy-modal__button--exact'
|
|
49
|
+
: 'hy-modal__button--exact--reverse'),
|
|
50
50
|
]"
|
|
51
51
|
:style="{
|
|
52
52
|
flexDirection: buttonReverse ? 'row-reverse' : 'row',
|
|
53
53
|
}"
|
|
54
54
|
>
|
|
55
55
|
<view
|
|
56
|
-
class="hy-modal__button
|
|
56
|
+
class="hy-modal__button--group__wrapper first hy-modal__button--group__wrapper--cancel"
|
|
57
57
|
:hover-stay-time="150"
|
|
58
|
-
hover-class="hy-modal__button
|
|
58
|
+
hover-class="hy-modal__button--group__wrapper--hover"
|
|
59
59
|
v-if="showCancelButton"
|
|
60
60
|
@tap.stop="cancelHandler"
|
|
61
61
|
>
|
|
62
62
|
<text
|
|
63
|
-
class="hy-modal__button
|
|
63
|
+
class="hy-modal__button--group__wrapper--text hy-modal__button--group__wrapper--cancel__text"
|
|
64
64
|
:style="{
|
|
65
65
|
color: cancelColor,
|
|
66
66
|
}"
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
</text>
|
|
70
70
|
</view>
|
|
71
71
|
<view
|
|
72
|
-
class="hy-modal__button
|
|
72
|
+
class="hy-modal__button--group__wrapper last hy-modal__button--group__wrapper--confirm"
|
|
73
73
|
:hover-stay-time="150"
|
|
74
|
-
hover-class="hy-modal__button
|
|
74
|
+
hover-class="hy-modal__button--group__wrapper--hover"
|
|
75
75
|
v-if="showConfirmButton"
|
|
76
76
|
@tap="confirmHandler"
|
|
77
77
|
>
|
|
78
78
|
<HyLoading v-if="load" mode="circle"></HyLoading>
|
|
79
79
|
<text
|
|
80
80
|
v-else
|
|
81
|
-
class="hy-modal__button
|
|
81
|
+
class="hy-modal__button--group__wrapper--text hy-modal__button--group__wrapper--confirm__text"
|
|
82
82
|
:style="{
|
|
83
83
|
color: confirmColor,
|
|
84
84
|
}"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
|
|
9
9
|
/* 标题 */
|
|
10
|
-
|
|
10
|
+
@include e(title) {
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
justify-content: center;
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/* 内容 */
|
|
23
|
-
|
|
23
|
+
@include e(content) {
|
|
24
24
|
padding: 20px;
|
|
25
25
|
@include flex;
|
|
26
26
|
justify-content: center;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
@include m(text) {
|
|
29
29
|
font-size: $hy-font-size-sm;
|
|
30
30
|
color: $hy-text-color--grey;
|
|
31
31
|
flex: 1;
|
|
@@ -34,32 +34,32 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/* 底部按钮 */
|
|
37
|
-
|
|
37
|
+
@include e(button) {
|
|
38
38
|
/* 两个按钮的样式 */
|
|
39
|
-
|
|
40
|
-
.
|
|
39
|
+
@include m(exact) {
|
|
40
|
+
.first {
|
|
41
41
|
margin-right: $hy-border-margin-padding-lg;
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
.
|
|
43
|
+
@include m(reverse) {
|
|
44
|
+
.last {
|
|
45
45
|
margin-right: $hy-border-margin-padding-lg;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
@include m(group) {
|
|
52
52
|
@include flex;
|
|
53
53
|
padding: 20px;
|
|
54
54
|
|
|
55
55
|
/* 自定义底部按钮 */
|
|
56
|
-
|
|
56
|
+
@include e(confirm-button) {
|
|
57
57
|
flex-direction: column;
|
|
58
58
|
padding: 0 25px 15px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
@include e(wrapper) {
|
|
63
63
|
flex: 1;
|
|
64
64
|
@include flex;
|
|
65
65
|
justify-content: center;
|
|
@@ -68,28 +68,28 @@
|
|
|
68
68
|
border-radius: $hy-border-radius-semicircle;
|
|
69
69
|
|
|
70
70
|
/* 确认 */
|
|
71
|
-
|
|
71
|
+
@include m(confirm) {
|
|
72
72
|
background-color: $hy-primary;
|
|
73
|
-
|
|
73
|
+
@include e(text) {
|
|
74
74
|
color: #FFFFFF;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/* 取消 */
|
|
79
|
-
|
|
79
|
+
@include m(cancel) {
|
|
80
80
|
//background-color: $hy-background--empty;
|
|
81
81
|
background-color: $hy-background--empty;
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
@include e(text) {
|
|
84
84
|
color: $hy-text-color;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
@include m(hover) {
|
|
89
89
|
opacity: 0.7;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
@include m(text) {
|
|
93
93
|
font-size: 16px;
|
|
94
94
|
text-align: center;
|
|
95
95
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
height: addUnit(getPx(height) + statusBarHeight),
|
|
8
8
|
}"
|
|
9
9
|
></view>
|
|
10
|
-
<view :class="[fixed && 'hy-
|
|
10
|
+
<view :class="[fixed && 'hy-navbar__fixed']">
|
|
11
11
|
<HyStatusBar v-if="safeAreaInsetTop" :bgColor="bgColor"></HyStatusBar>
|
|
12
12
|
<view
|
|
13
13
|
:class="[border && 'hy-border__bottom', 'hy-navbar__content']"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
:style="{
|
|
35
35
|
color: leftIconColor,
|
|
36
36
|
}"
|
|
37
|
-
class="hy-
|
|
37
|
+
class="hy-navbar__content__left--text"
|
|
38
38
|
>
|
|
39
39
|
{{ leftText }}
|
|
40
40
|
</text>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
>
|
|
76
76
|
<slot name="right">
|
|
77
77
|
<HyIcon v-if="rightIcon" :name="rightIcon" size="20"></HyIcon>
|
|
78
|
-
<text v-if="rightText" class="hy-
|
|
78
|
+
<text v-if="rightText" class="hy-navbar__content__right--text">{{
|
|
79
79
|
rightText
|
|
80
80
|
}}</text>
|
|
81
81
|
</slot>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
z-index: 11;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
@include e(content) {
|
|
15
15
|
@include flex(row);
|
|
16
16
|
align-items: center;
|
|
17
17
|
height: 44px;
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
position: relative;
|
|
20
20
|
justify-content: center;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
&__right {
|
|
22
|
+
@include e(left, right) {
|
|
24
23
|
padding: 0 13px;
|
|
25
24
|
position: absolute;
|
|
26
25
|
top: 0;
|
|
@@ -29,36 +28,36 @@
|
|
|
29
28
|
align-items: center;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
@include e(left){
|
|
33
32
|
left: 0;
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
@include m(hover) {
|
|
36
35
|
opacity: 0.7;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
@include m(text) {
|
|
40
39
|
font-size: 15px;
|
|
41
40
|
margin-left: 3px;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
@include e(center) {
|
|
46
45
|
display: flex;
|
|
47
46
|
flex-direction: column;
|
|
48
47
|
text-align: center;
|
|
49
|
-
|
|
48
|
+
@include m(title) {
|
|
50
49
|
font-size: $hy-font-size-base;
|
|
51
50
|
}
|
|
52
|
-
|
|
51
|
+
@include m(sub) {
|
|
53
52
|
font-size: $hy-font-size-sm;
|
|
54
53
|
color: $hy-text-color--grey;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
@include e(right) {
|
|
59
58
|
right: 0;
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
@include m(text) {
|
|
62
61
|
font-size: 15px;
|
|
63
62
|
margin-left: 3px;
|
|
64
63
|
}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
<swiper-item
|
|
19
19
|
v-for="(item, index) in text"
|
|
20
20
|
:key="index"
|
|
21
|
-
class="hy-
|
|
21
|
+
class="hy-notice__swiper--item"
|
|
22
22
|
:style="{ justifyContent: justifyContent }"
|
|
23
23
|
>
|
|
24
|
-
<text class="hy-
|
|
24
|
+
<text class="hy-notice__swiper--item__text" :style="[textStyle]">{{
|
|
25
25
|
item
|
|
26
26
|
}}</text>
|
|
27
27
|
</swiper-item>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
</slot>
|
|
8
8
|
<view class="hy-notice__content" ref="hy-notice__content">
|
|
9
9
|
<view
|
|
10
|
-
ref="hy-
|
|
11
|
-
class="hy-
|
|
10
|
+
ref="hy-notice__content--text"
|
|
11
|
+
class="hy-notice__content--text"
|
|
12
12
|
:style="animationStyle"
|
|
13
13
|
>
|
|
14
14
|
<text
|
|
@@ -74,7 +74,7 @@ watch(
|
|
|
74
74
|
// 进行一定的延时
|
|
75
75
|
await sleep();
|
|
76
76
|
// 查询盒子和文字的宽度
|
|
77
|
-
textWidth = (await getRect(".hy-
|
|
77
|
+
textWidth = (await getRect(".hy-notice__content--text", false, instance))
|
|
78
78
|
.width;
|
|
79
79
|
boxWidth = (await getRect(".hy-notice__content", false, instance)).width;
|
|
80
80
|
// 根据t=s/v(时间=路程/速度),这里为何不需要加上#u-notice-box的宽度,因为中设置了.u-notice-content样式中设置了padding-left: 100%
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
border-radius: $hy-border-radius-sm;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
@include e(left-icon) {
|
|
20
20
|
align-items: center;
|
|
21
21
|
margin-right: 5px;
|
|
22
22
|
:deep(.hy-icon) {
|
|
@@ -24,25 +24,22 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
@include e(right-icon) {
|
|
28
|
+
margin-left: 5px;
|
|
29
|
+
align-items: center;
|
|
28
30
|
:deep(.hy-icon) {
|
|
29
31
|
color: $hy-warning;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
margin-left: 5px;
|
|
35
|
-
align-items: center;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__content {
|
|
35
|
+
@include e(content) {
|
|
39
36
|
text-align: right;
|
|
40
37
|
flex: 1;
|
|
41
38
|
@include flex;
|
|
42
39
|
flex-wrap: nowrap;
|
|
43
40
|
overflow: hidden;
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
@include m(text) {
|
|
46
43
|
font-size: 14px;
|
|
47
44
|
color: $hy-warning;
|
|
48
45
|
/* #ifndef APP-NVUE */
|
|
@@ -57,18 +54,18 @@
|
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
|
|
57
|
+
@include e(swiper) {
|
|
61
58
|
height: 16px;
|
|
62
59
|
@include flex;
|
|
63
60
|
align-items: center;
|
|
64
61
|
flex: 1;
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
@include m(item) {
|
|
67
64
|
@include flex;
|
|
68
65
|
align-items: center;
|
|
69
66
|
overflow: hidden;
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
@include e(text) {
|
|
72
69
|
font-size: 14px;
|
|
73
70
|
color: $hy-warning;
|
|
74
71
|
}
|