@ecolovo/uniapp-components 1.0.10 → 2.0.1

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 (130) hide show
  1. package/README.md +202 -66
  2. package/components/aspect/aspect.vue +24 -15
  3. package/components/badge/badge.scss +20 -0
  4. package/components/badge/badge.vue +49 -40
  5. package/components/button/button.scss +15 -0
  6. package/components/button/button.vue +121 -177
  7. package/components/checkbox/checkbox.scss +10 -0
  8. package/components/checkbox/checkbox.vue +118 -146
  9. package/components/checkbox-group/checkbox-group.vue +79 -85
  10. package/components/checkbox-group2/checkbox-group2.vue +111 -107
  11. package/components/checkbox-group2/checkbox2.vue +104 -0
  12. package/components/data-list/data-list.scss +9 -0
  13. package/components/data-list/data-list.vue +70 -79
  14. package/components/date-picker/date-picker-view.vue +125 -124
  15. package/components/date-picker/date-picker.vue +145 -146
  16. package/components/dialog/dialog-content.vue +39 -47
  17. package/components/dialog/dialog.scss +11 -0
  18. package/components/dialog/dialog.vue +125 -138
  19. package/components/dropdown/dropdown.scss +11 -0
  20. package/components/dropdown/dropdown.vue +55 -97
  21. package/components/empty/empty.scss +14 -0
  22. package/components/empty/empty.vue +42 -41
  23. package/components/flex/flex.vue +45 -54
  24. package/components/form/form.vue +29 -24
  25. package/components/form-item/form-item.scss +11 -0
  26. package/components/form-item/form-item.vue +43 -40
  27. package/components/icon/icon.vue +70 -85
  28. package/components/image/image.vue +35 -38
  29. package/components/input/input.vue +65 -79
  30. package/components/input/password-input.vue +34 -42
  31. package/components/list-page/list-page.vue +73 -99
  32. package/components/load-more/load-more.scss +12 -0
  33. package/components/load-more/load-more.vue +29 -29
  34. package/components/loading/animations/loading-animation1.vue +8 -8
  35. package/components/loading/animations/loading-animation2.vue +8 -9
  36. package/components/loading/animations/loading-animation3.vue +11 -11
  37. package/components/loading/animations/loading-animation4.vue +8 -8
  38. package/components/loading/loading.vue +19 -20
  39. package/components/message-box/message-box.vue +59 -41
  40. package/components/number-dialog/number-dialog.scss +9 -0
  41. package/components/number-dialog/number-dialog.vue +209 -204
  42. package/components/number-input/number-input.scss +9 -0
  43. package/components/number-input/number-input.vue +233 -232
  44. package/components/numpad/numpad.scss +9 -0
  45. package/components/numpad/numpad.vue +133 -150
  46. package/components/page/page-body.scss +15 -0
  47. package/components/page/page-body.vue +137 -119
  48. package/components/page/page-footer.scss +13 -0
  49. package/components/page/page-footer.vue +31 -33
  50. package/components/page/page-header.scss +17 -0
  51. package/components/page/page-header.vue +89 -94
  52. package/components/page/page.scss +9 -0
  53. package/components/page/page.vue +105 -81
  54. package/components/picker/picker-popup.vue +218 -209
  55. package/components/picker/picker.vue +99 -104
  56. package/components/popover/popover-content.vue +54 -63
  57. package/components/popover/popover-mask.vue +63 -63
  58. package/components/popover/popover.scss +28 -0
  59. package/components/popover/popover.vue +49 -47
  60. package/components/popup/popup-content.vue +49 -53
  61. package/components/popup/popup.scss +11 -0
  62. package/components/popup/popup.vue +117 -132
  63. package/components/price/price.scss +20 -0
  64. package/components/price/price.vue +31 -42
  65. package/components/search/search.scss +12 -0
  66. package/components/search/search.vue +93 -117
  67. package/components/searching/searching.vue +33 -40
  68. package/components/selector/selector.vue +43 -48
  69. package/components/switch/switch.scss +12 -0
  70. package/components/switch/switch.vue +99 -96
  71. package/components/tab/tab.scss +19 -0
  72. package/components/tab/tab.vue +151 -145
  73. package/components/textarea/textarea.vue +104 -101
  74. package/composable/component-name.d.ts +2 -0
  75. package/composable/component-name.js +8 -0
  76. package/composable/component-name.ts +10 -0
  77. package/configs/index.d.ts +25 -10
  78. package/configs/index.js +14 -23
  79. package/configs/index.ts +82 -0
  80. package/easyCom.d.ts +9 -0
  81. package/easyCom.js +1 -2
  82. package/easyCom.ts +31 -0
  83. package/index.d.ts +1 -0
  84. package/index.js +1 -0
  85. package/index.ts +1 -0
  86. package/init.d.ts +4 -7
  87. package/init.js +5 -4
  88. package/init.ts +34 -0
  89. package/package.json +14 -4
  90. package/styles/utils/css-var.scss +12 -15
  91. package/styles/utils/ellipsis.scss +0 -7
  92. package/styles/utils/z-index.scss +1 -1
  93. package/styles/var/component.scss +21 -245
  94. package/utils/date.d.ts +47 -0
  95. package/utils/date.js +23 -43
  96. package/utils/date.ts +153 -0
  97. package/utils/freezeDeep.d.ts +1 -0
  98. package/utils/freezeDeep.js +4 -14
  99. package/utils/freezeDeep.ts +9 -0
  100. package/utils/price.d.ts +24 -0
  101. package/utils/price.js +14 -8
  102. package/utils/price.ts +57 -0
  103. package/utils/round.d.ts +2 -0
  104. package/utils/round.js +2 -14
  105. package/utils/round.ts +11 -0
  106. package/utils/windowInfo.d.ts +24 -0
  107. package/utils/windowInfo.js +8 -36
  108. package/utils/windowInfo.ts +50 -0
  109. package/components/checkbox-group2/checkbox.vue +0 -109
  110. package/components/datetime-picker/datetime-picker-view.vue +0 -209
  111. package/components/datetime-picker/datetime-picker.vue +0 -235
  112. package/components/form/mixin.js +0 -13
  113. package/components/list-page/list-page.js +0 -10
  114. package/components/table/table.vue +0 -112
  115. package/components/time-picker/time-picker-view.vue +0 -127
  116. package/components/time-picker/time-picker.vue +0 -140
  117. package/components/uploader/download.js +0 -81
  118. package/components/uploader/file-uploader.vue +0 -52
  119. package/components/uploader/files.js +0 -225
  120. package/components/uploader/media-uploader.vue +0 -189
  121. package/components/uploader/mixin.js +0 -171
  122. package/components/uploader/uni.js +0 -38
  123. package/components/uploader/upload-button.vue +0 -29
  124. package/components/uploader/uploader copy.vue +0 -547
  125. package/components/uploader/uploader.vue +0 -117
  126. package/mixins/componentName.js +0 -32
  127. package/mixins/listPage.js +0 -1
  128. package/mixins/windowInfo.js +0 -1
  129. package/utils/fileSize.js +0 -39
  130. package/utils/floor.js +0 -20
