@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
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<script lang="ts" setup>
|
|
17
17
|
import { computed } from 'vue';
|
|
18
18
|
import useClassNames from '../../composable/component-name';
|
|
19
|
-
import {
|
|
19
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
20
20
|
|
|
21
21
|
defineOptions({
|
|
22
22
|
options: {
|
|
@@ -47,7 +47,7 @@ type _Props = {
|
|
|
47
47
|
const props = withDefaults(defineProps<_Props>(), {
|
|
48
48
|
value: 0,
|
|
49
49
|
max: 99,
|
|
50
|
-
...
|
|
50
|
+
...EC_DEFAULT_PROPS.badge,
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
const showValue = computed(() => {
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
<script lang="ts" setup>
|
|
78
78
|
import { computed, ref, useCssModule } from 'vue';
|
|
79
79
|
import useClassNames from '../../composable/component-name';
|
|
80
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
80
81
|
import IconCpn from '../icon/icon.vue';
|
|
81
|
-
import { buttonProps } from './types';
|
|
82
82
|
|
|
83
83
|
defineOptions({
|
|
84
84
|
options: {
|
|
@@ -149,7 +149,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
149
149
|
showLoading: undefined,
|
|
150
150
|
small: false,
|
|
151
151
|
large: false,
|
|
152
|
-
...
|
|
152
|
+
...EC_DEFAULT_PROPS.button,
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
const emit = defineEmits<{
|
|
@@ -181,20 +181,20 @@ const buttonSize = computed(() => {
|
|
|
181
181
|
return props.large
|
|
182
182
|
? $style['Button--text-large']
|
|
183
183
|
: props.small
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
? $style['Button--text-small']
|
|
185
|
+
: '';
|
|
186
186
|
}
|
|
187
187
|
return props.large
|
|
188
188
|
? $style['Button--block-large']
|
|
189
189
|
: props.small
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
? $style['Button--block-small']
|
|
191
|
+
: '';
|
|
192
192
|
});
|
|
193
193
|
/** 按钮是否处于 loading 状态 */
|
|
194
194
|
const isLoading = computed(() => props.loading || isAsyncLoading.value);
|
|
195
195
|
/** 是否显示按钮 loading 状态 */
|
|
196
196
|
const isShowLoading = computed(
|
|
197
|
-
() => isLoading.value && (props.showLoading ?? props.text ? false : true)
|
|
197
|
+
() => isLoading.value && ((props.showLoading ?? props.text) ? false : true)
|
|
198
198
|
);
|
|
199
199
|
/** 按钮是否可被点击 */
|
|
200
200
|
const isNotClickable = computed(
|
|
@@ -20,7 +20,7 @@ import { computed, inject, ref } from 'vue';
|
|
|
20
20
|
import type { ComputedRef, Ref } from 'vue';
|
|
21
21
|
import IconCpn from '../icon/icon.vue';
|
|
22
22
|
import useClassNames from '../../composable/component-name';
|
|
23
|
-
import {
|
|
23
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
24
24
|
|
|
25
25
|
defineOptions({
|
|
26
26
|
options: {
|
|
@@ -79,7 +79,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
79
79
|
icon: undefined,
|
|
80
80
|
checkedIcon: '',
|
|
81
81
|
uncheckedIcon: '',
|
|
82
|
-
...
|
|
82
|
+
...EC_DEFAULT_PROPS.checkbox,
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
const emit = defineEmits<{
|
|
@@ -97,7 +97,7 @@ const isReadonly = computed<boolean>(() =>
|
|
|
97
97
|
const isInCheckboxGroup = computed<boolean>(() => !!groupProps);
|
|
98
98
|
/** 是否显示勾选图标 */
|
|
99
99
|
const hasIcon = computed<boolean>(() =>
|
|
100
|
-
props.icon !== undefined ? props.icon : groupProps?.icon ?? true
|
|
100
|
+
props.icon !== undefined ? props.icon : (groupProps?.icon ?? true)
|
|
101
101
|
);
|
|
102
102
|
/** 是否为单选 */
|
|
103
103
|
const isRadio = computed<boolean>(() =>
|
|
@@ -6,11 +6,3 @@ export type ConfigurableCheckboxProps = {
|
|
|
6
6
|
/** 未选中时的图标 */
|
|
7
7
|
uncheckedIcon?: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export let checkboxProps: ConfigurableCheckboxProps = {};
|
|
11
|
-
|
|
12
|
-
export const setDefaultCheckboxProps = (
|
|
13
|
-
props: ConfigurableCheckboxProps = {}
|
|
14
|
-
) => {
|
|
15
|
-
checkboxProps = props;
|
|
16
|
-
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import { computed, provide, ref, watch } from 'vue';
|
|
9
9
|
import useClassNames from '../../composable/component-name';
|
|
10
|
-
import {
|
|
10
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
11
11
|
|
|
12
12
|
defineOptions({
|
|
13
13
|
options: {
|
|
@@ -37,7 +37,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
37
37
|
icon: true,
|
|
38
38
|
checkedIcon: '',
|
|
39
39
|
uncheckedIcon: '',
|
|
40
|
-
...
|
|
40
|
+
...EC_DEFAULT_PROPS.checkboxGroup,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
const emit = defineEmits<{
|
|
@@ -6,15 +6,3 @@ export type ConfigurableCheckboxGroupProps = {
|
|
|
6
6
|
/** 未选中时的图标 */
|
|
7
7
|
uncheckedIcon?: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export let checkboxGroupProps: ConfigurableCheckboxGroupProps = {
|
|
11
|
-
icon: true,
|
|
12
|
-
checkedIcon: '',
|
|
13
|
-
uncheckedIcon: '',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const setDefaultCheckboxGroupProps = (
|
|
17
|
-
props: ConfigurableCheckboxGroupProps = {}
|
|
18
|
-
) => {
|
|
19
|
-
checkboxGroupProps = props;
|
|
20
|
-
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
radio
|
|
8
8
|
? item.value === currentValue
|
|
9
9
|
: Array.isArray(currentValue) &&
|
|
10
|
-
|
|
10
|
+
currentValue.includes(item.value)
|
|
11
11
|
"
|
|
12
12
|
:icon="icon"
|
|
13
13
|
:checked-icon="
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
<script lang="ts" setup>
|
|
29
29
|
import { computed, ref } from 'vue';
|
|
30
30
|
import useClassNames from '../../composable/component-name';
|
|
31
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
31
32
|
import Checkbox2Cpn from './checkbox2.vue';
|
|
32
|
-
import { checkboxGroupProps } from '../checkbox-group/types';
|
|
33
33
|
|
|
34
34
|
defineOptions({
|
|
35
35
|
options: {
|
|
@@ -68,7 +68,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
68
68
|
icon: true,
|
|
69
69
|
checkedIcon: undefined,
|
|
70
70
|
uncheckedIcon: undefined,
|
|
71
|
-
...
|
|
71
|
+
...EC_DEFAULT_PROPS.checkboxGroup,
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
const emit = defineEmits<{
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
|
|
71
71
|
<script lang="ts" setup>
|
|
72
72
|
import { computed, inject, ref } from 'vue';
|
|
73
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
73
74
|
import useClassNames from '../../composable/component-name';
|
|
74
75
|
import { formatDate, toDate } from '../../utils/date';
|
|
75
76
|
import PopupCpn from '../popup/popup.vue';
|
|
76
77
|
import SelectorCpn from '../selector/selector.vue';
|
|
77
78
|
import DatePickerViewCpn from './date-picker-view.vue';
|
|
78
|
-
import { datePickerProps } from './types';
|
|
79
79
|
|
|
80
80
|
defineOptions({
|
|
81
81
|
options: {
|
|
@@ -120,7 +120,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
120
120
|
timeAppend: '',
|
|
121
121
|
min: '',
|
|
122
122
|
max: '',
|
|
123
|
-
...
|
|
123
|
+
...EC_DEFAULT_PROPS.datePicker,
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
const emit = defineEmits<{
|
|
@@ -261,7 +261,9 @@ const onConfirm = () => {
|
|
|
261
261
|
height: 72rpx;
|
|
262
262
|
background: UTILS__GLOBAL_VAR(color, background);
|
|
263
263
|
border-radius: 12rpx;
|
|
264
|
-
transition:
|
|
264
|
+
transition:
|
|
265
|
+
color 0.3s,
|
|
266
|
+
background 0.3s;
|
|
265
267
|
&.DatePicker--date-checked {
|
|
266
268
|
background: UTILS__GLOBAL_VAR(theme, primary);
|
|
267
269
|
color: #fff;
|
|
@@ -8,5 +8,3 @@ export type ConfigurableDatePickerProps = {
|
|
|
8
8
|
/** 在选择的日期后面拼接时间字符串,如果传入的是数组,会分别对应添加到范围日期值后 */
|
|
9
9
|
timeAppend?: string | (() => string[]);
|
|
10
10
|
};
|
|
11
|
-
export declare let datePickerProps: ConfigurableDatePickerProps;
|
|
12
|
-
export declare const setDefaultDatePickerProps: (props?: ConfigurableDatePickerProps) => void;
|
|
@@ -8,11 +8,3 @@ export type ConfigurableDatePickerProps = {
|
|
|
8
8
|
/** 在选择的日期后面拼接时间字符串,如果传入的是数组,会分别对应添加到范围日期值后 */
|
|
9
9
|
timeAppend?: string | (() => string[]);
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
export let datePickerProps: ConfigurableDatePickerProps = {};
|
|
13
|
-
|
|
14
|
-
export const setDefaultDatePickerProps = (
|
|
15
|
-
props: ConfigurableDatePickerProps = {}
|
|
16
|
-
) => {
|
|
17
|
-
datePickerProps = props;
|
|
18
|
-
};
|
|
@@ -37,8 +37,8 @@ import { ref, computed, useSlots } from 'vue';
|
|
|
37
37
|
import useClassNames from '../../composable/component-name';
|
|
38
38
|
import PopoverMaskCpn from '../popover/popover-mask.vue';
|
|
39
39
|
import DialogContentCpn from './dialog-content.vue';
|
|
40
|
-
import { dialogProps } from './types';
|
|
41
40
|
import { useAwaitableDialog, useModelValue } from '../../composable';
|
|
41
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
42
42
|
|
|
43
43
|
defineOptions({
|
|
44
44
|
options: {
|
|
@@ -105,7 +105,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
105
105
|
confirm: '确认',
|
|
106
106
|
closeOnConfirm: true,
|
|
107
107
|
async: false,
|
|
108
|
-
...
|
|
108
|
+
...EC_DEFAULT_PROPS.dialog,
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
const emit = defineEmits<{
|
|
@@ -16,9 +16,3 @@ export type ConfigurableDialogProps = {
|
|
|
16
16
|
/** 点击确认按钮时是否自动关闭对话框 */
|
|
17
17
|
closeOnConfirm?: boolean;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
export let dialogProps: ConfigurableDialogProps = {};
|
|
21
|
-
|
|
22
|
-
export const setDefaultDialogProps = (props: ConfigurableDialogProps = {}) => {
|
|
23
|
-
dialogProps = props;
|
|
24
|
-
};
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
<script lang="ts" setup>
|
|
29
29
|
import { computed } 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 { dropdownProps } from './types';
|
|
33
33
|
|
|
34
34
|
defineOptions({
|
|
35
35
|
options: {
|
|
@@ -59,7 +59,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
59
59
|
align: '',
|
|
60
60
|
multiple: true,
|
|
61
61
|
formatter: null,
|
|
62
|
-
...
|
|
62
|
+
...EC_DEFAULT_PROPS.dropdown,
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
/** 是否选择了值 */
|
|
@@ -76,10 +76,10 @@ const showValue = computed(() => {
|
|
|
76
76
|
return props.formatter
|
|
77
77
|
? props.formatter(props.modelValue)
|
|
78
78
|
: props.multiple &&
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
Array.isArray(props.modelValue) &&
|
|
80
|
+
props.modelValue.length > 1
|
|
81
|
+
? `+${props.modelValue.length}`
|
|
82
|
+
: props.modelValue;
|
|
83
83
|
});
|
|
84
84
|
</script>
|
|
85
85
|
|
|
@@ -6,11 +6,3 @@ export type ConfigurableDropdownProps = {
|
|
|
6
6
|
/** 展示值格式化函数 */
|
|
7
7
|
formatter?: ((val: unknown) => string) | null;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export let dropdownProps: ConfigurableDropdownProps = {};
|
|
11
|
-
|
|
12
|
-
export const setDefaultDropdownProps = (
|
|
13
|
-
props: ConfigurableDropdownProps = {}
|
|
14
|
-
) => {
|
|
15
|
-
dropdownProps = props;
|
|
16
|
-
};
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
import useClassNames from '../../composable/component-name';
|
|
43
43
|
import IconCpn from '../icon/icon.vue';
|
|
44
44
|
import emptyImage from '../../resources/image/empty.svg';
|
|
45
|
-
import {
|
|
45
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
46
46
|
|
|
47
47
|
defineOptions({
|
|
48
48
|
options: {
|
|
@@ -72,7 +72,7 @@ withDefaults(defineProps<_Props>(), {
|
|
|
72
72
|
loading: false,
|
|
73
73
|
loadingImage: '',
|
|
74
74
|
loadingText: '数据加载中',
|
|
75
|
-
...
|
|
75
|
+
...EC_DEFAULT_PROPS.empty,
|
|
76
76
|
});
|
|
77
77
|
</script>
|
|
78
78
|
|
|
@@ -8,14 +8,3 @@ export type ConfigurableEmptyProps = {
|
|
|
8
8
|
/** 加载中文本 */
|
|
9
9
|
loadingText?: string;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
export let emptyProps: ConfigurableEmptyProps = {
|
|
13
|
-
image: '',
|
|
14
|
-
text: '暂无数据',
|
|
15
|
-
loadingImage: '',
|
|
16
|
-
loadingText: '数据加载中',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const setDefaultEmptyProps = (props: ConfigurableEmptyProps = {}) => {
|
|
20
|
-
emptyProps = props;
|
|
21
|
-
};
|
package/components/flex/flex.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import { computed } from 'vue';
|
|
9
9
|
import useClassNames from '../../composable/component-name';
|
|
10
|
-
import {
|
|
10
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
11
11
|
|
|
12
12
|
defineOptions({
|
|
13
13
|
options: {
|
|
@@ -43,7 +43,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
43
43
|
align: 'center',
|
|
44
44
|
wrap: false,
|
|
45
45
|
gap: '0px',
|
|
46
|
-
...
|
|
46
|
+
...EC_DEFAULT_PROPS.flex,
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
const gapValue = computed(() => {
|
package/components/flex/types.js
CHANGED
package/components/flex/types.ts
CHANGED
|
@@ -14,9 +14,3 @@ export type ConfigurableFlexProps = {
|
|
|
14
14
|
/** 间距 */
|
|
15
15
|
gap?: string | number | (() => (string | number)[]);
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
export let flexProps: ConfigurableFlexProps = {};
|
|
19
|
-
|
|
20
|
-
export const setDefaultFlexProps = (props: ConfigurableFlexProps = {}) => {
|
|
21
|
-
flexProps = props;
|
|
22
|
-
};
|
package/components/form/form.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import { computed, provide } from 'vue';
|
|
9
9
|
import useClassNames from '../../composable/component-name';
|
|
10
|
-
import {
|
|
10
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
11
11
|
|
|
12
12
|
defineOptions({
|
|
13
13
|
options: {
|
|
@@ -28,7 +28,7 @@ type _Props = {
|
|
|
28
28
|
const props = withDefaults(defineProps<_Props>(), {
|
|
29
29
|
readonly: false,
|
|
30
30
|
type: 'line',
|
|
31
|
-
...
|
|
31
|
+
...EC_DEFAULT_PROPS.form,
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
provide(
|
package/components/form/types.js
CHANGED
package/components/form/types.ts
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { computed, inject } from 'vue';
|
|
32
32
|
import type { ComputedRef } from 'vue';
|
|
33
33
|
import useClassNames from '../../composable/component-name';
|
|
34
|
-
import {
|
|
34
|
+
import { EC_DEFAULT_PROPS } from '../../configs';
|
|
35
35
|
|
|
36
36
|
defineOptions({
|
|
37
37
|
options: {
|
|
@@ -58,7 +58,7 @@ const props = withDefaults(defineProps<_Props>(), {
|
|
|
58
58
|
subLabel: '',
|
|
59
59
|
required: false,
|
|
60
60
|
type: undefined,
|
|
61
|
-
...
|
|
61
|
+
...EC_DEFAULT_PROPS.formItem,
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
/** 表单是否只读 */
|
|
@@ -2,11 +2,3 @@ export type ConfigurableFormItemProps = {
|
|
|
2
2
|
/** 表单显示类型 */
|
|
3
3
|
type?: 'line' | 'next' | 'block';
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
export let formItemProps: ConfigurableFormItemProps = {};
|
|
7
|
-
|
|
8
|
-
export const setDefaultFormItemProps = (
|
|
9
|
-
props: ConfigurableFormItemProps = {}
|
|
10
|
-
) => {
|
|
11
|
-
formItemProps = props;
|
|
12
|
-
};
|