@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.
Files changed (154) hide show
  1. package/components/badge/badge.vue +2 -2
  2. package/components/badge/types.d.ts +0 -2
  3. package/components/badge/types.js +1 -4
  4. package/components/badge/types.ts +0 -6
  5. package/components/button/button.vue +7 -7
  6. package/components/button/types.d.ts +0 -2
  7. package/components/button/types.js +1 -4
  8. package/components/button/types.ts +0 -6
  9. package/components/checkbox/checkbox.vue +3 -3
  10. package/components/checkbox/types.d.ts +0 -2
  11. package/components/checkbox/types.js +1 -4
  12. package/components/checkbox/types.ts +0 -8
  13. package/components/checkbox-group/checkbox-group.vue +2 -2
  14. package/components/checkbox-group/types.d.ts +0 -2
  15. package/components/checkbox-group/types.js +1 -8
  16. package/components/checkbox-group/types.ts +0 -12
  17. package/components/checkbox-group2/checkbox-group2.vue +3 -3
  18. package/components/date-picker/date-picker.vue +5 -3
  19. package/components/date-picker/types.d.ts +0 -2
  20. package/components/date-picker/types.js +1 -4
  21. package/components/date-picker/types.ts +0 -8
  22. package/components/dialog/dialog.vue +2 -2
  23. package/components/dialog/types.d.ts +0 -2
  24. package/components/dialog/types.js +1 -4
  25. package/components/dialog/types.ts +0 -6
  26. package/components/dropdown/dropdown.vue +6 -6
  27. package/components/dropdown/types.d.ts +0 -2
  28. package/components/dropdown/types.js +1 -4
  29. package/components/dropdown/types.ts +0 -8
  30. package/components/empty/empty.vue +2 -2
  31. package/components/empty/types.d.ts +0 -2
  32. package/components/empty/types.js +1 -9
  33. package/components/empty/types.ts +0 -11
  34. package/components/flex/flex.vue +2 -2
  35. package/components/flex/types.d.ts +0 -2
  36. package/components/flex/types.js +1 -4
  37. package/components/flex/types.ts +0 -6
  38. package/components/form/form.vue +2 -2
  39. package/components/form/types.d.ts +0 -2
  40. package/components/form/types.js +1 -4
  41. package/components/form/types.ts +0 -6
  42. package/components/form-item/form-item.vue +2 -2
  43. package/components/form-item/types.d.ts +0 -2
  44. package/components/form-item/types.js +1 -4
  45. package/components/form-item/types.ts +0 -8
  46. package/components/icon/icon.vue +60 -2
  47. package/components/image/image.vue +3 -2
  48. package/components/image/types.d.ts +0 -2
  49. package/components/image/types.js +1 -4
  50. package/components/image/types.ts +0 -6
  51. package/components/input/input.vue +2 -2
  52. package/components/input/password-input.vue +2 -2
  53. package/components/input/types.d.ts +0 -4
  54. package/components/input/types.js +1 -8
  55. package/components/input/types.ts +0 -14
  56. package/components/list-page/list-page.vue +2 -2
  57. package/components/list-page/types.d.ts +0 -2
  58. package/components/list-page/types.js +1 -4
  59. package/components/list-page/types.ts +0 -8
  60. package/components/load-more/load-more.vue +2 -2
  61. package/components/load-more/types.d.ts +0 -2
  62. package/components/load-more/types.js +1 -4
  63. package/components/load-more/types.ts +0 -8
  64. package/components/loading/animations/loading-animation3.vue +19 -9
  65. package/components/loading/animations/loading-animation4.vue +2 -1
  66. package/components/loading/loading.vue +2 -2
  67. package/components/loading/types.d.ts +0 -2
  68. package/components/loading/types.js +1 -4
  69. package/components/loading/types.ts +0 -8
  70. package/components/message-box/message-box.vue +2 -2
  71. package/components/message-box/types.d.ts +0 -2
  72. package/components/message-box/types.js +1 -4
  73. package/components/message-box/types.ts +0 -8
  74. package/components/number-dialog/number-dialog.vue +2 -2
  75. package/components/number-dialog/types.d.ts +0 -2
  76. package/components/number-dialog/types.js +1 -4
  77. package/components/number-dialog/types.ts +0 -8
  78. package/components/number-input/number-input.vue +4 -4
  79. package/components/number-input/types.d.ts +0 -2
  80. package/components/number-input/types.js +1 -4
  81. package/components/number-input/types.ts +0 -8
  82. package/components/numpad/numpad.vue +2 -2
  83. package/components/numpad/types.d.ts +0 -2
  84. package/components/numpad/types.js +1 -4
  85. package/components/numpad/types.ts +0 -6
  86. package/components/page/page-body.vue +4 -2
  87. package/components/page/page-header.vue +7 -7
  88. package/components/page/page.vue +2 -2
  89. package/components/page/types.d.ts +0 -4
  90. package/components/page/types.js +1 -8
  91. package/components/page/types.ts +0 -14
  92. package/components/picker/picker-popup.vue +1 -1
  93. package/components/picker/picker.vue +2 -2
  94. package/components/picker/types.d.ts +0 -2
  95. package/components/picker/types.js +1 -4
  96. package/components/picker/types.ts +0 -6
  97. package/components/popover/popover-content.vue +13 -14
  98. package/components/popover/popover.vue +2 -2
  99. package/components/popover/types.d.ts +0 -2
  100. package/components/popover/types.js +1 -4
  101. package/components/popover/types.ts +0 -8
  102. package/components/popup/popup.vue +2 -2
  103. package/components/popup/types.d.ts +0 -2
  104. package/components/popup/types.js +1 -4
  105. package/components/popup/types.ts +0 -6
  106. package/components/price/price.vue +2 -2
  107. package/components/price/types.d.ts +0 -2
  108. package/components/price/types.js +1 -4
  109. package/components/price/types.ts +0 -6
  110. package/components/search/search.vue +2 -2
  111. package/components/search/types.d.ts +0 -2
  112. package/components/search/types.js +1 -4
  113. package/components/search/types.ts +0 -6
  114. package/components/searching/searching.vue +2 -2
  115. package/components/searching/types.d.ts +0 -2
  116. package/components/searching/types.js +1 -4
  117. package/components/searching/types.ts +0 -8
  118. package/components/switch/switch.vue +4 -3
  119. package/components/switch/types.d.ts +0 -2
  120. package/components/switch/types.js +1 -4
  121. package/components/switch/types.ts +0 -6
  122. package/components/tab/tab.vue +5 -3
  123. package/components/tab/types.d.ts +0 -2
  124. package/components/tab/types.js +1 -4
  125. package/components/tab/types.ts +0 -6
  126. package/components/textarea/textarea.vue +2 -2
  127. package/components/textarea/types.d.ts +0 -2
  128. package/components/textarea/types.js +1 -4
  129. package/components/textarea/types.ts +0 -8
  130. package/components/upload/composable.ts +3 -3
  131. package/components/upload/media-upload.vue +4 -3
  132. package/components/upload/types.d.ts +0 -2
  133. package/components/upload/types.js +1 -4
  134. package/components/upload/types.ts +0 -8
  135. package/composable/component-name.js +2 -2
  136. package/composable/component-name.ts +2 -2
  137. package/composable/page.js +2 -2
  138. package/composable/page.ts +2 -2
  139. package/configs/index.d.ts +9 -45
  140. package/configs/index.js +9 -70
  141. package/configs/index.ts +9 -103
  142. package/globals.d.ts +8 -0
  143. package/globals.ts +7 -0
  144. package/index.d.ts +0 -1
  145. package/index.js +0 -1
  146. package/index.ts +0 -1
  147. package/package.json +1 -2
  148. package/utils/upload.ts +1 -1
  149. package/vite.d.ts +22 -0
  150. package/vite.js +68 -0
  151. package/vite.ts +107 -0
  152. package/init.d.ts +0 -21
  153. package/init.js +0 -91
  154. 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 { badgeProps } from './types';
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
- ...badgeProps,
50
+ ...EC_DEFAULT_PROPS.badge,
51
51
  });