@@ -1,68 +1,59 @@
1
1
  <template>
2
- <view :class="componentClassNames" :style="styleStr">
2
+ <view :class="[...classNames, $style['Flex']]" :style="flexStyle">
3
3
  <slot></slot>
4
4
  </view>
5
5
  </template>
6
6
 
7
- <script>
8
- import componentName from '../../mixins/componentName';
7
+ <script lang="ts" setup>
8
+ import { computed } from 'vue';
9
+ import useClassNames from '../../composable/component-name';
9
10
 
10
- export default {
11
- name: 'Flex',
11
+ defineOptions({
12
12
  options: {
13
13
  virtualHost: true,
14
14
  styleIsolation: 'shared',
15
15
  },
16
- mixins: [componentName],
17
- props: {
18
- /** 排版方向 */
19
- direction: {
20
- type: String,
21
- Validator: (value) => ['row', 'row-reverse', 'column', 'column-reverse'].includes(value),
22
- default: 'row',
23
- },
24
- /** 当前轴对齐方式 */
25
- justify: {
26
- type: String,
27
- Validator: (value) =>
28
- ['start', 'center', 'end', 'space-between', 'space-around', 'space-evenly'].includes(value),
29
- default: 'start',
30
- },
31
- /** 交叉轴对齐方式 */
32
- align: {
33
- type: String,
34
- Validator: (value) => ['start', 'center', 'end', 'baseline', 'stretch'].includes(value),
35
- default: 'center',
36
- },
37
- /** 是否换行 */
38
- wrap: {
39
- type: Boolean,
40
- default: false,
41
- },
42
- /** 间距 */
43
- gap: {
44
- type: [String, Number, Array],
45
- default: '0px',
46
- },
47
- },
48
- computed: {
49
- gapValue() {
50
- if (Array.isArray(this.gap)) {
51
- return this.gap.map((item) => (typeof item === 'number' ? uni.upx2px(item) + 'px' : item)).join(' ');
52
- }
53
- return typeof this.gap === 'number' ? uni.upx2px(this.gap) + 'px' : this.gap;
54
- },
55
- styleStr() {
56
- return [
57
- `flex-direction: ${this.direction};`,
58
- `justify-content: ${this.justify};`,
59
- `align-items: ${this.align};`,
60
- `flex-wrap: ${this.wrap ? 'wrap' : 'nowrap'};`,
61
- `gap: ${this.gapValue};`,
62
- ].join(' ');
63
- },
64
- },
16
+ });
17
+
18
+ const classNames = useClassNames('flex');
19
+
20
+ type _Props = {
21
+ /** 排版方向 */
22
+ direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
23
+ /** 当前轴对齐方式 */
24
+ justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
25
+ /** 交叉轴对齐方式 */
26
+ align?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
27
+ /** 是否换行 */
28
+ wrap?: boolean;
29
+ /** 间距 */
30
+ gap?: string | number | (string | number)[];
65
31
  };
32
+
33
+ const props = withDefaults(defineProps<_Props>(), {
34
+ direction: 'row',
35
+ justify: 'start',
36
+ align: 'center',
37
+ wrap: false,
38
+ gap: '0px',
39
+ });
40
+
41
+ const gapValue = computed(() => {
42
+ if (Array.isArray(props.gap)) {
43
+ return props.gap.map((item) => (typeof item === 'number' ? uni.upx2px(item) + 'px' : item)).join(' ');
44
+ }
45
+ return typeof props.gap === 'number' ? uni.upx2px(props.gap) + 'px' : props.gap;
46
+ });
47
+
48
+ const flexStyle = computed(() => {
49
+ return [
50
+ `flex-direction: ${props.direction};`,
51
+ `justify-content: ${props.justify};`,
52
+ `align-items: ${props.align};`,
53
+ `flex-wrap: ${props.wrap ? 'wrap' : 'nowrap'};`,
54
+ `gap: ${gapValue.value};`,
55
+ ].join('');
56
+ });
66
57
  </script>
67
58
 
68
59
  <style lang="scss" module>
@@ -1,35 +1,40 @@
1
1
  <template>
2
- <view :class="componentClassNames">
2
+ <view :class="[...classNames]">
3
3
  <slot></slot>
4
4
  </view>
5
5
  </template>
6
6
 
7
- <script>
8
- import componentName from '../../mixins/componentName';
7
+ <script lang="ts" setup>
8
+ import { computed, provide } from 'vue';
9
+ import useClassNames from '../../composable/component-name';
9
10
 
10
- export default {
11
- name: 'Form',
11
+ defineOptions({
12
12
  options: {
13
- virtualHost: true,
14
13
  styleIsolation: 'shared',
14
+ virtualHost: true,
15
15
  },
16
- mixins: [componentName],
17
- provide() {
18
- return {
19
- formProps: this.$props,
20
- };
21
- },
22
- props: {
23
- readonly: {
24
- type: Boolean,
25
- default: false,
26
- },
27
- /** 显示类型 */
28
- type: {
29
- type: String,
30
- validator: (val) => !val || ['line', 'next', 'block'].includes(val),
31
- default: 'line',
32
- },
33
- },
16
+ });
17
+
18
+ const classNames = useClassNames('form');
19
+
20
+ type _Props = {
21
+ /** 是否只读 */
22
+ readonly?: boolean;
23
+ /** 表单显示类型 */
24
+ type?: 'line' | 'next' | 'block';
34
25
  };
26
+
27
+ const props = withDefaults(defineProps<_Props>(), {
28
+ readonly: false,
29
+ type: 'line',
30
+ });
31
+
32
+ provide(
33
+ 'ecolovo/form/readonly',
34
+ computed(() => props.readonly)
35
+ );
36
+ provide(
37
+ 'ecolovo/form/type',
38
+ computed(() => props.type)
39
+ );
35
40
  </script>
@@ -0,0 +1,11 @@
1
+ @use 'sass:map';
2
+
3
+ // 可配置的变量
4
+ $form-item: () !default;
5
+ $form-item-default: (
6
+ // label 宽度
7
+ label-width: 6em,
8
+ // 高度
9
+ height: 80rpx
10
+ );
11
+ $form-item: map.merge($form-item-default, $form-item);
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <view
3
3
  :class="[
4
- componentClassNames,
4
+ ...classNames,
5
+ $style['FormItem'],
5
6
  {
6
7
  [$style['FormItem--line']]: usingType === 'line',
7
8
  [$style['FormItem--next']]: usingType === 'next',
@@ -19,56 +20,58 @@
19
20
  </view>
20
21
  </template>
21
22
 
22
- <script>
23
- import componentName from '../../mixins/componentName';
24
- import { isFormReadonly } from '../form/mixin';
23
+ <script lang="ts" setup>
24
+ import { computed, ComputedRef, inject } from 'vue';
25
+ import useClassNames from '../../composable/component-name';
25
26
 
26
- export default {
27
- name: 'FormItem',
27
+ defineOptions({
28
28
  options: {
29
29
  virtualHost: true,
30
30
  styleIsolation: 'shared',
31
31
  },
32
- mixins: [componentName, isFormReadonly],
33
- props: {
34
- /** 标签文本 */
35
- label: {
36
- type: String,
37
- default: '',
38
- },
39
- /** 副标签文本 */
40
- subLabel: {
41
- type: String,
42
- default: '',
43
- },
44
- /** 是否必填 */
45
- required: {
46
- type: Boolean,
47
- default: false,
48
- },
49
- /** 显示类型 */
50
- type: {
51
- type: String,
52
- validator: (val) => !val || ['line', 'next', 'block'].includes(val),
53
- default: '',
54
- },
55
- },
56
- computed: {
57
- usingType() {
58
- return this.type || this.formProps.type || 'line';
59
- },
60
- },
32
+ });
33
+
34
+ const classNames = useClassNames('form-item');
35
+
36
+ type _Props = {
37
+ /** 标签文本 */
38
+ label?: string;
39
+ /** 副标签文本 */
40
+ subLabel?: string;
41
+ /** 是否必填 */
42
+ required?: boolean;
43
+ /** 显示类型 */
44
+ type?: 'line' | 'next' | 'block';
61
45
  };
46
+
47
+ const props = withDefaults(defineProps<_Props>(), {
48
+ label: '',
49
+ subLabel: '',
50
+ required: false,
51
+ type: undefined,
52
+ });
53
+
54
+ /** 表单是否只读 */
55
+ const isFormReadonly = inject<ComputedRef<boolean>>(
56
+ 'ecolovo/form/readonly',
57
+ computed(() => false)
58
+ );
59
+ /** 表单显示类型 */
60
+ const formType = inject<ComputedRef<'line' | 'next' | 'block'>>(
61
+ 'ecolovo/form/type',
62
+ computed<'line' | 'next' | 'block'>(() => 'line')
63
+ );
64
+
65
+ /** 显示类型 */
66
+ const usingType = computed(() => props.type || formType.value);
62
67
  </script>
63
68
 
64
69
  <style lang="scss" module>
65
- @use '../../styles/index' as *;
70
+ @use '../../styles/utils' as *;
71
+ @use './form-item' as *;
66
72
 
67
- // 定义外部变量
68
- $component-name: 'form-item';
69
- $component-vars: $form-item;
70
73
  %external-vars {
71
- @include UTILS__DEFINE_COMPONENT_VARS();
74
+ @include UTILS__DEFINE_COMPONENT_VARS($form-item, 'form-item');
72
75
  }
73
76
 
74
77
  .FormItem {
@@ -1,108 +1,93 @@
1
1
  <template>
2
2
  <text
3
- :class="[componentClassNames, iconClass, loadingAnimation, { [$style['Icon--expand-tap-size']]: tapSize }]"
4
- :style="styleStr"
5
- @click="$emit('click')"
6
- >
7
- </text>
3
+ :class="[
4
+ ...classNames,
5
+ ...iconClass,
6
+ $style['Icon'],
7
+ {
8
+ [$style['Icon--spinning']]: spinning,
9
+ },
10
+ ]"
11
+ ></text>
8
12
  </template>
9
13
 
10
- <script>
11
- import componentName from '../../mixins/componentName';
14
+ <script lang="ts" setup>
15
+ import { computed } from 'vue';
16
+ import useClassNames from '../../composable/component-name';
12
17
  import { iconMap } from '../../configs';
13
18
 
14
- const iconListStr = iconMap.keys().toArray().sort().join('\n');
15
-
16
- export default {
17
- name: 'Icon',
19
+ defineOptions({
18
20
  options: {
19
- virtualHost: true,
20
21
  styleIsolation: 'shared',
22
+ virtualHost: true,
21
23
  },
22
- mixins: [componentName],
23
- props: {
24
- /** 图标名 */
25
- icon: {
26
- type: String,
27
- default: '',
28
- },
29
- /** 点击范围 */
30
- tapSize: {
31
- type: String,
32
- default: '',
33
- },
34
- },
35
- computed: {
36
- iconClass() {
37
- const iconInfo = iconMap.get(this.icon);
38
- if (!iconInfo) {
39
- /* eslint-disable no-console */
40
- console.error(`${this.componentClass} Error: 找不到图标 "${this.icon}"`);
41
- if (process.env.NODE_ENV === 'development') {
42
- console.groupCollapsed(`%c查看解决方法`, 'color: orange');
43
- console.warn(
44
- [
45
- '请检查是否在 `main.js` 文件中调用了组件库的 `init` 方法,并传入了图标文件的 json 文件',
46
- '例:',
47
- '```',
48
- '// main.js',
49
- "import init from '@ecolovo/uniapp-components/init';",
50
- "init({ iconfont: require('@/resources/iconfont/some_icon/iconfont.json') });",
51
- '\n// App.vue -> <style>',
52
- "@import '@/resources/iconfont/iconfont.css';",
53
- '```',
54
- `\n当前可用图标: `,
55
- iconListStr,
56
- ].join('\n')
57
- );
58
- console.groupEnd();
59
- }
60
- /* eslint-enable no-console */
61
- return [];
62
- }
63
- return [iconInfo.fontFamily, iconInfo.prefix + iconInfo.name];
64
- },
65
- loadingAnimation() {
66
- return /(?<![a-zA-Z])loading(?![a-zA-Z])/.test(this.icon) ? this.$style['Icon--spinner'] : '';
67
- },
68
- styleStr() {
69
- return `--tap-size: ${this.tapSize || '100%'};`;
70
- },
71
- },
24
+ });
25
+
26
+ const classNames = useClassNames('icon');
27
+
28
+ type _Props = {
29
+ /** 图标名 */
30
+ icon: string;
31
+ /** 旋转动画 */
32
+ spinning?: boolean;
72
33
  };
34
+
35
+ const props = withDefaults(defineProps<_Props>(), {
36
+ spinning: false,
37
+ });
38
+
39
+ const iconEntry = computed(() => {
40
+ /* eslint-disable no-console */
41
+ if (!props.icon) console.error('icon 不能为空');
42
+
43
+ const icon = iconMap.get(props.icon);
44
+
45
+ if (!icon) {
46
+ console.error(`${classNames[0]}: 找不到图标 "${props.icon}"`);
47
+ if (import.meta.env.DEV) {
48
+ console.groupCollapsed(`%c查看解决方法`, 'color: orange');
49
+ console.warn(
50
+ [
51
+ '请检查是否在 `main.ts` 文件中调用了组件库的 `init` 方法,并传入了图标文件的 json 文件',
52
+ '例:',
53
+ '```',
54
+ '// main.js',
55
+ "import { init } from '@ecolovo/uniapp-components';",
56
+ "import iconJson from '@/resources/iconfont/some_icon/iconfont.json';",
57
+ 'init({ iconfont: iconJson });',
58
+ '\n// App.vue -> <style>',
59
+ "@import '@/resources/iconfont/iconfont.css';",
60
+ '```',
61
+ `\n当前可用的图标列表: `,
62
+ [...iconMap.keys()].join('\n'),
63
+ ].join('\n')
64
+ );
65
+ console.groupEnd();
66
+ }
67
+ }
68
+
69
+ return icon;
70
+ /* eslint-enable no-console */
71
+ });
72
+
73
+ const iconClass = computed(() =>
74
+ iconEntry.value ? [iconEntry.value.fontFamily, iconEntry.value.prefix + iconEntry.value.name] : []
75
+ );
73
76
  </script>
74
77
 
75
78
  <style lang="scss">
76
79
  @import '../../resources/iconfont/uniapp_ui_icon/iconfont.css';
77
-
78
- .uniapp_ui_icon {
79
- font-size: inherit;
80
- line-height: inherit;
81
- }
82
80
  </style>
83
-
84
81
  <style lang="scss" module>
85
82
  .Icon {
86
- display: inline-block;
87
83
  font-size: inherit;
88
- color: inherit;
89
- }
90
- .Icon--expand-tap-size {
91
- position: relative;
92
- &::after {
93
- content: '';
94
- position: absolute;
95
- top: 50%;
96
- left: 50%;
97
- width: var(--tap-size, 100%);
98
- height: var(--tap-size, 100%);
99
- transform: translate(-50%, -50%);
100
- }
84
+ line-height: inherit;
101
85
  }
102
- .Icon--spinner {
103
- animation: circle var(--animation-duration, 0.75s) linear infinite;
86
+ .Icon--spinning {
87
+ display: inline-block;
88
+ animation: Icon--circle var(--animation-duration, 0.75s) linear infinite;
104
89
 
105
- @keyframes circle {
90
+ @keyframes Icon--circle {
106
91
  0% {
107
92
  rotate: 0deg;
108
93
  }
@@ -2,54 +2,51 @@
2
2
  <image
3
3
  :src="src || ''"
4
4
  :preview-list="previewList"
5
- :class="componentClassNames"
5
+ :class="[...classNames, $style['Image']]"
6
6
  :mode="mode"
7
7
  @click="preview"
8
8
  ></image>
9
9
  </template>
10
10
 
11
- <script>
12
- import componentName from '../../mixins/componentName';
11
+ <script lang="ts" setup>
12
+ import useClassNames from '../../composable/component-name';
13
13
 
14
- export default {
15
- name: 'Image',
14
+ defineOptions({
16
15
  options: {
17
16
  virtualHost: true,
18
17
  styleIsolation: 'shared',
19
18
  },
20
- mixins: [componentName],
21
- props: {
22
- /** 图片地址 */
23
- src: {
24
- type: String,
25
- default: '',
26
- },
27
- /** 图片显示模式 */
28
- mode: {
29
- type: String,
30
- default: '',
31
- },
32
- /** 预览列表 */
33
- previewList: {
34
- type: Array,
35
- default: () => [],
36
- },
37
- },
38
- methods: {
39
- preview() {
40
- if (this.previewList.length > 0) {
41
- uni.previewImage({
42
- current: this.src,
43
- urls: this.previewList,
44
- });
45
- return;
46
- }
47
- uni.previewImage({
48
- current: this.src,
49
- urls: [this.src],
50
- });
51
- },
52
- },
19
+ });
20
+
21
+ const classNames = useClassNames('image');
22
+
23
+ type _Props = {
24
+ /** 图片地址 */
25
+ src?: string;
26
+ /** 图片显示模式 */
27
+ mode?: string;
28
+ /** 预览列表 */
29
+ previewList?: string[];
30
+ };
31
+
32
+ const props = withDefaults(defineProps<_Props>(), {
33
+ src: '',
34
+ mode: '',
35
+ previewList: () => [],
36
+ });
37
+
38
+ const preview = () => {
39
+ if (props.previewList.length > 0) {
40
+ uni.previewImage({
41
+ current: props.src,
42
+ urls: props.previewList,
43
+ });
44
+ return;
45
+ }
46
+ uni.previewImage({
47
+ current: props.src,
48
+ urls: [props.src],
49
+ });
53
50
  };
54
51
  </script>
55
52