@ecolovo/uniapp-components 2.0.7 → 2.0.8
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/badge/badge.vue +2 -2
- package/components/badge/types.d.ts +0 -2
- package/components/badge/types.js +1 -4
- package/components/badge/types.ts +0 -6
- package/components/button/button.vue +2 -2
- package/components/button/types.d.ts +0 -2
- package/components/button/types.js +1 -4
- package/components/button/types.ts +0 -6
- package/components/checkbox/checkbox.vue +2 -2
- package/components/checkbox/types.d.ts +0 -2
- package/components/checkbox/types.js +1 -4
- package/components/checkbox/types.ts +0 -8
- package/components/checkbox-group/checkbox-group.vue +2 -2
- package/components/checkbox-group/types.d.ts +0 -2
- package/components/checkbox-group/types.js +1 -8
- package/components/checkbox-group/types.ts +0 -12
- package/components/checkbox-group2/checkbox-group2.vue +2 -2
- package/components/date-picker/date-picker.vue +2 -2
- package/components/date-picker/types.d.ts +0 -2
- package/components/date-picker/types.js +1 -4
- package/components/date-picker/types.ts +0 -8
- package/components/dialog/dialog.vue +2 -2
- package/components/dialog/types.d.ts +0 -2
- package/components/dialog/types.js +1 -4
- package/components/dialog/types.ts +0 -6
- package/components/dropdown/dropdown.vue +2 -2
- package/components/dropdown/types.d.ts +0 -2
- package/components/dropdown/types.js +1 -4
- package/components/dropdown/types.ts +0 -8
- package/components/empty/empty.vue +2 -2
- package/components/empty/types.d.ts +0 -2
- package/components/empty/types.js +1 -9
- package/components/empty/types.ts +0 -11
- package/components/flex/flex.vue +2 -2
- package/components/flex/types.d.ts +0 -2
- package/components/flex/types.js +1 -4
- package/components/flex/types.ts +0 -6
- package/components/form/form.vue +2 -2
- package/components/form/types.d.ts +0 -2
- package/components/form/types.js +1 -4
- package/components/form/types.ts +0 -6
- package/components/form-item/form-item.vue +2 -2
- package/components/form-item/types.d.ts +0 -2
- package/components/form-item/types.js +1 -4
- package/components/form-item/types.ts +0 -8
- package/components/icon/icon.vue +59 -1
- package/components/image/image.vue +3 -2
- package/components/image/types.d.ts +0 -2
- package/components/image/types.js +1 -4
- package/components/image/types.ts +0 -6
- package/components/input/input.vue +2 -2
- package/components/input/password-input.vue +2 -2
- package/components/input/types.d.ts +0 -4
- package/components/input/types.js +1 -8
- package/components/input/types.ts +0 -14
- package/components/list-page/list-page.vue +2 -2
- package/components/list-page/types.d.ts +0 -2
- package/components/list-page/types.js +1 -4
- package/components/list-page/types.ts +0 -8
- package/components/load-more/load-more.vue +2 -2
- package/components/load-more/types.d.ts +0 -2
- package/components/load-more/types.js +1 -4
- package/components/load-more/types.ts +0 -8
- package/components/loading/loading.vue +2 -2
- package/components/loading/types.d.ts +0 -2
- package/components/loading/types.js +1 -4
- package/components/loading/types.ts +0 -8
- package/components/message-box/message-box.vue +2 -2
- package/components/message-box/types.d.ts +0 -2
- package/components/message-box/types.js +1 -4
- package/components/message-box/types.ts +0 -8
- package/components/number-dialog/number-dialog.vue +2 -2
- package/components/number-dialog/types.d.ts +0 -2
- package/components/number-dialog/types.js +1 -4
- package/components/number-dialog/types.ts +0 -8
- package/components/number-input/number-input.vue +2 -2
- package/components/number-input/types.d.ts +0 -2
- package/components/number-input/types.js +1 -4
- package/components/number-input/types.ts +0 -8
- package/components/numpad/numpad.vue +2 -2
- package/components/numpad/types.d.ts +0 -2
- package/components/numpad/types.js +1 -4
- package/components/numpad/types.ts +0 -6
- package/components/page/page-header.vue +7 -7
- package/components/page/page.vue +2 -2
- package/components/page/types.d.ts +0 -4
- package/components/page/types.js +1 -8
- package/components/page/types.ts +0 -14
- package/components/picker/picker.vue +2 -2
- package/components/picker/types.d.ts +0 -2
- package/components/picker/types.js +1 -4
- package/components/picker/types.ts +0 -6
- package/components/popover/popover.vue +2 -2
- package/components/popover/types.d.ts +0 -2
- package/components/popover/types.js +1 -4
- package/components/popover/types.ts +0 -8
- package/components/popup/popup.vue +2 -2
- package/components/popup/types.d.ts +0 -2
- package/components/popup/types.js +1 -4
- package/components/popup/types.ts +0 -6
- package/components/price/price.vue +2 -2
- package/components/price/types.d.ts +0 -2
- package/components/price/types.js +1 -4
- package/components/price/types.ts +0 -6
- package/components/search/search.vue +2 -2
- package/components/search/types.d.ts +0 -2
- package/components/search/types.js +1 -4
- package/components/search/types.ts +0 -6
- package/components/searching/searching.vue +2 -2
- package/components/searching/types.d.ts +0 -2
- package/components/searching/types.js +1 -4
- package/components/searching/types.ts +0 -8
- package/components/switch/switch.vue +2 -2
- package/components/switch/types.d.ts +0 -2
- package/components/switch/types.js +1 -4
- package/components/switch/types.ts +0 -6
- package/components/tab/tab.vue +2 -2
- package/components/tab/types.d.ts +0 -2
- package/components/tab/types.js +1 -4
- package/components/tab/types.ts +0 -6
- package/components/textarea/textarea.vue +2 -2
- package/components/textarea/types.d.ts +0 -2
- package/components/textarea/types.js +1 -4
- package/components/textarea/types.ts +0 -8
- package/components/upload/media-upload.vue +4 -3
- package/components/upload/types.d.ts +0 -2
- package/components/upload/types.js +1 -4
- package/components/upload/types.ts +0 -8
- package/composable/component-name.js +2 -2
- package/composable/component-name.ts +2 -2
- package/composable/page.js +2 -2
- package/composable/page.ts +2 -2
- package/configs/index.d.ts +9 -45
- package/configs/index.js +9 -70
- package/configs/index.ts +9 -103
- package/globals.d.ts +8 -0
- package/globals.ts +7 -0
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.ts +0 -1
- package/package.json +1 -1
- package/vite.d.ts +22 -0
- package/vite.js +68 -0
- package/vite.ts +107 -0
- package/init.d.ts +0 -21
- package/init.js +0 -91
- package/init.ts +0 -119
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
<script lang="ts" setup>
|
|
39
39
|
import { computed, inject, ref } from 'vue';
|
|
40
40
|
import useClassNames from '../../composable/component-name';
|
|
41
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
41
42
|
import IconCpn from '../icon/icon.vue';
|
|
42
|
-
import { inputProps } from './types';
|
|
43
43
|
|
|
44
44
|
defineOptions({
|
|
45
45
|
options: {
|
|
@@ -88,7 +88,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
88
88
|
maxlength: 140,
|
|
89
89
|
placeholder: '请输入',
|
|
90
90
|
useText: false,
|
|
91
|
-
...
|
|
91
|
+
...EC_DEFAULT_PROPS.input,
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
defineEmits<{
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
<script lang="ts" setup>
|
|
24
24
|
import { ref } from 'vue';
|
|
25
25
|
import useClassNames from '../../composable/component-name';
|
|
26
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
26
27
|
import IconCpn from '../icon/icon.vue';
|
|
27
|
-
import { passwordInputProps } from './types';
|
|
28
28
|
|
|
29
29
|
defineOptions({
|
|
30
30
|
options: {
|
|
@@ -51,7 +51,7 @@ withDefaults(defineProps<_Props>(), {
|
|
|
51
51
|
disabled: false,
|
|
52
52
|
maxlength: 20,
|
|
53
53
|
placeholder: '请输入密码',
|
|
54
|
-
...
|
|
54
|
+
...EC_DEFAULT_PROPS.passwordInput,
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
defineEmits<{
|
|
@@ -8,13 +8,9 @@ export type ConfigurableInputProps = {
|
|
|
8
8
|
/** 当不聚焦时是否使用文本替换 input */
|
|
9
9
|
useText?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare let inputProps: ConfigurableInputProps;
|
|
12
|
-
export declare const setDefaultInputProps: (props?: ConfigurableInputProps) => void;
|
|
13
11
|
export type ConfigurablePasswordInputProps = {
|
|
14
12
|
/** 最大输入长度 */
|
|
15
13
|
maxlength?: number;
|
|
16
14
|
/** 占位文本 */
|
|
17
15
|
placeholder?: string;
|
|
18
16
|
};
|
|
19
|
-
export declare let passwordInputProps: ConfigurablePasswordInputProps;
|
|
20
|
-
export declare const setDefaultPasswordInputProps: (props?: ConfigurablePasswordInputProps) => void;
|
|
@@ -9,23 +9,9 @@ export type ConfigurableInputProps = {
|
|
|
9
9
|
useText?: boolean;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export let inputProps: ConfigurableInputProps = {};
|
|
13
|
-
|
|
14
|
-
export const setDefaultInputProps = (props: ConfigurableInputProps = {}) => {
|
|
15
|
-
inputProps = props;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
12
|
export type ConfigurablePasswordInputProps = {
|
|
19
13
|
/** 最大输入长度 */
|
|
20
14
|
maxlength?: number;
|
|
21
15
|
/** 占位文本 */
|
|
22
16
|
placeholder?: string;
|
|
23
17
|
};
|
|
24
|
-
|
|
25
|
-
export let passwordInputProps: ConfigurablePasswordInputProps = {};
|
|
26
|
-
|
|
27
|
-
export const setDefaultPasswordInputProps = (
|
|
28
|
-
props: ConfigurablePasswordInputProps = {}
|
|
29
|
-
) => {
|
|
30
|
-
passwordInputProps = props;
|
|
31
|
-
};
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
import { ref, useSlots } from 'vue';
|
|
34
34
|
import type { PagingData } from '@ecolovo/utils';
|
|
35
35
|
import useClassNames from '../../composable/component-name';
|
|
36
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
36
37
|
import DataListCpn from '../data-list/data-list.vue';
|
|
37
38
|
import EmptyCpn from '../empty/empty.vue';
|
|
38
39
|
import PageCpn from '../page/page.vue';
|
|
39
|
-
import { listPageProps } from './types';
|
|
40
40
|
|
|
41
41
|
defineOptions({
|
|
42
42
|
options: {
|
|
@@ -82,7 +82,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
82
82
|
pagingData: null,
|
|
83
83
|
showLoadMore: true,
|
|
84
84
|
loading: false,
|
|
85
|
-
...
|
|
85
|
+
...EC_DEFAULT_PROPS.listPage,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
const emit = defineEmits<{
|
|
@@ -2,11 +2,3 @@ export type ConfigurableListPageProps = {
|
|
|
2
2
|
/** 页面头部样式,主要用于控制导航栏字体颜色 */
|
|
3
3
|
theme?: 'light' | 'dark';
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
export let listPageProps: ConfigurableListPageProps = {};
|
|
7
|
-
|
|
8
|
-
export const setDefaultListPageProps = (
|
|
9
|
-
props: ConfigurableListPageProps = {}
|
|
10
|
-
) => {
|
|
11
|
-
listPageProps = props;
|
|
12
|
-
};
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
useCssModule,
|
|
29
29
|
} from 'vue';
|
|
30
30
|
import useClassNames from '../../composable/component-name';
|
|
31
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
31
32
|
import IconCpn from '../icon/icon.vue';
|
|
32
|
-
import { loadMoreProps } from './types';
|
|
33
33
|
|
|
34
34
|
defineOptions({
|
|
35
35
|
options: {
|
|
@@ -57,7 +57,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
57
57
|
end: false,
|
|
58
58
|
endTitle: '没有更多了',
|
|
59
59
|
observe: true,
|
|
60
|
-
...
|
|
60
|
+
...EC_DEFAULT_PROPS.loadMore,
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
const emit = defineEmits<{
|
|
@@ -2,11 +2,3 @@ export type ConfigurableLoadMoreProps = {
|
|
|
2
2
|
/** 到最后一页时文本 */
|
|
3
3
|
endTitle?: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
export let loadMoreProps: ConfigurableLoadMoreProps = {};
|
|
7
|
-
|
|
8
|
-
export const setDefaultLoadMoreProps = (
|
|
9
|
-
props: ConfigurableLoadMoreProps = {}
|
|
10
|
-
) => {
|
|
11
|
-
loadMoreProps = props;
|
|
12
|
-
};
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
<script lang="ts" setup>
|
|
19
19
|
import useClassNames from '../../composable/component-name';
|
|
20
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
20
21
|
import LoadingAnimation3 from './animations/loading-animation3.vue';
|
|
21
|
-
import { loadingProps } from './types';
|
|
22
22
|
|
|
23
23
|
defineOptions({
|
|
24
24
|
options: {
|
|
@@ -36,7 +36,7 @@ type _Props = {
|
|
|
36
36
|
|
|
37
37
|
withDefaults(defineProps<_Props>(), {
|
|
38
38
|
title: '加载中...',
|
|
39
|
-
...
|
|
39
|
+
...EC_DEFAULT_PROPS.loading,
|
|
40
40
|
});
|
|
41
41
|
</script>
|
|
42
42
|
|
|
@@ -2,11 +2,3 @@ export type ConfigurableLoadingProps = {
|
|
|
2
2
|
/** 加载文本 */
|
|
3
3
|
title?: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
export let loadingProps: ConfigurableLoadingProps = {};
|
|
7
|
-
|
|
8
|
-
export const setDefaultLoadingProps = (
|
|
9
|
-
props: ConfigurableLoadingProps = {}
|
|
10
|
-
) => {
|
|
11
|
-
loadingProps = props;
|
|
12
|
-
};
|
|
@@ -23,8 +23,8 @@ import { ref, useCssModule, watch } from 'vue';
|
|
|
23
23
|
import useClassNames from '../../composable/component-name';
|
|
24
24
|
import DialogCpn from '../dialog/dialog.vue';
|
|
25
25
|
import type { MessageBoxOptions } from './message-box';
|
|
26
|
-
import { messageBoxProps } from './types';
|
|
27
26
|
import { useAwaitableDialog, useModelValue } from '../../composable';
|
|
27
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
28
28
|
|
|
29
29
|
defineOptions({
|
|
30
30
|
options: {
|
|
@@ -44,7 +44,7 @@ const props = withDefaults(defineProps<MessageBoxOptions>(), {
|
|
|
44
44
|
showClose: false,
|
|
45
45
|
cancel: false,
|
|
46
46
|
confirm: '好的',
|
|
47
|
-
...
|
|
47
|
+
...EC_DEFAULT_PROPS.messageBox,
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
const isShow_ = defineModel<boolean>();
|
|
@@ -12,5 +12,3 @@ export type ConfigurableMessageBoxProps = {
|
|
|
12
12
|
/** 确认按钮文本,为 falsy 时( false 或 '' )不显示 */
|
|
13
13
|
confirm?: string | boolean;
|
|
14
14
|
};
|
|
15
|
-
export declare let messageBoxProps: ConfigurableMessageBoxProps;
|
|
16
|
-
export declare const setDefaultMessageBoxProps: (props?: ConfigurableMessageBoxProps) => void;
|
|
@@ -12,11 +12,3 @@ export type ConfigurableMessageBoxProps = {
|
|
|
12
12
|
/** 确认按钮文本,为 falsy 时( false 或 '' )不显示 */
|
|
13
13
|
confirm?: string | boolean;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export let messageBoxProps: ConfigurableMessageBoxProps = {};
|
|
17
|
-
|
|
18
|
-
export const setDefaultMessageBoxProps = (
|
|
19
|
-
props: ConfigurableMessageBoxProps = {}
|
|
20
|
-
) => {
|
|
21
|
-
messageBoxProps = props;
|
|
22
|
-
};
|
|
@@ -105,7 +105,7 @@ import IconCpn from '../icon/icon.vue';
|
|
|
105
105
|
import NumpadCpn from '../numpad/numpad.vue';
|
|
106
106
|
import PopoverContentCpn from '../popover/popover-content.vue';
|
|
107
107
|
import PopoverMaskCpn from '../popover/popover-mask.vue';
|
|
108
|
-
import {
|
|
108
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
109
109
|
|
|
110
110
|
defineOptions({
|
|
111
111
|
options: {
|
|
@@ -150,7 +150,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
150
150
|
step: 1,
|
|
151
151
|
max: MAX,
|
|
152
152
|
min: MIN,
|
|
153
|
-
...
|
|
153
|
+
...EC_DEFAULT_PROPS.numberDialog,
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
const emit = defineEmits<{
|
|
@@ -14,11 +14,3 @@ export type ConfigurableNumberDialogProps = {
|
|
|
14
14
|
/** 最小值 */
|
|
15
15
|
min?: number;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
export let numberDialogProps: ConfigurableNumberDialogProps = {};
|
|
19
|
-
|
|
20
|
-
export const setDefaultNumberDialogProps = (
|
|
21
|
-
props: ConfigurableNumberDialogProps = {}
|
|
22
|
-
) => {
|
|
23
|
-
numberDialogProps = props;
|
|
24
|
-
};
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
import { computed, inject, nextTick, ref, watch } from 'vue';
|
|
80
80
|
import { round } from '@ecolovo/utils';
|
|
81
81
|
import useClassNames from '../../composable/component-name';
|
|
82
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
82
83
|
import IconCpn from '../icon/icon.vue';
|
|
83
|
-
import { numberInputProps } from './types';
|
|
84
84
|
|
|
85
85
|
defineOptions({
|
|
86
86
|
options: {
|
|
@@ -132,7 +132,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
132
132
|
step: 1,
|
|
133
133
|
max: MAX,
|
|
134
134
|
min: MIN,
|
|
135
|
-
...
|
|
135
|
+
...EC_DEFAULT_PROPS.numberInput,
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
const emit = defineEmits<{
|
|
@@ -16,11 +16,3 @@ export type ConfigurableNumberInputProps = {
|
|
|
16
16
|
/** 最小值 */
|
|
17
17
|
min?: number;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
export let numberInputProps: ConfigurableNumberInputProps = {};
|
|
21
|
-
|
|
22
|
-
export const setDefaultNumberInputProps = (
|
|
23
|
-
props: ConfigurableNumberInputProps = {}
|
|
24
|
-
) => {
|
|
25
|
-
numberInputProps = props;
|
|
26
|
-
};
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { computed } from 'vue';
|
|
18
18
|
import { freezeDeep } from '../../utils/freezeDeep';
|
|
19
19
|
import useClassNames from '../../composable/component-name';
|
|
20
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
20
21
|
import ButtonCpn from '../button/button.vue';
|
|
21
22
|
import IconCpn from '../icon/icon.vue';
|
|
22
|
-
import { numpadProps } from './types';
|
|
23
23
|
|
|
24
24
|
defineOptions({
|
|
25
25
|
options: {
|
|
@@ -76,7 +76,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
76
76
|
precision: 0,
|
|
77
77
|
max: MAX,
|
|
78
78
|
min: MIN,
|
|
79
|
-
...
|
|
79
|
+
...EC_DEFAULT_PROPS.numpad,
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
const emit = defineEmits<{
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</navigator>
|
|
32
32
|
<navigator
|
|
33
33
|
v-if="hasHome"
|
|
34
|
-
:url="
|
|
34
|
+
:url="EC_HOME_PATH"
|
|
35
35
|
open-type="reLaunch"
|
|
36
36
|
:class="$style['PageHeader--home-icon']"
|
|
37
37
|
hover-class="none"
|
|
@@ -63,14 +63,13 @@
|
|
|
63
63
|
import { computed, onMounted } from 'vue';
|
|
64
64
|
import useClassNames from '../../composable/component-name';
|
|
65
65
|
import { useCurrentPageRoute } from '../../composable/page';
|
|
66
|
-
import {
|
|
66
|
+
import { EC_DEFAULT_PROPS, EC_HOME_PATH } from '../../configs';
|
|
67
67
|
import {
|
|
68
68
|
navBarHeight,
|
|
69
69
|
navBarTopOffset,
|
|
70
70
|
menuButtonWidthInCss,
|
|
71
71
|
} from '../../utils/windowInfo';
|
|
72
72
|
import IconCpn from '../icon/icon.vue';
|
|
73
|
-
import { pageHeaderProps } from './types';
|
|
74
73
|
|
|
75
74
|
defineOptions({
|
|
76
75
|
options: {
|
|
@@ -108,7 +107,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
108
107
|
fixed: false,
|
|
109
108
|
theme: 'light',
|
|
110
109
|
navType: undefined,
|
|
111
|
-
...
|
|
110
|
+
...EC_DEFAULT_PROPS.pageHeader,
|
|
112
111
|
});
|
|
113
112
|
|
|
114
113
|
const { currentPages, currentPageRoute, isTabbarPage } = useCurrentPageRoute();
|
|
@@ -118,7 +117,7 @@ const hasBack = computed(() => {
|
|
|
118
117
|
// 如果指定了导航按钮类型,则根据类型判断
|
|
119
118
|
if (props.navType !== undefined) return !!(props.navType & 1);
|
|
120
119
|
// 在首页不显示返回按钮
|
|
121
|
-
if (
|
|
120
|
+
if (EC_HOME_PATH === '/' + currentPageRoute.value) return false;
|
|
122
121
|
// 如果是 tabbar 页面,则不显示返回按钮
|
|
123
122
|
if (isTabbarPage.value) return false;
|
|
124
123
|
// 页面栈只有一个时不显示返回按钮
|
|
@@ -132,7 +131,7 @@ const hasHome = computed(() => {
|
|
|
132
131
|
// 如果指定了导航按钮类型,则根据类型判断
|
|
133
132
|
if (props.navType !== undefined) return !!(props.navType & 2);
|
|
134
133
|
// 在首页不显示返回首页按钮
|
|
135
|
-
if (
|
|
134
|
+
if (EC_HOME_PATH === '/' + currentPageRoute.value) return false;
|
|
136
135
|
// 如果是 tabbar 页面,则不显示首页按钮
|
|
137
136
|
if (isTabbarPage.value) return false;
|
|
138
137
|
// 页面栈只有一个时显示首页按钮
|
|
@@ -214,12 +213,13 @@ onMounted(() => {
|
|
|
214
213
|
position: absolute;
|
|
215
214
|
top: 0;
|
|
216
215
|
left: 10rpx;
|
|
216
|
+
display: flex;
|
|
217
217
|
}
|
|
218
218
|
.PageHeader--back-icon,
|
|
219
219
|
.PageHeader--home-icon {
|
|
220
220
|
width: var(--page-header-height);
|
|
221
221
|
height: var(--page-header-height);
|
|
222
|
-
display:
|
|
222
|
+
display: flex;
|
|
223
223
|
justify-content: center;
|
|
224
224
|
align-items: center;
|
|
225
225
|
}
|
package/components/page/page.vue
CHANGED
|
@@ -65,8 +65,8 @@ import {
|
|
|
65
65
|
safeAreaInsetBottom,
|
|
66
66
|
} from '../../utils/windowInfo';
|
|
67
67
|
import { useMessageBoxComponent } from '../../composable/message-box';
|
|
68
|
-
import { pageProps } from './types';
|
|
69
68
|
import { useCurrentPageRoute } from '../../composable/page';
|
|
69
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
70
70
|
|
|
71
71
|
defineOptions({
|
|
72
72
|
options: {
|
|
@@ -143,7 +143,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
143
143
|
showLoadMore: true,
|
|
144
144
|
theme: 'light',
|
|
145
145
|
tabbar: undefined,
|
|
146
|
-
...
|
|
146
|
+
...EC_DEFAULT_PROPS.page,
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
const { isTabbarPage } = useCurrentPageRoute();
|
|
@@ -4,13 +4,9 @@ export type ConfigurablePageProps = {
|
|
|
4
4
|
/** 页面头部样式,主要用于控制导航栏字体颜色 */
|
|
5
5
|
theme?: 'light' | 'dark';
|
|
6
6
|
};
|
|
7
|
-
export declare let pageProps: ConfigurablePageProps;
|
|
8
|
-
export declare const setDefaultPageProps: (props?: ConfigurablePageProps) => void;
|
|
9
7
|
export type ConfigurablePageHeaderProps = {
|
|
10
8
|
/** 导航栏标题是否居中显示 */
|
|
11
9
|
center?: boolean;
|
|
12
10
|
/** 页面头部样式,主要用于控制导航栏字体颜色 */
|
|
13
11
|
theme?: 'light' | 'dark';
|
|
14
12
|
};
|
|
15
|
-
export declare let pageHeaderProps: ConfigurablePageHeaderProps;
|
|
16
|
-
export declare const setDefaultPageHeaderProps: (props?: ConfigurablePageHeaderProps) => void;
|
package/components/page/types.js
CHANGED
package/components/page/types.ts
CHANGED
|
@@ -5,23 +5,9 @@ export type ConfigurablePageProps = {
|
|
|
5
5
|
theme?: 'light' | 'dark';
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
export let pageProps: ConfigurablePageProps = {};
|
|
9
|
-
|
|
10
|
-
export const setDefaultPageProps = (props: ConfigurablePageProps = {}) => {
|
|
11
|
-
pageProps = props;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
8
|
export type ConfigurablePageHeaderProps = {
|
|
15
9
|
/** 导航栏标题是否居中显示 */
|
|
16
10
|
center?: boolean;
|
|
17
11
|
/** 页面头部样式,主要用于控制导航栏字体颜色 */
|
|
18
12
|
theme?: 'light' | 'dark';
|
|
19
13
|
};
|
|
20
|
-
|
|
21
|
-
export let pageHeaderProps: ConfigurablePageHeaderProps = {};
|
|
22
|
-
|
|
23
|
-
export const setDefaultPageHeaderProps = (
|
|
24
|
-
props: ConfigurablePageHeaderProps = {}
|
|
25
|
-
) => {
|
|
26
|
-
pageHeaderProps = props;
|
|
27
|
-
};
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
import { isEqual } from 'lodash-es';
|
|
29
29
|
import { computed, inject, ref } from 'vue';
|
|
30
30
|
import useClassNames from '../../composable/component-name';
|
|
31
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
31
32
|
import SelectorCpn from '../selector/selector.vue';
|
|
32
33
|
import PickerPopupCpn from './picker-popup.vue';
|
|
33
|
-
import { pickerProps } from './types';
|
|
34
34
|
|
|
35
35
|
defineOptions({
|
|
36
36
|
options: {
|
|
@@ -87,7 +87,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
87
87
|
options: () => [],
|
|
88
88
|
multiple: false,
|
|
89
89
|
joinText: '、',
|
|
90
|
-
...
|
|
90
|
+
...EC_DEFAULT_PROPS.picker,
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
const emit = defineEmits<{
|
|
@@ -10,9 +10,3 @@ export type ConfigurablePickerProps = {
|
|
|
10
10
|
/** 多选时选项拼接的分隔符 */
|
|
11
11
|
joinText?: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export let pickerProps: ConfigurablePickerProps = {};
|
|
15
|
-
|
|
16
|
-
export const setDefaultPickerProps = (props: ConfigurablePickerProps = {}) => {
|
|
17
|
-
pickerProps = props;
|
|
18
|
-
};
|
|
@@ -27,8 +27,8 @@ import { ref, useSlots } from 'vue';
|
|
|
27
27
|
import useClassNames from '../../composable/component-name';
|
|
28
28
|
import PopoverContentCpn from './popover-content.vue';
|
|
29
29
|
import PopoverMaskCpn from './popover-mask.vue';
|
|
30
|
-
import { popoverProps } from './types';
|
|
31
30
|
import { useAwaitableDialog, useModelValue } from '../../composable';
|
|
31
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
32
32
|
|
|
33
33
|
defineOptions({
|
|
34
34
|
options: {
|
|
@@ -78,7 +78,7 @@ withDefaults(defineProps<_Props>(), {
|
|
|
78
78
|
fullscreen: false,
|
|
79
79
|
modal: false,
|
|
80
80
|
loading: false,
|
|
81
|
-
...
|
|
81
|
+
...EC_DEFAULT_PROPS.popover,
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
defineEmits<{
|
|
@@ -6,11 +6,3 @@ export type ConfigurablePopoverProps = {
|
|
|
6
6
|
/** 是否模态弹出框 */
|
|
7
7
|
modal?: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export let popoverProps: ConfigurablePopoverProps = {};
|
|
11
|
-
|
|
12
|
-
export const setDefaultPopoverProps = (
|
|
13
|
-
props: ConfigurablePopoverProps = {}
|
|
14
|
-
) => {
|
|
15
|
-
popoverProps = props;
|
|
16
|
-
};
|