@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
@@ -13,10 +13,68 @@
13
13
  </text>
14
14
  </template>
15
15
 
16
+ <script lang="ts">
17
+ import defaultIconFonts from '../../resources/iconfont/uniapp_ui_icon/iconfont.json';
18
+ import { EC_USE_INNER_ICON, EC_ICON_FONT } from '../../configs/index';
19
+
20
+ /** Icon */
21
+ interface IconInfo {
22
+ /** 字体文件名 */
23
+ fontFamily: string;
24
+ /** 图标前缀 */
25
+ prefix: string;
26
+ /** 图标名称 */
27
+ name: string;
28
+ }
29
+
30
+ /** iconfont 图标 map */
31
+ const iconMap: Map<string, IconInfo> = new Map();
32
+
33
+ /**
34
+ * 添加单个图标
35
+ *
36
+ * @param fontFamily 字体文件名
37
+ * @param prefix 图标前缀
38
+ * @param name 图标名称
39
+ */
40
+ function addIconToMap(fontFamily: string, prefix: string, name: string) {
41
+ if (iconMap.has(name)) {
42
+ // eslint-disable-next-line no-console
43
+ console.warn(
44
+ `图标库 "${fontFamily}" 中的图标 "${name}" 在图标库 "${
45
+ iconMap.get(name)!.fontFamily
46
+ }" 中已存在,新的图标将会覆盖已存在的同名图标`
47
+ );
48
+ }
49
+ iconMap.set(name, {
50
+ fontFamily,
51
+ prefix,
52
+ name,
53
+ });
54
+ }
55
+
56
+ /**
57
+ * 添加一组图标,传入 iconfont.json 文件内容
58
+ *
59
+ * @param iconJson iconfont.json 文件内容
60
+ */
61
+ function addIcons(iconJson: IconFontJson) {
62
+ const fontFamily = iconJson.font_family;
63
+ const prefix = iconJson.css_prefix_text;
64
+ const glyphs = iconJson.glyphs;
65
+ glyphs.forEach((glyph) => {
66
+ addIconToMap(fontFamily, prefix, glyph.font_class);
67
+ });
68
+ }
69
+
70
+ // 添加内部图标库
71
+ if (EC_USE_INNER_ICON) addIcons(defaultIconFonts);
72
+ // 添加额外 IconFont
73
+ EC_ICON_FONT.forEach(addIcons);
74
+ </script>
16
75
  <script lang="ts" setup>
17
76
  import { computed } from 'vue';
18
77
  import useClassNames from '../../composable/component-name';
19
- import { iconMap } from '../../configs';
20
78
 