52
52
 
53
53
  const showValue = computed(() => {
@@ -2,5 +2,3 @@ export type ConfigurableBadgeProps = {
2
2
  /** 最大显示值,超出时会在后面添加一个“+” */
3
3
  max?: number;
4
4
  };
5
- export declare let badgeProps: ConfigurableBadgeProps;
6
- export declare const setDefaultBadgeProps: (props?: ConfigurableBadgeProps) => void;
@@ -1,4 +1 @@
1
- export let badgeProps = {};
2
- export const setDefaultBadgeProps = (props = {}) => {
3
- badgeProps = props;
4
- };
1
+ export {};
@@ -2,9 +2,3 @@ export type ConfigurableBadgeProps = {
2
2
  /** 最大显示值,超出时会在后面添加一个“+” */
3
3
  max?: number;
4
4
  };
5
-
6
- export let badgeProps: ConfigurableBadgeProps = {};
7
-
8
- export const setDefaultBadgeProps = (props: ConfigurableBadgeProps = {}) => {
9
- badgeProps = props;
10
- };
@@ -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
- ...buttonProps,
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
- ? $style['Button--text-small']
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
- ? $style['Button--block-small']
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(
@@ -16,5 +16,3 @@ export type ConfigurableButtonProps = {
16
16
  /** 大尺寸 */
17
17
  large?: boolean;
18
18
  };
19
- export declare let buttonProps: ConfigurableButtonProps;
20
- export declare const setDefaultButtonProps: (props?: ConfigurableButtonProps) => void;
@@ -1,4 +1 @@
1
- export let buttonProps = {};
2
- export const setDefaultButtonProps = (props = {}) => {
3
- buttonProps = props;
4
- };
1
+ export {};
@@ -16,9 +16,3 @@ export type ConfigurableButtonProps = {
16
16
  /** 大尺寸 */
17
17
  large?: boolean;
18
18
  };
19
-
20
- export let buttonProps: ConfigurableButtonProps = {};
21
-
22
- export const setDefaultButtonProps = (props: ConfigurableButtonProps = {}) => {
23
- buttonProps = props;
24
- };
@@ -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 { checkboxProps } from './types';
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
- ...checkboxProps,
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,5 +6,3 @@ export type ConfigurableCheckboxProps = {
6
6
  /** 未选中时的图标 */
7
7
  uncheckedIcon?: string;
8
8
  };
9
- export declare let checkboxProps: ConfigurableCheckboxProps;
10
- export declare const setDefaultCheckboxProps: (props?: ConfigurableCheckboxProps) => void;
@@ -1,4 +1 @@
1
- export let checkboxProps = {};
2
- export const setDefaultCheckboxProps = (props = {}) => {
3
- checkboxProps = props;
4
- };
1
+ export {};
@@ -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 { checkboxGroupProps } from './types';
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
- ...checkboxGroupProps,
40
+ ...EC_DEFAULT_PROPS.checkboxGroup,
41
41
  });
42
42
 
43
43
  const emit = defineEmits<{
@@ -6,5 +6,3 @@ export type ConfigurableCheckboxGroupProps = {
6
6
  /** 未选中时的图标 */
7
7
  uncheckedIcon?: string;
8
8
  };
9
- export declare let checkboxGroupProps: ConfigurableCheckboxGroupProps;
10
- export declare const setDefaultCheckboxGroupProps: (props?: ConfigurableCheckboxGroupProps) => void;
@@ -1,8 +1 @@
1
- export let checkboxGroupProps = {
2
- icon: true,
3
- checkedIcon: '',
4
- uncheckedIcon: '',
5
- };
6
- export const setDefaultCheckboxGroupProps = (props = {}) => {
7
- checkboxGroupProps = props;
8
- };
1
+ export {};
@@ -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
- currentValue.includes(item.value)
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
- ...checkboxGroupProps,
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
- ...datePickerProps,
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: color 0.3s, background 0.3s;
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;
@@ -1,4 +1 @@
1
- export let datePickerProps = {};
2
- export const setDefaultDatePickerProps = (props = {}) => {
3
- datePickerProps = props;
4
- };
1
+ export {};
@@ -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
- ...dialogProps,
108
+ ...EC_DEFAULT_PROPS.dialog,
109
109
  });
