@ecolovo/uniapp-components 1.0.10 → 2.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/README.md +83 -51
- package/components/aspect/aspect.vue +24 -15
- package/components/badge/badge.scss +20 -0
- package/components/badge/badge.vue +49 -40
- package/components/button/button.scss +15 -0
- package/components/button/button.vue +121 -177
- package/components/checkbox/checkbox.scss +10 -0
- package/components/checkbox/checkbox.vue +118 -146
- package/components/checkbox-group/checkbox-group.vue +79 -85
- package/components/checkbox-group2/checkbox-group2.vue +111 -107
- package/components/checkbox-group2/checkbox2.vue +104 -0
- package/components/data-list/data-list.scss +9 -0
- package/components/data-list/data-list.vue +70 -79
- package/components/date-picker/date-picker-view.vue +125 -124
- package/components/date-picker/date-picker.vue +145 -146
- package/components/dialog/dialog-content.vue +39 -47
- package/components/dialog/dialog.scss +11 -0
- package/components/dialog/dialog.vue +125 -138
- package/components/dropdown/dropdown.scss +11 -0
- package/components/dropdown/dropdown.vue +55 -97
- package/components/empty/empty.scss +14 -0
- package/components/empty/empty.vue +42 -41
- package/components/flex/flex.vue +45 -54
- package/components/form/form.vue +29 -24
- package/components/form-item/form-item.scss +11 -0
- package/components/form-item/form-item.vue +43 -40
- package/components/icon/icon.vue +70 -85
- package/components/image/image.vue +35 -38
- package/components/input/input.vue +65 -79
- package/components/input/password-input.vue +34 -42
- package/components/list-page/list-page.vue +73 -99
- package/components/load-more/load-more.scss +12 -0
- package/components/load-more/load-more.vue +29 -29
- package/components/loading/animations/loading-animation1.vue +8 -8
- package/components/loading/animations/loading-animation2.vue +8 -9
- package/components/loading/animations/loading-animation3.vue +11 -11
- package/components/loading/animations/loading-animation4.vue +8 -8
- package/components/loading/loading.vue +19 -20
- package/components/message-box/message-box.vue +59 -41
- package/components/number-dialog/number-dialog.scss +9 -0
- package/components/number-dialog/number-dialog.vue +209 -204
- package/components/number-input/number-input.scss +9 -0
- package/components/number-input/number-input.vue +233 -232
- package/components/numpad/numpad.scss +9 -0
- package/components/numpad/numpad.vue +133 -150
- package/components/page/page-body.scss +15 -0
- package/components/page/page-body.vue +137 -119
- package/components/page/page-footer.scss +13 -0
- package/components/page/page-footer.vue +31 -33
- package/components/page/page-header.scss +17 -0
- package/components/page/page-header.vue +89 -94
- package/components/page/page.scss +9 -0
- package/components/page/page.vue +105 -81
- package/components/picker/picker-popup.vue +218 -209
- package/components/picker/picker.vue +99 -104
- package/components/popover/popover-content.vue +54 -63
- package/components/popover/popover-mask.vue +63 -63
- package/components/popover/popover.scss +28 -0
- package/components/popover/popover.vue +49 -47
- package/components/popup/popup-content.vue +49 -53
- package/components/popup/popup.scss +11 -0
- package/components/popup/popup.vue +117 -132
- package/components/price/price.scss +20 -0
- package/components/price/price.vue +31 -42
- package/components/search/search.scss +12 -0
- package/components/search/search.vue +93 -117
- package/components/searching/searching.vue +33 -40
- package/components/selector/selector.vue +43 -48
- package/components/switch/switch.scss +12 -0
- package/components/switch/switch.vue +99 -96
- package/components/tab/tab.scss +19 -0
- package/components/tab/tab.vue +151 -145
- package/components/textarea/textarea.vue +104 -101
- package/composable/component-name.ts +10 -0
- package/configs/index.ts +82 -0
- package/{easyCom.js → easyCom.ts} +1 -1
- package/index.ts +1 -0
- package/init.ts +34 -0
- package/package.json +12 -4
- package/styles/utils/css-var.scss +12 -15
- package/styles/utils/ellipsis.scss +0 -7
- package/styles/utils/z-index.scss +1 -1
- package/styles/var/component.scss +21 -245
- package/utils/{date.js → date.ts} +44 -42
- package/utils/freezeDeep.ts +9 -0
- package/utils/price.ts +57 -0
- package/utils/round.ts +11 -0
- package/utils/{windowInfo.js → windowInfo.ts} +12 -35
- package/components/checkbox-group2/checkbox.vue +0 -109
- package/components/datetime-picker/datetime-picker-view.vue +0 -209
- package/components/datetime-picker/datetime-picker.vue +0 -235
- package/components/form/mixin.js +0 -13
- package/components/list-page/list-page.js +0 -10
- package/components/table/table.vue +0 -112
- package/components/time-picker/time-picker-view.vue +0 -127
- package/components/time-picker/time-picker.vue +0 -140
- package/components/uploader/download.js +0 -81
- package/components/uploader/file-uploader.vue +0 -52
- package/components/uploader/files.js +0 -225
- package/components/uploader/media-uploader.vue +0 -189
- package/components/uploader/mixin.js +0 -171
- package/components/uploader/uni.js +0 -38
- package/components/uploader/upload-button.vue +0 -29
- package/components/uploader/uploader copy.vue +0 -547
- package/components/uploader/uploader.vue +0 -117
- package/configs/index.d.ts +0 -22
- package/configs/index.js +0 -68
- package/init.d.ts +0 -19
- package/init.js +0 -20
- package/mixins/componentName.js +0 -32
- package/mixins/listPage.js +0 -1
- package/mixins/windowInfo.js +0 -1
- package/utils/fileSize.js +0 -39
- package/utils/floor.js +0 -20
- package/utils/freezeDeep.js +0 -19
- package/utils/price.js +0 -32
- package/utils/round.js +0 -22
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view :class="
|
|
2
|
+
<view :class="[...classNames, $style['LoadingAnimation4']]">
|
|
3
3
|
<view :class="$style['LoadingAnimation4--animation']"></view>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script>
|
|
8
|
-
import
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import useClassNames from '../../../composable/component-name';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
name: 'LoadingAnimation4',
|
|
10
|
+
defineOptions({
|
|
12
11
|
options: {
|
|
13
|
-
virtualHost: true,
|
|
14
12
|
styleIsolation: 'shared',
|
|
13
|
+
virtualHost: true,
|
|
15
14
|
},
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const classNames = useClassNames('loading-animation4');
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<style lang="scss" module>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view :class="
|
|
2
|
+
<view :class="[...classNames, $style['Loading']]" @touchmove.stop.prevent="doNothing">
|
|
3
3
|
<!-- #ifdef APP-PLUS -->
|
|
4
4
|
<cover-view :class="$style['Loading--wrapper-cover']" @touchmove.stop.prevent="doNothing"></cover-view>
|
|
5
5
|
<!-- #endif -->
|
|
@@ -12,35 +12,34 @@
|
|
|
12
12
|
</view>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
|
-
<script>
|
|
16
|
-
import
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
import useClassNames from '../../composable/component-name';
|
|
17
17
|
import LoadingAnimation3 from './animations/loading-animation3.vue';
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
name: 'Loading',
|
|
19
|
+
defineOptions({
|
|
21
20
|
options: {
|
|
22
|
-
virtualHost: true,
|
|
23
21
|
styleIsolation: 'shared',
|
|
22
|
+
virtualHost: true,
|
|
24
23
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
methods: {
|
|
34
|
-
doNothing() {},
|
|
35
|
-
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const classNames = useClassNames('loading');
|
|
27
|
+
|
|
28
|
+
type _Props = {
|
|
29
|
+
/** 加载文本 */
|
|
30
|
+
title?: string;
|
|
36
31
|
};
|
|
32
|
+
|
|
33
|
+
withDefaults(defineProps<_Props>(), {
|
|
34
|
+
title: '加载中...',
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const doNothing = () => {};
|
|
37
38
|
</script>
|
|
38
39
|
|
|
39
40
|
<style lang="scss" module>
|
|
40
41
|
@use '../../styles/index' as *;
|
|
41
42
|
|
|
42
|
-
$component-name: 'badge';
|
|
43
|
-
|
|
44
43
|
.Loading {
|
|
45
44
|
position: fixed;
|
|
46
45
|
top: 0;
|
|
@@ -50,7 +49,7 @@ $component-name: 'badge';
|
|
|
50
49
|
display: flex;
|
|
51
50
|
justify-content: center;
|
|
52
51
|
align-items: center;
|
|
53
|
-
z-index: UTILS__z-index();
|
|
52
|
+
z-index: UTILS__z-index('loading');
|
|
54
53
|
background: #0000004d;
|
|
55
54
|
|
|
56
55
|
/* #ifdef APP-PLUS */
|
|
@@ -1,60 +1,78 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dialog-cpn
|
|
3
|
-
:value="
|
|
3
|
+
:model-value="isVisible"
|
|
4
4
|
:cancel="false"
|
|
5
|
-
hide-on-confirm
|
|
6
5
|
confirm="我知道了"
|
|
7
6
|
modal
|
|
8
7
|
:title="title"
|
|
9
|
-
:class="
|
|
10
|
-
@
|
|
11
|
-
@confirm="
|
|
8
|
+
:class="[...classNames, $style['MessageBox']]"
|
|
9
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
10
|
+
@confirm="onConfirm()"
|
|
11
|
+
@closed="isVisible = false"
|
|
12
12
|
>
|
|
13
13
|
{{ content }}
|
|
14
14
|
</dialog-cpn>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
|
-
<script>
|
|
18
|
-
import
|
|
17
|
+
<script lang="ts" setup>
|
|
18
|
+
import { ref, useCssModule, watch } from 'vue';
|
|
19
|
+
import useClassNames from '../../composable/component-name';
|
|
19
20
|
import DialogCpn from '../dialog/dialog.vue';
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
name: 'MessageBox',
|
|
22
|
+
defineOptions({
|
|
23
23
|
options: {
|
|
24
24
|
virtualHost: true,
|
|
25
25
|
styleIsolation: 'shared',
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const classNames = useClassNames('message-box');
|
|
30
|
+
const $style = useCssModule();
|
|
31
|
+
|
|
32
|
+
type _Props = {
|
|
33
|
+
/** 是否可见 */
|
|
34
|
+
modelValue?: boolean;
|
|
35
|
+
/** 对话框标题 */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** 内容 */
|
|
38
|
+
content?: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const props = withDefaults(defineProps<_Props>(), {
|
|
42
|
+
modelValue: false,
|
|
43
|
+
title: '提示',
|
|
44
|
+
content: '',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const isVisible = ref(false);
|
|
48
|
+
|
|
49
|
+
watch(
|
|
50
|
+
() => props.modelValue,
|
|
51
|
+
(v) => {
|
|
52
|
+
isVisible.value = v;
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const emit = defineEmits<{
|
|
57
|
+
(e: 'update:modelValue', val: boolean): void;
|
|
58
|
+
}>();
|
|
59
|
+
|
|
60
|
+
let resolvePromise: PromiseWithResolvers<void>['resolve'] | undefined;
|
|
61
|
+
|
|
62
|
+
const show = () => {
|
|
63
|
+
emit('update:modelValue', (isVisible.value = true));
|
|
64
|
+
const { promise, resolve } = Promise.withResolvers();
|
|
65
|
+
resolvePromise = resolve;
|
|
66
|
+
return promise;
|
|
59
67
|
};
|
|
68
|
+
|
|
69
|
+
const onConfirm = () => {
|
|
70
|
+
resolvePromise?.();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
defineExpose({ show });
|
|
60
74
|
</script>
|
|
75
|
+
|
|
76
|
+
<style lang="scss" module>
|
|
77
|
+
@use '../../styles/index' as *;
|
|
78
|
+
</style>
|