21
79
  defineOptions({
22
80
  options: {
@@ -86,7 +144,7 @@ const iconClass = computed(() =>
86
144
  ? [
87
145
  iconEntry.value.fontFamily,
88
146
  iconEntry.value.prefix + iconEntry.value.name,
89
- ]
147
+ ]
90
148
  : []
91
149
  );
92
150
  </script>
@@ -13,7 +13,8 @@
13
13
  <script lang="ts" setup>
14
14
  import { computed } from 'vue';
15
15
  import useClassNames from '../../composable/component-name';
16
- import { imageProps, type ImageProps } from './types';
16
+ import { EC_DEFAULT_PROPS } from '../../configs';
17
+ import { type ImageProps } from './types';
17
18
 
18
19
  defineOptions({
19
20
  options: {
@@ -39,7 +40,7 @@ const props = withDefaults(defineProps<_Props>(), {
39
40
  lazyLoad: false,
40
41
  preview: false,
41
42
  previewIndex: undefined,
42
- ...imageProps,
43
+ ...EC_DEFAULT_PROPS.image,
43
44
  });
44
45
 
45
46
  const emit = defineEmits<{
@@ -14,5 +14,3 @@ export type ConfigurableImageProps = {
14
14
  /** 图片显示模式 */
15
15
  mode?: UniApp.ImageMode;
16
16
  };
17
- export declare let imageProps: ConfigurableImageProps;
18
- export declare const setDefaultImageProps: (props?: ConfigurableImageProps) => void;
@@ -1,4 +1 @@
1
- export let imageProps = {};
2
- export const setDefaultImageProps = (props = {}) => {
3
- imageProps = props;
4
- };
1
+ export {};
@@ -15,9 +15,3 @@ export type ConfigurableImageProps = {
15
15
  /** 图片显示模式 */
16
16
  mode?: UniApp.ImageMode;
17
17
  };
18
-
19
- export let imageProps: ConfigurableImageProps = {};
20
-
21
- export const setDefaultImageProps = (props: ConfigurableImageProps = {}) => {
22
- imageProps = props;
23
- };
@@ -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
- ...inputProps,
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
- ...passwordInputProps,
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;
@@ -1,8 +1 @@
1
- export let inputProps = {};
2
- export const setDefaultInputProps = (props = {}) => {
3
- inputProps = props;
4
- };
5
- export let passwordInputProps = {};
6
- export const setDefaultPasswordInputProps = (props = {}) => {
7
- passwordInputProps = props;
8
- };
1
+ export {};
@@ -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
- ...listPageProps,
85
+ ...EC_DEFAULT_PROPS.listPage,
86
86
  });
87
87
 
88
88
  const emit = defineEmits<{
@@ -2,5 +2,3 @@ export type ConfigurableListPageProps = {
2
2
  /** 页面头部样式,主要用于控制导航栏字体颜色 */
3
3
  theme?: 'light' | 'dark';
4
4
  };
5
- export declare let listPageProps: ConfigurableListPageProps;
6
- export declare const setDefaultListPageProps: (props?: ConfigurableListPageProps) => void;
@@ -1,4 +1 @@
1
- export let listPageProps = {};
2
- export const setDefaultListPageProps = (props = {}) => {
3
- listPageProps = props;
4
- };
1
+ export {};
@@ -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
- ...loadMoreProps,
60
+ ...EC_DEFAULT_PROPS.loadMore,
61
61
  });
62
62
 
63
63
  const emit = defineEmits<{
@@ -2,5 +2,3 @@ export type ConfigurableLoadMoreProps = {
2
2
  /** 到最后一页时文本 */
3
3
  endTitle?: string;
4
4
  };
5
- export declare let loadMoreProps: ConfigurableLoadMoreProps;
6
- export declare const setDefaultLoadMoreProps: (props?: ConfigurableLoadMoreProps) => void;
@@ -1,4 +1 @@
1
- export let loadMoreProps = {};
2
- export const setDefaultLoadMoreProps = (props = {}) => {
3
- loadMoreProps = props;
4
- };
1
+ export {};
@@ -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
- };
@@ -43,27 +43,37 @@ const classNames = useClassNames('loading-animation3');
43
43
  width: $main-size;
44
44
  aspect-ratio: 1;
45
45
  border-radius: 50%;
46
- box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s,
46
+ box-shadow:
47
+ $left-x $translate-y 0 $size-s,
48
+ 0 $translate-y 0 $size-s,
47
49
  $right-x $translate-y 0 $size-s;
48
50
  translate: 0 (-1 * $translate-y);
49
51
  animation: LoadingAnimation3--loading-dots 1.5s infinite linear;
50
52
 
51
53
  @keyframes LoadingAnimation3--loading-dots {
52
54
  15% {
53
- box-shadow: $left-x $translate-y 0 $size-l,
54
- 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
55
+ box-shadow:
56
+ $left-x $translate-y 0 $size-l,
57
+ 0 $translate-y 0 $size-s,
58
+ $right-x $translate-y 0 $size-s;
55
59
  }
56
60
  30% {
57
- box-shadow: $left-x $translate-y 0 $size-s,
58
- 0 $translate-y 0 $size-l, $right-x $translate-y 0 $size-s;
61
+ box-shadow:
62
+ $left-x $translate-y 0 $size-s,
63
+ 0 $translate-y 0 $size-l,
64
+ $right-x $translate-y 0 $size-s;
59
65
  }
60
66
  45% {
61
- box-shadow: $left-x $translate-y 0 $size-s,
62
- 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-l;
67
+ box-shadow:
68
+ $left-x $translate-y 0 $size-s,
69
+ 0 $translate-y 0 $size-s,
70
+ $right-x $translate-y 0 $size-l;
63
71
  }
64
72
  60% {
65
- box-shadow: $left-x $translate-y 0 $size-s,
66
- 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
73
+ box-shadow:
74
+ $left-x $translate-y 0 $size-s,
75
+ 0 $translate-y 0 $size-s,
76
+ $right-x $translate-y 0 $size-s;
67
77
  }
68
78
  }
69
79
 
@@ -30,7 +30,8 @@ const classNames = useClassNames('loading-animation4');
30
30
  aspect-ratio: 1;
31
31
  border-radius: 50%;
32
32
  border: 0.1em solid currentcolor;
33
- animation: spinner-1 0.8s infinite linear alternate,
33
+ animation:
34
+ spinner-1 0.8s infinite linear alternate,
34
35
  spinner-2 1.6s infinite linear;
35
36
 
36
37
  @keyframes spinner-1 {
@@ -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
- ...loadingProps,
39
+ ...EC_DEFAULT_PROPS.loading,
40
40
  });
41
41
  </script>
42
42
 
@@ -2,5 +2,3 @@ export type ConfigurableLoadingProps = {
2
2
  /** 加载文本 */
3
3
  title?: string;
4
4
  };
5
- export declare let loadingProps: ConfigurableLoadingProps;
6
- export declare const setDefaultLoadingProps: (props?: ConfigurableLoadingProps) => void;
@@ -1,4 +1 @@
1
- export let loadingProps = {};
2
- export const setDefaultLoadingProps = (props = {}) => {
3
- loadingProps = props;
4
- };
1
+ export {};
@@ -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
- ...messageBoxProps,
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;
@@ -1,4 +1 @@
1
- export let messageBoxProps = {};
2
- export const setDefaultMessageBoxProps = (props = {}) => {
3
- messageBoxProps = props;
4
- };
1
+ export {};
@@ -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 { numberDialogProps } from './types';
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
- ...numberDialogProps,
153
+ ...EC_DEFAULT_PROPS.numberDialog,
154
154
  });