110
110
 
111
111
  const emit = defineEmits<{
@@ -16,5 +16,3 @@ export type ConfigurableDialogProps = {
16
16
  /** 点击确认按钮时是否自动关闭对话框 */
17
17
  closeOnConfirm?: boolean;
18
18
  };
19
- export declare let dialogProps: ConfigurableDialogProps;
20
- export declare const setDefaultDialogProps: (props?: ConfigurableDialogProps) => void;
@@ -1,4 +1 @@
1
- export let dialogProps = {};
2
- export const setDefaultDialogProps = (props = {}) => {
3
- dialogProps = props;
4
- };
1
+ export {};
@@ -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
- ...dropdownProps,
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
- Array.isArray(props.modelValue) &&
80
- props.modelValue.length > 1
81
- ? `+${props.modelValue.length}`
82
- : props.modelValue;
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,5 +6,3 @@ export type ConfigurableDropdownProps = {
6
6
  /** 展示值格式化函数 */
7
7
  formatter?: ((val: unknown) => string) | null;
8
8
  };
9
- export declare let dropdownProps: ConfigurableDropdownProps;
10
- export declare const setDefaultDropdownProps: (props?: ConfigurableDropdownProps) => void;
@@ -1,4 +1 @@
1
- export let dropdownProps = {};
2
- export const setDefaultDropdownProps = (props = {}) => {
3
- dropdownProps = props;
4
- };
1
+ export {};
@@ -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 { emptyProps } from './types';
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
- ...emptyProps,
75
+ ...EC_DEFAULT_PROPS.empty,
76
76
  });
