@ecolovo/uniapp-components 2.0.6 → 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 +7 -7
- 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 +3 -3
- 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 +3 -3
- package/components/date-picker/date-picker.vue +5 -3
- 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 +6 -6
- 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 +60 -2
- 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/animations/loading-animation3.vue +19 -9
- package/components/loading/animations/loading-animation4.vue +2 -1
- 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 +4 -4
- 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-body.vue +4 -2
- 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-popup.vue +1 -1
- 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-content.vue +13 -14
- 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 +4 -3
- 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 +5 -3
- 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/composable.ts +3 -3
- 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 -2
- package/utils/upload.ts +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
|
@@ -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
|
-
};
|
|
@@ -136,9 +136,8 @@ onMounted(() => {
|
|
|
136
136
|
min-height: UTILS__LOCAL_VAR(min-height);
|
|
137
137
|
max-height: UTILS__LOCAL_VAR(max-height);
|
|
138
138
|
transform: translate(0, -100%) scale(1);
|
|
139
|
-
--content-radius: 0 0 #{UTILS__LOCAL_VAR(radius)}
|
|
140
|
-
|
|
141
|
-
)};
|
|
139
|
+
--content-radius: 0 0 #{UTILS__LOCAL_VAR(radius)}
|
|
140
|
+
#{UTILS__LOCAL_VAR(radius)};
|
|
142
141
|
--scroll-max-height: #{UTILS__LOCAL_VAR(max-height)};
|
|
143
142
|
}
|
|
144
143
|
&.PopoverContent--at-bottom {
|
|
@@ -148,9 +147,8 @@ onMounted(() => {
|
|
|
148
147
|
min-height: UTILS__LOCAL_VAR(min-height);
|
|
149
148
|
max-height: UTILS__LOCAL_VAR(max-height);
|
|
150
149
|
transform: translate(0, 100%) scale(1);
|
|
151
|
-
--content-radius: #{UTILS__LOCAL_VAR(radius)}
|
|
152
|
-
|
|
153
|
-
)} 0 0;
|
|
150
|
+
--content-radius: #{UTILS__LOCAL_VAR(radius)}
|
|
151
|
+
#{UTILS__LOCAL_VAR(radius)} 0 0;
|
|
154
152
|
--scroll-max-height: #{UTILS__LOCAL_VAR(max-height)};
|
|
155
153
|
}
|
|
156
154
|
&.PopoverContent--at-left {
|
|
@@ -159,9 +157,8 @@ onMounted(() => {
|
|
|
159
157
|
width: UTILS__LOCAL_VAR(width);
|
|
160
158
|
height: 100%;
|
|
161
159
|
transform: translate(-100%, 0) scale(1);
|
|
162
|
-
--content-radius: 0 #{UTILS__LOCAL_VAR(radius)}
|
|
163
|
-
|
|
164
|
-
)} 0;
|
|
160
|
+
--content-radius: 0 #{UTILS__LOCAL_VAR(radius)}
|
|
161
|
+
#{UTILS__LOCAL_VAR(radius)} 0;
|
|
165
162
|
--scroll-max-height: 100vh;
|
|
166
163
|
}
|
|
167
164
|
&.PopoverContent--at-right {
|
|
@@ -170,9 +167,8 @@ onMounted(() => {
|
|
|
170
167
|
width: UTILS__LOCAL_VAR(width);
|
|
171
168
|
height: 100%;
|
|
172
169
|
transform: translate(100%, 0) scale(1);
|
|
173
|
-
--content-radius: #{UTILS__LOCAL_VAR(radius)} 0 0
|
|
174
|
-
|
|
175
|
-
)};
|
|
170
|
+
--content-radius: #{UTILS__LOCAL_VAR(radius)} 0 0
|
|
171
|
+
#{UTILS__LOCAL_VAR(radius)};
|
|
176
172
|
--scroll-max-height: 100vh;
|
|
177
173
|
}
|
|
178
174
|
&.PopoverContent--at-center {
|
|
@@ -203,7 +199,9 @@ onMounted(() => {
|
|
|
203
199
|
|
|
204
200
|
// 内容部分显示动画
|
|
205
201
|
&.PopoverContent--content-initialized {
|
|
206
|
-
transition:
|
|
202
|
+
transition:
|
|
203
|
+
transform 0.3s,
|
|
204
|
+
opacity 0.3s;
|
|
207
205
|
|
|
208
206
|
:global(.PopoverMask--visible) & {
|
|
209
207
|
opacity: 1;
|
|
@@ -267,7 +265,8 @@ onMounted(() => {
|
|
|
267
265
|
);
|
|
268
266
|
min-height: max(
|
|
269
267
|
calc(
|
|
270
|
-
#{UTILS__LOCAL_VAR(min-height)} - #{$header-padding} -
|
|
268
|
+
#{UTILS__LOCAL_VAR(min-height)} - #{$header-padding} -
|
|
269
|
+
#{$footer-padding}
|
|
271
270
|
),
|
|
272
271
|
0px
|
|
273
272
|
);
|
|
@@ -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
|
-
};
|
|
@@ -32,8 +32,8 @@ import { ref, computed } from 'vue';
|
|
|
32
32
|
import useClassNames from '../../composable/component-name';
|
|
33
33
|
import PopoverMaskCpn from '../popover/popover-mask.vue';
|
|
34
34
|
import PopupContentCpn from './popup-content.vue';
|
|
35
|
-
import { popupProps } from './types';
|
|
36
35
|
import { useAwaitableDialog, useModelValue } from '../../composable';
|
|
36
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
37
37
|
|
|
38
38
|
defineOptions({
|
|
39
39
|
options: {
|
|
@@ -95,7 +95,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
95
95
|
confirm: '确认',
|
|
96
96
|
closeOnConfirm: true,
|
|
97
97
|
async: false,
|
|
98
|
-
...
|
|
98
|
+
...EC_DEFAULT_PROPS.popup,
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
const emit = defineEmits<{
|
|
@@ -16,9 +16,3 @@ export type ConfigurablePopupProps = {
|
|
|
16
16
|
/** 点击确认按钮时是否自动关闭对话框 */
|
|
17
17
|
closeOnConfirm?: boolean;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
export let popupProps: ConfigurablePopupProps = {};
|
|
21
|
-
|
|
22
|
-
export const setDefaultPopupProps = (props: ConfigurablePopupProps = {}) => {
|
|
23
|
-
popupProps = props;
|
|
24
|
-
};
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
<script lang="ts" setup>
|
|
32
32
|
import { computed } from 'vue';
|
|
33
33
|
import useClassNames from '../../composable/component-name';
|
|
34
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
34
35
|
import { formatPrice } from '../../utils/price';
|
|
35
|
-
import { priceProps } from './types';
|
|
36
36
|
|
|
37
37
|
defineOptions({
|
|
38
38
|
options: {
|
|
@@ -59,7 +59,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
59
59
|
prefixUnit: false,
|
|
60
60
|
showSymbol: false,
|
|
61
61
|
alwaysShowDecimal: true,
|
|
62
|
-
...
|
|
62
|
+
...EC_DEFAULT_PROPS.price,
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
/** 格式化后的价格 */
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
import { computed, ref } from 'vue';
|
|
52
52
|
import { debounce as debounceFn } from 'lodash-es';
|
|
53
53
|
import useClassNames from '../../composable/component-name';
|
|
54
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
54
55
|
import ButtonCpn from '../button/button.vue';
|
|
55
56
|
import IconCpn from '../icon/icon.vue';
|
|
56
|
-
import { searchProps } from './types';
|
|
57
57
|
|
|
58
58
|
defineOptions({
|
|
59
59
|
options: {
|
|
@@ -92,7 +92,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
92
92
|
disabled: false,
|
|
93
93
|
readonly: false,
|
|
94
94
|
cancelButton: false,
|
|
95
|
-
...
|
|
95
|
+
...EC_DEFAULT_PROPS.search,
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
const emit = defineEmits<{
|
|
@@ -10,9 +10,3 @@ export type ConfigurableSearchProps = {
|
|
|
10
10
|
/** 是否显示取消按钮 */
|
|
11
11
|
cancelButton?: boolean;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export let searchProps: ConfigurableSearchProps = {};
|
|
15
|
-
|
|
16
|
-
export const setDefaultSearchProps = (props: ConfigurableSearchProps = {}) => {
|
|
17
|
-
searchProps = props;
|
|
18
|
-
};
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
<script lang="ts" setup>
|
|
14
14
|
import useClassNames from '../../composable/component-name';
|
|
15
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
15
16
|
import IconCpn from '../icon/icon.vue';
|
|
16
|
-
import { searchingProps } from './types';
|
|
17
17
|
|
|
18
18
|
defineOptions({
|
|
19
19
|
options: {
|
|
@@ -34,7 +34,7 @@ type _Props = {
|
|
|
34
34
|
withDefaults(defineProps<_Props>(), {
|
|
35
35
|
image: '',
|
|
36
36
|
text: '数据加载中',
|
|
37
|
-
...
|
|
37
|
+
...EC_DEFAULT_PROPS.searching,
|
|
38
38
|
});
|
|
39
39
|
</script>
|
|
40
40
|
|
|
@@ -4,11 +4,3 @@ export type ConfigurableSearchingProps = {
|
|
|
4
4
|
/** 文本 */
|
|
5
5
|
text?: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
export let searchingProps: ConfigurableSearchingProps = {};
|
|
9
|
-
|
|
10
|
-
export const setDefaultSearchingProps = (
|
|
11
|
-
props: ConfigurableSearchingProps = {}
|
|
12
|
-
) => {
|
|
13
|
-
searchingProps = props;
|
|
14
|
-
};
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
<script lang="ts" setup>
|
|
25
25
|
import { computed, inject, ref } from 'vue';
|
|
26
26
|
import useClassNames from '../../composable/component-name';
|
|
27
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
27
28
|
import IconCpn from '../icon/icon.vue';
|
|
28
|
-
import { switchProps } from './types';
|
|
29
29
|
|
|
30
30
|
defineOptions({
|
|
31
31
|
options: {
|
|
@@ -58,7 +58,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
58
58
|
valueOff: false,
|
|
59
59
|
disabled: false,
|
|
60
60
|
readonly: false,
|
|
61
|
-
...
|
|
61
|
+
...EC_DEFAULT_PROPS.switch,
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
const emit = defineEmits<{
|
|
@@ -179,7 +179,8 @@ const $_toggle = () => {
|
|
|
179
179
|
(
|
|
180
180
|
UTILS__LOCAL_VAR(height) +
|
|
181
181
|
UTILS__LOCAL_VAR(indicator-size)
|
|
182
|
-
) /
|
|
182
|
+
) /
|
|
183
|
+
2
|
|
183
184
|
);
|
|
184
185
|
}
|
|
185
186
|
}
|
|
@@ -4,9 +4,3 @@ export type ConfigurableSwitchProps = {
|
|
|
4
4
|
/** 关闭状态的值 */
|
|
5
5
|
valueOff?: boolean | number | string;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
export let switchProps: ConfigurableSwitchProps = {};
|
|
9
|
-
|
|
10
|
-
export const setDefaultSwitchProps = (props: ConfigurableSwitchProps = {}) => {
|
|
11
|
-
switchProps = props;
|
|
12
|
-
};
|
package/components/tab/tab.vue
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
watch,
|
|
48
48
|
} from 'vue';
|
|
49
49
|
import useClassNames from '../../composable/component-name';
|
|
50
|
-
import {
|
|
50
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
51
51
|
|
|
52
52
|
defineOptions({
|
|
53
53
|
options: {
|
|
@@ -85,7 +85,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
85
85
|
tabs: () => [],
|
|
86
86
|
evenly: true,
|
|
87
87
|
indicator: true,
|
|
88
|
-
...
|
|
88
|
+
...EC_DEFAULT_PROPS.tab,
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
const emit = defineEmits<{
|
|
@@ -270,7 +270,9 @@ const onChangeTab = (index: number) => {
|
|
|
270
270
|
left: var(--indicator-center, 0);
|
|
271
271
|
width: UTILS__LOCAL_VAR(indicator-width, var(--tab-text-width, 0));
|
|
272
272
|
&.Tab--indicator-animation {
|
|
273
|
-
transition:
|
|
273
|
+
transition:
|
|
274
|
+
left 0.3s,
|
|
275
|
+
width 0.3s;
|
|
274
276
|
}
|
|
275
277
|
}
|
|
276
278
|
</style>
|
package/components/tab/types.js
CHANGED
package/components/tab/types.ts
CHANGED
|
@@ -73,8 +73,8 @@ import {
|
|
|
73
73
|
watch,
|
|
74
74
|
} from 'vue';
|
|
75
75
|
import useClassNames from '../../composable/component-name';
|
|
76
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
76
77
|
import IconCpn from '../icon/icon.vue';
|
|
77
|
-
import { textareaProps } from './types';
|
|
78
78
|
|
|
79
79
|
defineOptions({
|
|
80
80
|
options: {
|
|
@@ -114,7 +114,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
114
114
|
autoHeight: true,
|
|
115
115
|
readonly: false,
|
|
116
116
|
fold: true,
|
|
117
|
-
...
|
|
117
|
+
...EC_DEFAULT_PROPS.textarea,
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
const emit = defineEmits<{
|
|
@@ -8,11 +8,3 @@ export type ConfigurableTextareaProps = {
|
|
|
8
8
|
/** 当只读时,如果文字过多,是否折叠 */
|
|
9
9
|
fold?: boolean;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
export let textareaProps: ConfigurableTextareaProps = {};
|
|
13
|
-
|
|
14
|
-
export const setDefaultTextareaProps = (
|
|
15
|
-
props: ConfigurableTextareaProps = {}
|
|
16
|
-
) => {
|
|
17
|
-
textareaProps = props;
|
|
18
|
-
};
|