155
155
 
156
156
  const emit = defineEmits<{
@@ -14,5 +14,3 @@ export type ConfigurableNumberDialogProps = {
14
14
  /** 最小值 */
15
15
  min?: number;
16
16
  };
17
- export declare let numberDialogProps: ConfigurableNumberDialogProps;
18
- export declare const setDefaultNumberDialogProps: (props?: ConfigurableNumberDialogProps) => void;
@@ -1,4 +1 @@
1
- export let numberDialogProps = {};
2
- export const setDefaultNumberDialogProps = (props = {}) => {
3
- numberDialogProps = props;
4
- };
1
+ export {};
@@ -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
- ...numberInputProps,
135
+ ...EC_DEFAULT_PROPS.numberInput,
136
136
  });
137
137
 
138
138
  const emit = defineEmits<{
@@ -295,8 +295,8 @@ const handleInput = (e: InputEvent) => {
295
295
  const integerVal = integer
296
296
  ? Number(integer) || '0'
297
297
  : decimal
298
- ? '0'
299
- : '';
298
+ ? '0'
299
+ : '';
300
300
  value = signVal + integerVal + decimal;
301
301
 
302
302
  _lastEditValue = value;
@@ -16,5 +16,3 @@ export type ConfigurableNumberInputProps = {
16
16
  /** 最小值 */
17
17
  min?: number;
18
18
  };
19
- export declare let numberInputProps: ConfigurableNumberInputProps;
20
- export declare const setDefaultNumberInputProps: (props?: ConfigurableNumberInputProps) => void;
@@ -1,4 +1 @@
1
- export let numberInputProps = {};
2
- export const setDefaultNumberInputProps = (props = {}) => {
3
- numberInputProps = props;
4
- };
1
+ export {};
@@ -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
- ...numpadProps,
79
+ ...EC_DEFAULT_PROPS.numpad,
80
80
  });
81
81
 
82
82
  const emit = defineEmits<{
@@ -6,5 +6,3 @@ export type ConfigurableNumpadProps = {
6
6
  /** 允许输入的最小值 */
7
7
  min?: number;
8
8
  };
9
- export declare let numpadProps: ConfigurableNumpadProps;
10
- export declare const setDefaultNumpadProps: (props?: ConfigurableNumpadProps) => void;
@@ -1,4 +1 @@
1
- export let numpadProps = {};
2
- export const setDefaultNumpadProps = (props = {}) => {
3
- numpadProps = props;
4
- };
1
+ export {};
@@ -6,9 +6,3 @@ export type ConfigurableNumpadProps = {
6
6
  /** 允许输入的最小值 */
7
7
  min?: number;
8
8
  };
9
-
10
- export let numpadProps: ConfigurableNumpadProps = {};
11
-
12
- export const setDefaultNumpadProps = (props: ConfigurableNumpadProps = {}) => {
13
- numpadProps = props;
14
- };
@@ -261,7 +261,8 @@ defineExpose({
261
261
  @extend %external-vars;
262
262
 
263
263
  --header-placeholder-height: calc(
264
- var(--page-header-bottom) + #{UTILS__VAR(page-header, extra-height, 0px)}
264
+ var(--page-header-bottom) +
265
+ #{UTILS__VAR(page-header, extra-height, 0px)}
265
266
  );
266
267
  --footer-placeholder-height: calc(
267
268
  var(--safe-area-bottom) + #{UTILS__VAR(page-footer, height, 100rpx)}
@@ -311,7 +312,8 @@ defineExpose({
311
312
  flex-direction: column;
312
313
  .PageBody--scroll-body & {
313
314
  padding-bottom: calc(
314
- #{UTILS__LOCAL_VAR(padding-bottom, UTILS__LOCAL_VAR(padding))} + var(--bottom-safe-height)
315
+ #{UTILS__LOCAL_VAR(padding-bottom, UTILS__LOCAL_VAR(padding))} +
316
+ var(--bottom-safe-height)
315
317
  );
316
318
  }
317
319
  }