77
77
  </script>
78
78
 
@@ -8,5 +8,3 @@ export type ConfigurableEmptyProps = {
8
8
  /** 加载中文本 */
9
9
  loadingText?: string;
10
10
  };
11
- export declare let emptyProps: ConfigurableEmptyProps;
12
- export declare const setDefaultEmptyProps: (props?: ConfigurableEmptyProps) => void;
@@ -1,9 +1 @@
1
- export let emptyProps = {
2
- image: '',
3
- text: '暂无数据',
4
- loadingImage: '',
5
- loadingText: '数据加载中',
6
- };
7
- export const setDefaultEmptyProps = (props = {}) => {
8
- emptyProps = props;
9
- };
1
+ export {};
@@ -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
- };
@@ -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 { flexProps } from './types';
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
- ...flexProps,
46
+ ...EC_DEFAULT_PROPS.flex,
47
47
  });
48
48
 
49
49
  const gapValue = computed(() => {
@@ -8,5 +8,3 @@ export type ConfigurableFlexProps = {
8
8
  /** 间距 */
9
9
  gap?: string | number | (() => (string | number)[]);
10
10
  };
11
- export declare let flexProps: ConfigurableFlexProps;
12
- export declare const setDefaultFlexProps: (props?: ConfigurableFlexProps) => void;
@@ -1,4 +1 @@
1
- export let flexProps = {};
2
- export const setDefaultFlexProps = (props = {}) => {
3
- flexProps = props;
4
- };
1
+ export {};
@@ -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
- };
@@ -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 { formProps } from './types';
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
- ...formProps,
31
+ ...EC_DEFAULT_PROPS.form,
32
32
  });
33
33
 
34
34
  provide(
@@ -2,5 +2,3 @@ export type ConfigurableFormProps = {
2
2
  /** 表单显示类型 */
3
3
  type?: 'line' | 'next' | 'block';
4
4
  };
5
- export declare let formProps: ConfigurableFormProps;
6
- export declare const setDefaultFormProps: (props?: ConfigurableFormProps) => void;
@@ -1,4 +1 @@
1
- export let formProps = {};
2
- export const setDefaultFormProps = (props = {}) => {
3
- formProps = props;
4
- };
1
+ export {};
@@ -2,9 +2,3 @@ export type ConfigurableFormProps = {
2
2
  /** 表单显示类型 */
3
3
  type?: 'line' | 'next' | 'block';
4
4
  };
5
-
6
- export let formProps: ConfigurableFormProps = {};
7
-
8
- export const setDefaultFormProps = (props: ConfigurableFormProps = {}) => {
9
- formProps = props;
10
- };
@@ -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 { formItemProps } from './types';
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
- ...formItemProps,
61
+ ...EC_DEFAULT_PROPS.formItem,
62
62
  });
63
63
 
64
64
  /** 表单是否只读 */
@@ -2,5 +2,3 @@ export type ConfigurableFormItemProps = {
2
2
  /** 表单显示类型 */
3
3
  type?: 'line' | 'next' | 'block';
4
4
  };
5
- export declare let formItemProps: ConfigurableFormItemProps;
6
- export declare const setDefaultFormItemProps: (props?: ConfigurableFormItemProps) => void;
@@ -1,4 +1 @@
1
- export let formItemProps = {};
2
- export const setDefaultFormItemProps = (props = {}) => {
3
- formItemProps = props;
4
- };
1
+ export {};
@@ -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
- };