@ecolovo/uniapp-components 1.0.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/aspect/aspect.vue +43 -0
- package/components/badge/badge.vue +88 -0
- package/components/button/button.vue +409 -0
- package/components/checkbox/checkbox.vue +183 -0
- package/components/checkbox-group/checkbox-group.vue +101 -0
- package/components/checkbox-group2/checkbox-group2.vue +138 -0
- package/components/checkbox-group2/checkbox.vue +103 -0
- package/components/data-list/data-list.vue +130 -0
- package/components/date-picker/date-picker-view.vue +181 -0
- package/components/date-picker/date-picker.vue +237 -0
- package/components/datetime-picker/datetime-picker-view.vue +209 -0
- package/components/datetime-picker/datetime-picker.vue +235 -0
- package/components/dialog/dialog-content.vue +162 -0
- package/components/dialog/dialog.vue +166 -0
- package/components/dropdown/dropdown.vue +145 -0
- package/components/empty/empty.vue +102 -0
- package/components/flex/flex.vue +76 -0
- package/components/form/form.vue +43 -0
- package/components/form/mixin.js +13 -0
- package/components/form-item/form-item.vue +141 -0
- package/components/icon/icon.vue +114 -0
- package/components/image/image.vue +61 -0
- package/components/input/input.vue +154 -0
- package/components/input/password-input.vue +95 -0
- package/components/list-page/list-page.js +10 -0
- package/components/list-page/list-page.vue +150 -0
- package/components/load-more/load-more.vue +97 -0
- package/components/loading/animations/loading-animation1.vue +92 -0
- package/components/loading/animations/loading-animation2.vue +28 -0
- package/components/loading/animations/loading-animation3.vue +81 -0
- package/components/loading/animations/loading-animation4.vue +74 -0
- package/components/loading/loading.vue +91 -0
- package/components/message-box/message-box.vue +60 -0
- package/components/number-dialog/number-dialog.vue +360 -0
- package/components/number-input/number-input.vue +352 -0
- package/components/numpad/numpad.vue +224 -0
- package/components/page/page-body.vue +227 -0
- package/components/page/page-footer.vue +75 -0
- package/components/page/page-header.vue +222 -0
- package/components/page/page.vue +128 -0
- package/components/picker/picker-popup.vue +295 -0
- package/components/picker/picker.vue +151 -0
- package/components/popover/popover-content.vue +255 -0
- package/components/popover/popover-mask.vue +113 -0
- package/components/popover/popover.vue +84 -0
- package/components/popup/popup-content.vue +162 -0
- package/components/popup/popup.vue +168 -0
- package/components/price/price.vue +104 -0
- package/components/search/search.vue +220 -0
- package/components/searching/searching.vue +86 -0
- package/components/selector/selector.vue +86 -0
- package/components/switch/switch.vue +180 -0
- package/components/tab/tab.vue +235 -0
- package/components/table/table.vue +112 -0
- package/components/textarea/textarea.vue +192 -0
- package/components/time-picker/time-picker-view.vue +127 -0
- package/components/time-picker/time-picker.vue +140 -0
- package/components/uploader/download.js +81 -0
- package/components/uploader/file-uploader.vue +52 -0
- package/components/uploader/files.js +225 -0
- package/components/uploader/media-uploader.vue +133 -0
- package/components/uploader/mixin.js +106 -0
- package/components/uploader/uni.js +38 -0
- package/components/uploader/upload-button.vue +29 -0
- package/components/uploader/uploader copy.vue +547 -0
- package/components/uploader/uploader.vue +117 -0
- package/configs/index.js +41 -0
- package/easyCom.js +25 -0
- package/init.js +17 -0
- package/mixins/componentName.js +32 -0
- package/mixins/listPage.js +1 -0
- package/mixins/windowInfo.js +1 -0
- package/package.json +12 -0
- package/resources/iconfont/uniapp_ui_icon/demo.css +539 -0
- package/resources/iconfont/uniapp_ui_icon/demo_index.html +555 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.css +78 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.js +1 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.json +121 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.woff2 +0 -0
- package/resources/image/empty.svg +13 -0
- package/styles/global.scss +24 -0
- package/styles/index.scss +2 -0
- package/styles/utils/css-var.scss +87 -0
- package/styles/utils/ellipsis.scss +26 -0
- package/styles/utils/global-var.scss +11 -0
- package/styles/utils/index.scss +5 -0
- package/styles/utils/selector.scss +5 -0
- package/styles/utils/z-index.scss +10 -0
- package/styles/var/component.scss +242 -0
- package/styles/var/index.scss +2 -0
- package/styles/var/theme.scss +40 -0
- package/utils/date.js +151 -0
- package/utils/floor.js +20 -0
- package/utils/freezeDeep.js +19 -0
- package/utils/price.js +32 -0
- package/utils/round.js +22 -0
- package/utils/windowInfo.js +77 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<page-cpn
|
|
3
|
+
:custom="custom"
|
|
4
|
+
:title="title"
|
|
5
|
+
:theme="theme"
|
|
6
|
+
:has-footer="hasFooter"
|
|
7
|
+
:use-scroll="useScroll"
|
|
8
|
+
enable-refresh
|
|
9
|
+
:refreshing="isRefreshing"
|
|
10
|
+
:loading="loading"
|
|
11
|
+
:class="componentClassNames"
|
|
12
|
+
@refresh="onRefresh"
|
|
13
|
+
@reach-bottom="onLoadMore"
|
|
14
|
+
>
|
|
15
|
+
<data-list-cpn
|
|
16
|
+
:paging-data="pagingData"
|
|
17
|
+
:show-load-more="showLoadMore"
|
|
18
|
+
:loading-more="isLoadingMore"
|
|
19
|
+
@load-more="onLoadMore"
|
|
20
|
+
>
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</data-list-cpn>
|
|
23
|
+
|
|
24
|
+
<empty-cpn v-if="!pagingData || pagingData.data.length === 0" :class="$style['ListPage--empty']"></empty-cpn>
|
|
25
|
+
|
|
26
|
+
<template v-if="hasFooter" #footer>
|
|
27
|
+
<slot name="footer"></slot>
|
|
28
|
+
</template>
|
|
29
|
+
</page-cpn>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import componentName from '../../mixins/componentName';
|
|
34
|
+
import DataListCpn from '../data-list/data-list.vue';
|
|
35
|
+
import EmptyCpn from '../empty/empty.vue';
|
|
36
|
+
import PageCpn from '../page/page.vue';
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: 'AppListPage',
|
|
40
|
+
options: {
|
|
41
|
+
virtualHost: true,
|
|
42
|
+
styleIsolation: 'shared',
|
|
43
|
+
},
|
|
44
|
+
components: { PageCpn, DataListCpn, EmptyCpn },
|
|
45
|
+
mixins: [componentName],
|
|
46
|
+
props: {
|
|
47
|
+
/** 是否使用自定义导航栏 */
|
|
48
|
+
custom: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true,
|
|
51
|
+
},
|
|
52
|
+
/** 页面标题 */
|
|
53
|
+
title: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: '',
|
|
56
|
+
},
|
|
57
|
+
/** 页面头部样式,主要用于控制导航栏字体颜色 */
|
|
58
|
+
theme: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'light',
|
|
61
|
+
},
|
|
62
|
+
/** 是否使用底部操作栏 */
|
|
63
|
+
hasFooter: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
/** 是否使用scroll-view */
|
|
68
|
+
useScroll: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true,
|
|
71
|
+
},
|
|
72
|
+
/** 分页大小 */
|
|
73
|
+
pagingData: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: null,
|
|
76
|
+
},
|
|
77
|
+
// /** 分页大小 */
|
|
78
|
+
// pageSize: {
|
|
79
|
+
// type: [Number, String],
|
|
80
|
+
// default: 0,
|
|
81
|
+
// },
|
|
82
|
+
/** 是否显示加载更多 */
|
|
83
|
+
showLoadMore: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: true,
|
|
86
|
+
},
|
|
87
|
+
/** 页面加载 */
|
|
88
|
+
loading: {
|
|
89
|
+
type: [Boolean, String],
|
|
90
|
+
default: false,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
data() {
|
|
94
|
+
return {
|
|
95
|
+
/** 是否正在刷新中 */
|
|
96
|
+
isRefreshing: false,
|
|
97
|
+
/** 是否正在加载更多中 */
|
|
98
|
+
isLoadingMore: false,
|
|
99
|
+
/** scroll-view 的当前滚动距离 */
|
|
100
|
+
scrollOffset: 0,
|
|
101
|
+
/** 传递给 scroll-view ,用于控制其滚动距离 */
|
|
102
|
+
scrollTop: 0,
|
|
103
|
+
/** 传递给 scroll-view ,用于控制其是否有滚动动画 */
|
|
104
|
+
scrollWithAnimation: true,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
methods: {
|
|
108
|
+
/** 触发下拉刷新 */
|
|
109
|
+
onRefresh() {
|
|
110
|
+
if (this.isRefreshing) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
this.isRefreshing = true;
|
|
115
|
+
const { promise, resolve, reject } = Promise.withResolvers();
|
|
116
|
+
promise.finally(() => {
|
|
117
|
+
this.isRefreshing = false;
|
|
118
|
+
uni.stopPullDownRefresh();
|
|
119
|
+
});
|
|
120
|
+
this.$emit('refresh', { resolve, reject });
|
|
121
|
+
},
|
|
122
|
+
/** 抵达底部触发加载更多 */
|
|
123
|
+
onLoadMore() {
|
|
124
|
+
if (this.isLoadingMore) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (!this.pagingData.hasMore) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
this.isLoadingMore = true;
|
|
132
|
+
const { promise, resolve, reject } = Promise.withResolvers();
|
|
133
|
+
promise.finally(() => {
|
|
134
|
+
this.isLoadingMore = false;
|
|
135
|
+
uni.stopPullDownRefresh();
|
|
136
|
+
});
|
|
137
|
+
this.$emit('reach-bottom', { resolve, reject });
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<style lang="scss" module>
|
|
144
|
+
.ListPage--empty {
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 50%;
|
|
147
|
+
left: 50%;
|
|
148
|
+
transform: translate(-50%, -50%);
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="componentClassNames">
|
|
3
|
+
<template v-if="end">
|
|
4
|
+
<view :class="$style['LoadMore--content']">{{ endTitle }}</view>
|
|
5
|
+
</template>
|
|
6
|
+
<view v-else-if="loading" :class="$style['LoadMore--content']">
|
|
7
|
+
<icon-cpn icon="loading-dot-spinner"></icon-cpn>
|
|
8
|
+
加载中...
|
|
9
|
+
</view>
|
|
10
|
+
<view v-else :class="$style['LoadMore--content']" @click="$emit('load-more')">上滑或点击加载更多</view>
|
|
11
|
+
</view>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import componentName from '../../mixins/componentName';
|
|
16
|
+
import IconCpn from '../icon/icon.vue';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'AppLoadMore',
|
|
20
|
+
options: {
|
|
21
|
+
virtualHost: true,
|
|
22
|
+
styleIsolation: 'shared',
|
|
23
|
+
},
|
|
24
|
+
components: { IconCpn },
|
|
25
|
+
mixins: [componentName],
|
|
26
|
+
props: {
|
|
27
|
+
/** 是否到最后一页 */
|
|
28
|
+
end: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
/** 是否加载中 */
|
|
33
|
+
loading: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
/** 到最后一页时文本 */
|
|
38
|
+
endTitle: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: '没有更多了',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style lang="scss" module>
|
|
47
|
+
@use '../../styles/index' as *;
|
|
48
|
+
|
|
49
|
+
// 定义外部变量
|
|
50
|
+
$component-name: 'load-more';
|
|
51
|
+
$component-vars: $load-more;
|
|
52
|
+
%external-vars {
|
|
53
|
+
@include UTILS__DEFINE_COMPONENT_VARS();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.LoadMore {
|
|
57
|
+
@extend %external-vars;
|
|
58
|
+
box-sizing: content-box;
|
|
59
|
+
height: UTILS__LOCAL_VAR(height);
|
|
60
|
+
color: UTILS__LOCAL_VAR(color);
|
|
61
|
+
text-align: center;
|
|
62
|
+
padding-top: UTILS__LOCAL_VAR(space);
|
|
63
|
+
font-size: UTILS__GLOBAL_VAR(font-size, normal);
|
|
64
|
+
}
|
|
65
|
+
.LoadMore--content {
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
position: relative;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
padding: 0 calc(20% + #{UTILS__LOCAL_VAR(space)});
|
|
71
|
+
display: flex;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
&::before {
|
|
75
|
+
content: '';
|
|
76
|
+
display: block;
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 50%;
|
|
79
|
+
left: 20rpx;
|
|
80
|
+
width: 20%;
|
|
81
|
+
height: 4rpx;
|
|
82
|
+
transform: translateY(-50%);
|
|
83
|
+
background: linear-gradient(to right, transparent, #ccc 75%);
|
|
84
|
+
}
|
|
85
|
+
&::after {
|
|
86
|
+
content: '';
|
|
87
|
+
display: block;
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 50%;
|
|
90
|
+
right: 20rpx;
|
|
91
|
+
width: 20%;
|
|
92
|
+
height: 4rpx;
|
|
93
|
+
transform: translateY(-50%);
|
|
94
|
+
background: linear-gradient(to left, transparent, #ccc 75%);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="componentClassNames">
|
|
3
|
+
<view :class="$style['LoadingAnimation1--dot']"></view>
|
|
4
|
+
<view :class="$style['LoadingAnimation1--dot']"></view>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import componentName from '../../../mixins/componentName';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'AppLoadingAnimation1',
|
|
13
|
+
options: {
|
|
14
|
+
virtualHost: true,
|
|
15
|
+
styleIsolation: 'shared',
|
|
16
|
+
},
|
|
17
|
+
mixins: [componentName],
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" module>
|
|
22
|
+
.LoadingAnimation1 {
|
|
23
|
+
width: 1em;
|
|
24
|
+
aspect-ratio: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
|
|
29
|
+
.LoadingAnimation1--dot {
|
|
30
|
+
width: 0.2em;
|
|
31
|
+
height: 0.2em;
|
|
32
|
+
margin-right: 0.2em;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
&:first-child {
|
|
37
|
+
background: #12b32d;
|
|
38
|
+
animation: first-ani 1s linear infinite alternate;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:last-child {
|
|
42
|
+
background: #ff1929;
|
|
43
|
+
animation: second-ani 1s linear infinite alternate;
|
|
44
|
+
margin-right: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes first-ani {
|
|
49
|
+
0% {
|
|
50
|
+
left: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
25% {
|
|
54
|
+
left: 0.4em;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
50% {
|
|
58
|
+
left: 0.4em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
75% {
|
|
62
|
+
left: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
to {
|
|
66
|
+
left: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes second-ani {
|
|
71
|
+
0% {
|
|
72
|
+
right: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
25% {
|
|
76
|
+
right: 0.4em;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
50% {
|
|
80
|
+
right: 0.4em;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
75% {
|
|
84
|
+
right: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
to {
|
|
88
|
+
right: 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="componentClassNames">
|
|
3
|
+
<icon-cpn icon="loading" :class="$style['LoadingAnimation2--icon']" />
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import componentName from '../../../mixins/componentName';
|
|
9
|
+
import IconCpn from '../../icon/icon.vue';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'AppLoadingAnimation2',
|
|
13
|
+
options: {
|
|
14
|
+
virtualHost: true,
|
|
15
|
+
styleIsolation: 'shared',
|
|
16
|
+
},
|
|
17
|
+
components: { IconCpn },
|
|
18
|
+
mixins: [componentName],
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style lang="scss" module>
|
|
23
|
+
.LoadingAnimation2 {
|
|
24
|
+
.LoadingAnimation2--icon {
|
|
25
|
+
--animation-duration: 1.2s;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="componentClassNames">
|
|
3
|
+
<view :class="$style['LoadingAnimation3--animation']"></view>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import componentName from '../../../mixins/componentName';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'AppLoadingAnimation3',
|
|
12
|
+
options: {
|
|
13
|
+
virtualHost: true,
|
|
14
|
+
styleIsolation: 'shared',
|
|
15
|
+
},
|
|
16
|
+
mixins: [componentName],
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style lang="scss" module>
|
|
21
|
+
.LoadingAnimation3 {
|
|
22
|
+
height: 1em;
|
|
23
|
+
aspect-ratio: 1;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
.LoadingAnimation3--animation {
|
|
29
|
+
// 载体大小
|
|
30
|
+
$main-size: 0.1em;
|
|
31
|
+
// 左边点 x 坐标便移量
|
|
32
|
+
$left-x: (-3.5 * $main-size);
|
|
33
|
+
// 右边点 x 坐标便移量
|
|
34
|
+
$right-x: 3.5 * $main-size;
|
|
35
|
+
// 载体 y 坐标便移量
|
|
36
|
+
$translate-y: 4 * $main-size;
|
|
37
|
+
// 小点尺寸
|
|
38
|
+
$size-s: 0.5 * $main-size;
|
|
39
|
+
// 大点尺寸
|
|
40
|
+
$size-l: 1.5 * $main-size;
|
|
41
|
+
|
|
42
|
+
color: inherit;
|
|
43
|
+
width: $main-size;
|
|
44
|
+
aspect-ratio: 1;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
|
|
47
|
+
translate: 0 (-1 * $translate-y);
|
|
48
|
+
animation: loading-dots 1.5s infinite linear;
|
|
49
|
+
|
|
50
|
+
@keyframes loading-dots {
|
|
51
|
+
15% {
|
|
52
|
+
box-shadow: $left-x $translate-y 0 $size-l, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
|
|
53
|
+
}
|
|
54
|
+
30% {
|
|
55
|
+
box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-l, $right-x $translate-y 0 $size-s;
|
|
56
|
+
}
|
|
57
|
+
45% {
|
|
58
|
+
box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-l;
|
|
59
|
+
}
|
|
60
|
+
60% {
|
|
61
|
+
box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// @keyframes loading-dots2 {
|
|
66
|
+
// 25% {
|
|
67
|
+
// box-shadow: $left-x $translate-y 0 $size-l, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
|
|
68
|
+
// }
|
|
69
|
+
// 50% {
|
|
70
|
+
// box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-l, $right-x $translate-y 0 $size-s;
|
|
71
|
+
// }
|
|
72
|
+
// 75% {
|
|
73
|
+
// box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-l;
|
|
74
|
+
// }
|
|
75
|
+
// 100% {
|
|
76
|
+
// box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
|
|
77
|
+
// }
|
|
78
|
+
// }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="componentClassNames">
|
|
3
|
+
<view :class="$style['LoadingAnimation4--animation']"></view>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import componentName from '../../../mixins/componentName';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'AppLoadingAnimation4',
|
|
12
|
+
options: {
|
|
13
|
+
virtualHost: true,
|
|
14
|
+
styleIsolation: 'shared',
|
|
15
|
+
},
|
|
16
|
+
mixins: [componentName],
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style lang="scss" module>
|
|
21
|
+
.LoadingAnimation4 {
|
|
22
|
+
height: 1.2em;
|
|
23
|
+
aspect-ratio: 1;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
.LoadingAnimation4--animation {
|
|
29
|
+
width: 1em;
|
|
30
|
+
aspect-ratio: 1;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
border: 0.1em solid currentcolor;
|
|
33
|
+
animation: spinner-1 0.8s infinite linear alternate, spinner-2 1.6s infinite linear;
|
|
34
|
+
|
|
35
|
+
@keyframes spinner-1 {
|
|
36
|
+
0% {
|
|
37
|
+
clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
|
|
38
|
+
}
|
|
39
|
+
12.5% {
|
|
40
|
+
clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%);
|
|
41
|
+
}
|
|
42
|
+
25% {
|
|
43
|
+
clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 100%);
|
|
44
|
+
}
|
|
45
|
+
50% {
|
|
46
|
+
clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
|
|
47
|
+
}
|
|
48
|
+
62.5% {
|
|
49
|
+
clip-path: polygon(50% 50%, 100% 0, 100% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
|
|
50
|
+
}
|
|
51
|
+
75% {
|
|
52
|
+
clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0% 100%);
|
|
53
|
+
}
|
|
54
|
+
100% {
|
|
55
|
+
clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
@keyframes spinner-2 {
|
|
59
|
+
0% {
|
|
60
|
+
transform: scaleY(1) rotate(0deg);
|
|
61
|
+
}
|
|
62
|
+
49.99% {
|
|
63
|
+
transform: scaleY(1) rotate(135deg);
|
|
64
|
+
}
|
|
65
|
+
50% {
|
|
66
|
+
transform: scaleY(-1) rotate(0deg);
|
|
67
|
+
}
|
|
68
|
+
100% {
|
|
69
|
+
transform: scaleY(-1) rotate(-135deg);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="componentClassNames" @touchmove.stop.prevent="doNothing">
|
|
3
|
+
<!-- #ifdef APP-PLUS -->
|
|
4
|
+
<cover-view :class="$style['Loading--wrapper-cover']" @touchmove.stop.prevent="doNothing"></cover-view>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<view :class="$style['Loading--content']">
|
|
7
|
+
<loading-animation3 :class="$style['Loading--icon']" />
|
|
8
|
+
<view :class="$style['Loading--title']">
|
|
9
|
+
{{ title }}
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
12
|
+
</view>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import componentName from '../../mixins/componentName';
|
|
17
|
+
import LoadingAnimation3 from './animations/loading-animation3.vue';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'AppLoading',
|
|
21
|
+
options: {
|
|
22
|
+
virtualHost: true,
|
|
23
|
+
styleIsolation: 'shared',
|
|
24
|
+
},
|
|
25
|
+
components: { LoadingAnimation3 },
|
|
26
|
+
mixins: [componentName],
|
|
27
|
+
props: {
|
|
28
|
+
title: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: '加载中...',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
doNothing() {},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="scss" module>
|
|
40
|
+
@use '../../styles/index' as *;
|
|
41
|
+
|
|
42
|
+
$component-name: 'badge';
|
|
43
|
+
|
|
44
|
+
.Loading {
|
|
45
|
+
position: fixed;
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
width: 100vw;
|
|
49
|
+
height: 100vh;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
z-index: UTILS__z-index();
|
|
54
|
+
background: #0000004d;
|
|
55
|
+
|
|
56
|
+
/* #ifdef APP-PLUS */
|
|
57
|
+
.Loading--wrapper-cover {
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
background: transparent;
|
|
67
|
+
}
|
|
68
|
+
/* #endif */
|
|
69
|
+
|
|
70
|
+
.Loading--content {
|
|
71
|
+
color: UTILS__GLOBAL_VAR(color, background);
|
|
72
|
+
background: UTILS__GLOBAL_VAR(color, foreground);
|
|
73
|
+
width: 200rpx;
|
|
74
|
+
height: 200rpx;
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
border-radius: 20rpx;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.Loading--icon {
|
|
83
|
+
font-size: 80rpx;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.Loading--title {
|
|
87
|
+
margin-top: 20rpx;
|
|
88
|
+
font-size: 24rpx;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dialog-cpn
|
|
3
|
+
:value="value"
|
|
4
|
+
:cancel="false"
|
|
5
|
+
hide-on-confirm
|
|
6
|
+
confirm="我知道了"
|
|
7
|
+
modal
|
|
8
|
+
:title="title"
|
|
9
|
+
:class="componentClassNames"
|
|
10
|
+
@input="$emit('input', $event)"
|
|
11
|
+
@confirm="$_onConfirm()"
|
|
12
|
+
>
|
|
13
|
+
{{ content }}
|
|
14
|
+
</dialog-cpn>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import componentName from '../../mixins/componentName';
|
|
19
|
+
import DialogCpn from '../dialog/dialog.vue';
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'AppMessageBox',
|
|
23
|
+
options: {
|
|
24
|
+
virtualHost: true,
|
|
25
|
+
styleIsolation: 'shared',
|
|
26
|
+
},
|
|
27
|
+
components: { DialogCpn },
|
|
28
|
+
mixins: [componentName],
|
|
29
|
+
props: {
|
|
30
|
+
/** 是否可见 */
|
|
31
|
+
value: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
/** 对话框标题 */
|
|
36
|
+
title: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '提示',
|
|
39
|
+
},
|
|
40
|
+
/** 是否模态 */
|
|
41
|
+
content: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: '',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
created() {
|
|
47
|
+
this._promise = new Promise((resolve) => {
|
|
48
|
+
this._resolve = resolve;
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
methods: {
|
|
52
|
+
show() {
|
|
53
|
+
return this._promise;
|
|
54
|
+
},
|
|
55
|
+
$_onConfirm() {
|
|
56
|
+
this._resolve();
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
</script>
|