sard 1.0.29 → 1.2.0
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/README.md +1 -2
- package/all-components.js +4 -0
- package/components/action-sheet/action-sheet-item.vue.js +1 -1
- package/components/action-sheet/common.d.ts +1 -1
- package/components/button/button.vue.js +1 -1
- package/components/calendar-popout/common.d.ts +1 -1
- package/components/cascader-popout/common.d.ts +1 -1
- package/components/checkbox-popout/common.d.ts +1 -1
- package/components/color-picker-popout/common.d.ts +1 -1
- package/components/crop-image/common.d.ts +1 -1
- package/components/danmaku/common.d.ts +38 -0
- package/components/danmaku/common.js +14 -0
- package/components/danmaku/danmaku.vue.d.ts +23 -0
- package/components/danmaku/danmaku.vue.js +370 -0
- package/components/danmaku/index.css +1 -0
- package/components/danmaku/index.d.ts +5 -0
- package/components/danmaku/index.js +6 -0
- package/components/datetime-picker-popout/common.d.ts +1 -1
- package/components/datetime-range-picker-popout/common.d.ts +1 -1
- package/components/descriptions/common.d.ts +8 -3
- package/components/descriptions/descriptions-item.vue.d.ts +0 -2
- package/components/descriptions/descriptions-item.vue.js +20 -21
- package/components/descriptions/descriptions.vue.js +56 -28
- package/components/descriptions/index.css +1 -1
- package/components/dialog/common.d.ts +1 -1
- package/components/dnd/dnd-item.vue.js +19 -9
- package/components/dnd/index.css +1 -1
- package/components/dropdown/common.d.ts +1 -1
- package/components/ellipsis/ellipsis.vue.js +62 -58
- package/components/ellipsis/index.css +1 -1
- package/components/image/image.vue.d.ts +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +3 -1
- package/components/keyboard/keyboard.vue.d.ts +1 -1
- package/components/keyboard-popout/common.d.ts +1 -1
- package/components/keyboard-popout/keyboard-popout.vue.d.ts +1 -1
- package/components/list/index.css +1 -1
- package/components/load-more/load-more.vue.js +2 -2
- package/components/loading/loading.vue.js +1 -1
- package/components/motion/motion.vue.js +1 -1
- package/components/notify/common.d.ts +1 -1
- package/components/overlay/overlay.vue.js +6 -5
- package/components/picker/picker.vue.js +8 -5
- package/components/picker-popout/common.d.ts +1 -1
- package/components/picker-view/common.d.ts +22 -2
- package/components/picker-view/index.d.ts +2 -2
- package/components/picker-view/index.js +2 -2
- package/components/picker-view/picker-view-column.vue.d.ts +19 -0
- package/components/picker-view/picker-view-column.vue.js +167 -0
- package/components/picker-view/picker-view.vue.d.ts +55 -0
- package/components/picker-view/picker-view.vue.js +60 -0
- package/components/popout/common.d.ts +1 -1
- package/components/popout/popout.vue.js +2 -4
- package/components/popover/common.js +1 -1
- package/components/popover/popover.vue.js +11 -10
- package/components/popup/popup.vue.js +1 -1
- package/components/preview-image/common.d.ts +1 -1
- package/components/preview-image/preview-image.vue.d.ts +1 -1
- package/components/preview-image/preview-image.vue.js +4 -4
- package/components/pull-down-refresh/pull-down-refresh.vue.js +4 -7
- package/components/radio-popout/common.d.ts +1 -1
- package/components/rate/rate.vue.js +2 -2
- package/components/select-popout/common.d.ts +1 -1
- package/components/share-sheet/common.d.ts +1 -1
- package/components/skeleton/skeleton.vue.js +1 -1
- package/components/swiper/index.d.ts +2 -2
- package/components/swiper/index.js +2 -2
- package/components/swiper/swiper-item.vue.d.ts +11 -0
- package/components/swiper/swiper-item.vue.js +32 -0
- package/components/swiper/swiper.vue.d.ts +147 -0
- package/components/swiper/swiper.vue.js +51 -0
- package/components/swiper/useSwiper.d.ts +1 -2
- package/components/swiper/useSwiper.js +12 -12
- package/components/table/table.vue.js +1 -2
- package/components/text-shrink/common.d.ts +28 -0
- package/components/text-shrink/common.js +8 -0
- package/components/text-shrink/index.css +1 -0
- package/components/text-shrink/index.d.ts +5 -0
- package/components/text-shrink/index.js +6 -0
- package/components/text-shrink/text-shrink.vue.d.ts +16 -0
- package/components/text-shrink/text-shrink.vue.js +252 -0
- package/components/toast/common.d.ts +1 -1
- package/global.d.ts +2 -0
- package/index.css +1 -1
- package/index.js +3 -2
- package/package.json +1 -1
- package/utils/createImperativeComponent.d.ts +12 -5
- package/utils/createImperativeComponent.js +13 -37
- package/utils/imperative/agent-runtime.d.ts +28 -0
- package/utils/imperative/agent-runtime.js +33 -0
- package/utils/imperative/imperative-agent.vue.d.ts +35 -0
- package/utils/imperative/imperative-agent.vue.js +60 -0
- package/utils/index.d.ts +0 -1
- package/utils/index.js +1 -2
- package/utils/is.d.ts +4 -1
- package/utils/is.js +5 -3
- package/utils/number.d.ts +1 -1
- package/utils/number.js +20 -19
- package/components/picker-view/picker-view-column.d.ts +0 -3
- package/components/picker-view/picker-view-column.js +0 -139
- package/components/picker-view/picker-view.d.ts +0 -21
- package/components/picker-view/picker-view.js +0 -57
- package/components/swiper/swiper-item.d.ts +0 -3
- package/components/swiper/swiper-item.js +0 -34
- package/components/swiper/swiper.d.ts +0 -57
- package/components/swiper/swiper.js +0 -43
- package/utils/vnode.d.ts +0 -9
- package/utils/vnode.js +0 -69
|
@@ -81,10 +81,10 @@ var load_more_default = /*@__PURE__*/ defineComponent({
|
|
|
81
81
|
ref: "loadMore",
|
|
82
82
|
class: normalizeClass(loadMoreClass.value),
|
|
83
83
|
onClick
|
|
84
|
-
}, [__props.status === "incomplete" ? renderSlot(_ctx.$slots, "incomplete", {
|
|
84
|
+
}, [__props.status === "incomplete" ? renderSlot(_ctx.$slots, "incomplete", {}, () => [createTextVNode(toDisplayString(__props.incompleteText || unref(t)("incompleteText")), 1)], void 0, 0) : __props.status === "loading" ? renderSlot(_ctx.$slots, "loading", {}, () => [createVNode(loading_default, null, {
|
|
85
85
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.loadingText || unref(t)("loadingText")), 1)]),
|
|
86
86
|
_: 1
|
|
87
|
-
})]) : __props.status === "complete" ? renderSlot(_ctx.$slots, "complete", {
|
|
87
|
+
})], void 0, 1) : __props.status === "complete" ? renderSlot(_ctx.$slots, "complete", {}, () => [createTextVNode(toDisplayString(__props.completeText || unref(t)("completeText")), 1)], void 0, 2) : __props.status === "error" ? renderSlot(_ctx.$slots, "error", {}, () => [createTextVNode(toDisplayString(__props.errorText || unref(t)("errorText")), 1)], void 0, 3) : createCommentVNode("v-if", true)], 2);
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
});
|
|
@@ -76,7 +76,7 @@ var loading_default = /*@__PURE__*/ defineComponent({
|
|
|
76
76
|
return openBlock(), createElementBlock("div", { class: normalizeClass(loadingClass.value) }, [createElementVNode("div", {
|
|
77
77
|
class: normalizeClass(iconClass.value),
|
|
78
78
|
style: normalizeStyle(iconStyle.value)
|
|
79
|
-
}, [__props.type === "circular" ? renderSlot(_ctx.$slots, "circular", {
|
|
79
|
+
}, [__props.type === "circular" ? renderSlot(_ctx.$slots, "circular", {}, () => [createElementVNode("div", { class: normalizeClass(unref(bem).e("spinner")) }, null, 2)], void 0, 0) : __props.type === "clock" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, renderList(8, (i) => {
|
|
80
80
|
return createElementVNode("div", {
|
|
81
81
|
key: i,
|
|
82
82
|
class: normalizeClass([
|
|
@@ -65,7 +65,7 @@ var motion_default = /*@__PURE__*/ defineComponent({
|
|
|
65
65
|
onVisibleHook("leave-cancelled", el);
|
|
66
66
|
};
|
|
67
67
|
return (_ctx, _cache) => {
|
|
68
|
-
return __props.disalbed ? renderSlot(_ctx.$slots, "default", {
|
|
68
|
+
return __props.disalbed ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : (openBlock(), createBlock(Transition, {
|
|
69
69
|
key: 1,
|
|
70
70
|
type: __props.type,
|
|
71
71
|
name: mergedName.value,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { defaultOverlayProps } from "./common.js";
|
|
3
3
|
import motion_default from "../motion/motion.vue.js";
|
|
4
|
-
import { computed, createBlock, createElementVNode, defineComponent, mergeDefaults,
|
|
4
|
+
import { computed, createBlock, createElementVNode, defineComponent, mergeDefaults, mergeProps, openBlock, renderSlot, vShow, withCtx, withDirectives, withModifiers } from "vue";
|
|
5
5
|
//#region packages/sard/components/overlay/overlay.vue
|
|
6
6
|
var overlay_default = /*@__PURE__*/ defineComponent({
|
|
7
|
+
inheritAttrs: false,
|
|
7
8
|
__name: "overlay",
|
|
8
9
|
props: /*@__PURE__*/ mergeDefaults({
|
|
9
10
|
visible: {
|
|
@@ -42,12 +43,12 @@ var overlay_default = /*@__PURE__*/ defineComponent({
|
|
|
42
43
|
});
|
|
43
44
|
return (_ctx, _cache) => {
|
|
44
45
|
return openBlock(), createBlock(motion_default, { name: "fade" }, {
|
|
45
|
-
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
46
|
-
class:
|
|
47
|
-
style:
|
|
46
|
+
default: withCtx(() => [withDirectives(createElementVNode("div", mergeProps(_ctx.$attrs, {
|
|
47
|
+
class: overlayClass.value,
|
|
48
|
+
style: overlayStyle.value,
|
|
48
49
|
onClick,
|
|
49
50
|
onTouchmove: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop", "prevent"]))
|
|
50
|
-
}, [renderSlot(_ctx.$slots, "default")],
|
|
51
|
+
}), [renderSlot(_ctx.$slots, "default")], 16), [[vShow, __props.visible]])]),
|
|
51
52
|
_: 3
|
|
52
53
|
});
|
|
53
54
|
};
|
|
@@ -3,8 +3,8 @@ import { nestedToMulti } from "../../utils/object.js";
|
|
|
3
3
|
import { arrayEqual, toArray } from "../../utils/array.js";
|
|
4
4
|
import { useOptionKeys } from "../../use/useOptionKeys.js";
|
|
5
5
|
import { defaultPickerProps, getCascaderValidIndexes, getColumnsType, getIndexesByValue, getMaySingleValueByOptions, getOptionsByIndexes } from "./common.js";
|
|
6
|
-
import picker_view_default from "../picker-view/picker-view.js";
|
|
7
|
-
import picker_view_column_default from "../picker-view/picker-view-column.js";
|
|
6
|
+
import picker_view_default from "../picker-view/picker-view.vue.js";
|
|
7
|
+
import picker_view_column_default from "../picker-view/picker-view-column.vue.js";
|
|
8
8
|
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeDefaults, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useSlots, watch, withCtx } from "vue";
|
|
9
9
|
//#region packages/sard/components/picker/picker.vue
|
|
10
10
|
var picker_default = /*@__PURE__*/ defineComponent({
|
|
@@ -82,14 +82,17 @@ var picker_default = /*@__PURE__*/ defineComponent({
|
|
|
82
82
|
const pickerViewClass = bem.e("picker-view");
|
|
83
83
|
const indicatorClass = bem.e("indicator");
|
|
84
84
|
return (_ctx, _cache) => {
|
|
85
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(pickerClass)) }, [createVNode(
|
|
85
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(pickerClass)) }, [createVNode(picker_view_default, {
|
|
86
86
|
class: normalizeClass(unref(pickerViewClass)),
|
|
87
87
|
"indicator-class": unref(indicatorClass),
|
|
88
88
|
value: columnIndexes.value,
|
|
89
89
|
onChange
|
|
90
90
|
}, {
|
|
91
91
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(renderedColumns.value, (column, i) => {
|
|
92
|
-
return openBlock(), createBlock(
|
|
92
|
+
return openBlock(), createBlock(picker_view_column_default, {
|
|
93
|
+
key: i,
|
|
94
|
+
"item-count": column.length
|
|
95
|
+
}, {
|
|
93
96
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(column, (option, j) => {
|
|
94
97
|
return openBlock(), createElementBlock("div", {
|
|
95
98
|
key: j,
|
|
@@ -101,7 +104,7 @@ var picker_default = /*@__PURE__*/ defineComponent({
|
|
|
101
104
|
}, () => [createTextVNode(toDisplayString(unref(optionKeys).getLabel(option)), 1)])], 2);
|
|
102
105
|
}), 128))]),
|
|
103
106
|
_: 2
|
|
104
|
-
},
|
|
107
|
+
}, 1032, ["item-count"]);
|
|
105
108
|
}), 128))]),
|
|
106
109
|
_: 3
|
|
107
110
|
}, 8, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PickerSlots, type PickerProps } from '../picker/common';
|
|
2
2
|
import { type DefaultProps } from '../config';
|
|
3
3
|
import { type FormPopoutProps } from '../popout/useFormPopout';
|
|
4
|
-
import type { MotionEmits } from '../motion';
|
|
4
|
+
import type { MotionEmits } from '../motion/common';
|
|
5
5
|
export interface PickerPopoutProps<T> extends FormPopoutProps, PickerProps<T> {
|
|
6
6
|
}
|
|
7
7
|
export declare const defaultPickerPopoutProps: DefaultProps<PickerPopoutProps<any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClassValue,
|
|
1
|
+
import type { ClassValue, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, StyleValue, WritableComputedRef } from 'vue';
|
|
2
2
|
import { type DefaultProps } from '../config';
|
|
3
3
|
export declare const pickerViewProps: {
|
|
4
4
|
value: {
|
|
@@ -32,6 +32,12 @@ export interface PickerViewEmits {
|
|
|
32
32
|
export interface PickerViewExpose {
|
|
33
33
|
}
|
|
34
34
|
export interface PickerViewColumnProps {
|
|
35
|
+
/**
|
|
36
|
+
* 选项数量。**推荐由知道数据的那一层传入**(如 Picker 会传 `column.length`):不传时
|
|
37
|
+
* 回落到观察 DOM 子节点数,而整列重建时 DOM 会有中间态(少到 1 个),会被按列数夹取
|
|
38
|
+
* 的逻辑误判成 0,导致整列跳回第一行。
|
|
39
|
+
*/
|
|
40
|
+
itemCount?: number;
|
|
35
41
|
}
|
|
36
42
|
export declare const defaultPickerViewColumnProps: DefaultProps<PickerViewColumnProps>;
|
|
37
43
|
export interface PickerViewColumnSlots {
|
|
@@ -41,11 +47,25 @@ export interface PickerViewColumnEmits {
|
|
|
41
47
|
}
|
|
42
48
|
export interface PickerViewColumnExpose {
|
|
43
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* 列的身份句柄:由 `PickerViewColumn` 在 setup 里自建一个普通对象,交给 PickerView
|
|
52
|
+
* 按登记顺序定位「当前位于第几列」。
|
|
53
|
+
*
|
|
54
|
+
* ⚠️ 不要用组件实例(`getCurrentInstance()`)代替它:vapor 渲染子组件期间,它返回的是
|
|
55
|
+
* **发起本次渲染的组件**(实测三列 PickerViewColumn 都拿到页面组件的实例),据此定位会
|
|
56
|
+
* 把所有列都算成第 0 列,导致所有列共用同一个 `innerValue[0]`:滚动第一列后取值/写值
|
|
57
|
+
* 互相串列,级联 Picker 会因此把值夹取到 0(回到第一行)。
|
|
58
|
+
*/
|
|
59
|
+
export interface PickerViewColumnHandle {
|
|
60
|
+
readonly __pickerViewColumn: true;
|
|
61
|
+
}
|
|
44
62
|
export interface PickerViewContext {
|
|
45
63
|
maskStyle: any;
|
|
46
64
|
maskClass: any;
|
|
47
65
|
indicatorClass: any;
|
|
48
66
|
indicatorStyle: any;
|
|
49
|
-
|
|
67
|
+
registerColumn: (handle: PickerViewColumnHandle) => void;
|
|
68
|
+
unregisterColumn: (handle: PickerViewColumnHandle) => void;
|
|
69
|
+
getColumnValue: (handle: PickerViewColumnHandle) => WritableComputedRef<number>;
|
|
50
70
|
}
|
|
51
71
|
export declare const pickerViewContextKey: InjectionKey<PickerViewContext>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EnhancedComponent } from '../../utils';
|
|
2
|
-
import _PickerView from './picker-view';
|
|
3
|
-
import _PickerViewColumn from './picker-view-column';
|
|
2
|
+
import _PickerView from './picker-view.vue';
|
|
3
|
+
import _PickerViewColumn from './picker-view-column.vue';
|
|
4
4
|
export declare const PickerView: EnhancedComponent<typeof _PickerView>;
|
|
5
5
|
export declare const PickerViewColumn: EnhancedComponent<typeof _PickerViewColumn>;
|
|
6
6
|
export default PickerView;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { enhanceComponent } from "../../utils/component.js";
|
|
2
|
-
import picker_view_default from "./picker-view.js";
|
|
3
|
-
import picker_view_column_default from "./picker-view-column.js";
|
|
2
|
+
import picker_view_default from "./picker-view.vue.js";
|
|
3
|
+
import picker_view_column_default from "./picker-view-column.vue.js";
|
|
4
4
|
//#region packages/sard/components/picker-view/index.ts
|
|
5
5
|
const PickerView = enhanceComponent(picker_view_default);
|
|
6
6
|
const PickerViewColumn = enhanceComponent(picker_view_column_default);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type PickerViewColumnSlots } from './common';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* 选项数量。**推荐由知道数据的那一层传入**(如 Picker 会传 `column.length`):
|
|
5
|
+
* 不传时回落到观察 DOM 子节点数,但整列重建时 DOM 会有中间态(少到 1 个),
|
|
6
|
+
* 会被下文的「按列数夹取」误判成 0,导致整列跳回第一行。
|
|
7
|
+
*/
|
|
8
|
+
itemCount?: number;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = PickerViewColumnSlots;
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { createBem } from "../../utils/bem.js";
|
|
2
|
+
import { Friction } from "../../utils/scroller/Friction.js";
|
|
3
|
+
import { Spring } from "../../utils/scroller/Spring.js";
|
|
4
|
+
import { usePointerDown } from "../../use/usePointerDown.js";
|
|
5
|
+
import { useResizeObserver } from "../../use/useResizeObserver.js";
|
|
6
|
+
import { useScroller } from "../../utils/scroller/useScroller.js";
|
|
7
|
+
import { pickerViewContextKey } from "./common.js";
|
|
8
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, inject, normalizeClass, normalizeStyle, onUnmounted, openBlock, ref, renderSlot, unref, watch, watchPostEffect } from "vue";
|
|
9
|
+
//#region packages/sard/components/picker-view/picker-view-column.vue
|
|
10
|
+
var picker_view_column_default = /*@__PURE__*/ defineComponent({
|
|
11
|
+
__name: "picker-view-column",
|
|
12
|
+
props: { itemCount: {
|
|
13
|
+
type: Number,
|
|
14
|
+
required: false
|
|
15
|
+
} },
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const bem = createBem("picker-view-column");
|
|
19
|
+
const handle = { __pickerViewColumn: true };
|
|
20
|
+
const rootRef = ref(null);
|
|
21
|
+
const contentRef = ref(null);
|
|
22
|
+
const indicatorRef = ref(null);
|
|
23
|
+
const context = inject(pickerViewContextKey);
|
|
24
|
+
context.registerColumn(handle);
|
|
25
|
+
onUnmounted(() => {
|
|
26
|
+
context.unregisterColumn(handle);
|
|
27
|
+
});
|
|
28
|
+
const columnValue = context.getColumnValue(handle);
|
|
29
|
+
const domItemCount = ref(0);
|
|
30
|
+
const itemCount = computed(() => props.itemCount ?? domItemCount.value);
|
|
31
|
+
const updateItemCount = () => {
|
|
32
|
+
domItemCount.value = contentRef.value?.children.length ?? 0;
|
|
33
|
+
};
|
|
34
|
+
let contentObserver = null;
|
|
35
|
+
watch(contentRef, (el, _oldEl, onCleanup) => {
|
|
36
|
+
contentObserver?.disconnect();
|
|
37
|
+
contentObserver = null;
|
|
38
|
+
if (!el) return;
|
|
39
|
+
updateItemCount();
|
|
40
|
+
contentObserver = new MutationObserver(updateItemCount);
|
|
41
|
+
contentObserver.observe(el, { childList: true });
|
|
42
|
+
onCleanup(() => {
|
|
43
|
+
contentObserver?.disconnect();
|
|
44
|
+
contentObserver = null;
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
immediate: true,
|
|
48
|
+
flush: "post"
|
|
49
|
+
});
|
|
50
|
+
const rootSize = useResizeObserver(rootRef);
|
|
51
|
+
const contentSize = useResizeObserver(contentRef);
|
|
52
|
+
const indicatorSize = useResizeObserver(indicatorRef);
|
|
53
|
+
const maskSize = computed(() => (rootSize.height - indicatorSize.height) / 2);
|
|
54
|
+
const contentHeight = computed(() => {
|
|
55
|
+
return contentSize.height + maskSize.value * 2;
|
|
56
|
+
});
|
|
57
|
+
const padding = computed(() => `${maskSize.value}px 0`);
|
|
58
|
+
const { position, update, scrollTo, isIdle, handleTouchStart, handleTouchMove, handleTouchEnd } = useScroller({
|
|
59
|
+
itemSize: indicatorSize.height,
|
|
60
|
+
friction: new Friction(1e-4),
|
|
61
|
+
spring: new Spring(2, 90, 20),
|
|
62
|
+
onSnap: (index) => {
|
|
63
|
+
if (!isNaN(index) && index !== columnValue.value) columnValue.value = index;
|
|
64
|
+
},
|
|
65
|
+
onTap: (event) => {
|
|
66
|
+
handleTap(event);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
let updatePending = false;
|
|
70
|
+
watch([
|
|
71
|
+
() => indicatorSize.height,
|
|
72
|
+
columnValue,
|
|
73
|
+
itemCount,
|
|
74
|
+
() => rootSize.height,
|
|
75
|
+
contentHeight
|
|
76
|
+
], () => {
|
|
77
|
+
if (updatePending) return;
|
|
78
|
+
updatePending = true;
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
updatePending = false;
|
|
81
|
+
if (indicatorSize.height) {
|
|
82
|
+
const current = Math.max(Math.min(columnValue.value, itemCount.value - 1), 0);
|
|
83
|
+
update(current * indicatorSize.height, indicatorSize.height, rootSize.height, contentHeight.value);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}, { flush: "post" });
|
|
87
|
+
watchPostEffect(() => {
|
|
88
|
+
const el = contentRef.value;
|
|
89
|
+
if (!el) return;
|
|
90
|
+
const transform = "translateY(" + position.value + "px) translateZ(0)";
|
|
91
|
+
el.style.transform = transform;
|
|
92
|
+
});
|
|
93
|
+
let oldDeltaY = 0;
|
|
94
|
+
function handleWheel(event) {
|
|
95
|
+
const deltaY = oldDeltaY + event.deltaY;
|
|
96
|
+
if (Math.abs(deltaY) > 10) {
|
|
97
|
+
oldDeltaY = 0;
|
|
98
|
+
let current = Math.min(columnValue.value + (deltaY < 0 ? -1 : 1), itemCount.value - 1);
|
|
99
|
+
columnValue.value = current = Math.max(current, 0);
|
|
100
|
+
scrollTo(current * indicatorSize.height);
|
|
101
|
+
} else oldDeltaY = deltaY;
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
}
|
|
104
|
+
function handleTap({ changedTouches: [{ clientY }] }) {
|
|
105
|
+
const el = rootRef.value;
|
|
106
|
+
if (isIdle()) {
|
|
107
|
+
const r = clientY - el.getBoundingClientRect().top - rootSize.height / 2;
|
|
108
|
+
const o = indicatorSize.height / 2;
|
|
109
|
+
if (!(Math.abs(r) <= o)) {
|
|
110
|
+
const a = Math.ceil((Math.abs(r) - o) / indicatorSize.height);
|
|
111
|
+
const s = r < 0 ? -a : a;
|
|
112
|
+
let current = Math.min(columnValue.value + s, itemCount.value - 1);
|
|
113
|
+
columnValue.value = current = Math.max(current, 0);
|
|
114
|
+
scrollTo(current * indicatorSize.height);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const onTouchStart = (event) => {
|
|
119
|
+
handleTouchStart(event);
|
|
120
|
+
};
|
|
121
|
+
const onTouchMove = (event) => {
|
|
122
|
+
handleTouchMove(event);
|
|
123
|
+
event.stopPropagation();
|
|
124
|
+
};
|
|
125
|
+
const onTouchEnd = (event) => {
|
|
126
|
+
handleTouchEnd(event);
|
|
127
|
+
};
|
|
128
|
+
const onPointerDown = usePointerDown(onTouchStart, onTouchMove, onTouchEnd);
|
|
129
|
+
return (_ctx, _cache) => {
|
|
130
|
+
return openBlock(), createElementBlock("div", {
|
|
131
|
+
ref_key: "rootRef",
|
|
132
|
+
ref: rootRef,
|
|
133
|
+
class: normalizeClass(unref(bem).b()),
|
|
134
|
+
onTouchstart: onTouchStart,
|
|
135
|
+
onTouchmove: onTouchMove,
|
|
136
|
+
onTouchend: onTouchEnd,
|
|
137
|
+
onTouchcancel: onTouchEnd,
|
|
138
|
+
onPointerdown: _cache[0] || (_cache[0] = (...args) => unref(onPointerDown) && unref(onPointerDown)(...args))
|
|
139
|
+
}, [createElementVNode("div", {
|
|
140
|
+
class: normalizeClass(unref(bem).e("group")),
|
|
141
|
+
onWheel: handleWheel
|
|
142
|
+
}, [
|
|
143
|
+
createElementVNode("div", {
|
|
144
|
+
class: normalizeClass([unref(bem).e("mask"), unref(context).maskClass]),
|
|
145
|
+
style: normalizeStyle([`background-size: 100% ${maskSize.value}px;`, unref(context).maskStyle])
|
|
146
|
+
}, null, 6),
|
|
147
|
+
createElementVNode("div", {
|
|
148
|
+
ref_key: "indicatorRef",
|
|
149
|
+
ref: indicatorRef,
|
|
150
|
+
class: normalizeClass([unref(bem).e("indicator"), unref(context).indicatorClass]),
|
|
151
|
+
style: normalizeStyle(unref(context).indicatorStyle)
|
|
152
|
+
}, null, 6),
|
|
153
|
+
createElementVNode("div", {
|
|
154
|
+
ref_key: "contentRef",
|
|
155
|
+
ref: contentRef,
|
|
156
|
+
class: normalizeClass([unref(bem).e("content")]),
|
|
157
|
+
style: normalizeStyle({
|
|
158
|
+
padding: padding.value,
|
|
159
|
+
"--picker-view-indicator-height": `${unref(indicatorSize).height}px`
|
|
160
|
+
})
|
|
161
|
+
}, [renderSlot(_ctx.$slots, "default")], 6)
|
|
162
|
+
], 34)], 34);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
//#endregion
|
|
167
|
+
export { picker_view_column_default as default };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type PickerViewSlots } from './common';
|
|
2
|
+
type __VLS_Slots = PickerViewSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
value: {
|
|
5
|
+
type: import("vue").PropType<number[]>;
|
|
6
|
+
default(): never[];
|
|
7
|
+
validator(val: any): boolean;
|
|
8
|
+
};
|
|
9
|
+
indicatorStyle: {
|
|
10
|
+
type: import("vue").PropType<import("vue").StyleValue>;
|
|
11
|
+
};
|
|
12
|
+
indicatorClass: {
|
|
13
|
+
type: import("vue").PropType<import("vue").ClassValue>;
|
|
14
|
+
};
|
|
15
|
+
maskStyle: {
|
|
16
|
+
type: import("vue").PropType<import("vue").StyleValue>;
|
|
17
|
+
};
|
|
18
|
+
maskClass: {
|
|
19
|
+
type: import("vue").PropType<import("vue").ClassValue>;
|
|
20
|
+
};
|
|
21
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
|
+
change: (value: number[]) => any;
|
|
23
|
+
"update:value": (value: number[]) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
value: {
|
|
26
|
+
type: import("vue").PropType<number[]>;
|
|
27
|
+
default(): never[];
|
|
28
|
+
validator(val: any): boolean;
|
|
29
|
+
};
|
|
30
|
+
indicatorStyle: {
|
|
31
|
+
type: import("vue").PropType<import("vue").StyleValue>;
|
|
32
|
+
};
|
|
33
|
+
indicatorClass: {
|
|
34
|
+
type: import("vue").PropType<import("vue").ClassValue>;
|
|
35
|
+
};
|
|
36
|
+
maskStyle: {
|
|
37
|
+
type: import("vue").PropType<import("vue").StyleValue>;
|
|
38
|
+
};
|
|
39
|
+
maskClass: {
|
|
40
|
+
type: import("vue").PropType<import("vue").ClassValue>;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{
|
|
43
|
+
onChange?: ((value: number[]) => any) | undefined;
|
|
44
|
+
"onUpdate:value"?: ((value: number[]) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
value: number[];
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
48
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createBem } from "../../utils/bem.js";
|
|
2
|
+
import { pickerViewContextKey, pickerViewProps } from "./common.js";
|
|
3
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, provide, reactive, renderSlot, shallowRef, toRef, unref, watch } from "vue";
|
|
4
|
+
//#region packages/sard/components/picker-view/picker-view.vue
|
|
5
|
+
var picker_view_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "picker-view",
|
|
7
|
+
props: pickerViewProps,
|
|
8
|
+
emits: ["update:value", "change"],
|
|
9
|
+
setup(__props, { emit: __emit }) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const emit = __emit;
|
|
12
|
+
const bem = createBem("picker-view");
|
|
13
|
+
const innerValue = reactive([...props.value]);
|
|
14
|
+
watch(() => props.value, (value) => {
|
|
15
|
+
innerValue.length = value.length;
|
|
16
|
+
value.forEach((val, index) => {
|
|
17
|
+
if (val !== innerValue[index]) innerValue.splice(index, 1, val);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
const columnHandles = shallowRef([]);
|
|
21
|
+
function registerColumn(handle) {
|
|
22
|
+
if (!columnHandles.value.includes(handle)) columnHandles.value.push(handle);
|
|
23
|
+
}
|
|
24
|
+
function unregisterColumn(handle) {
|
|
25
|
+
const index = columnHandles.value.indexOf(handle);
|
|
26
|
+
if (index > -1) columnHandles.value.splice(index, 1);
|
|
27
|
+
}
|
|
28
|
+
const getColumnValue = (handle) => {
|
|
29
|
+
return computed({
|
|
30
|
+
get() {
|
|
31
|
+
return innerValue[columnHandles.value.indexOf(handle)] || 0;
|
|
32
|
+
},
|
|
33
|
+
set(current) {
|
|
34
|
+
const index = columnHandles.value.indexOf(handle);
|
|
35
|
+
if (index < 0) return;
|
|
36
|
+
if (innerValue[index] !== current) {
|
|
37
|
+
innerValue[index] = current;
|
|
38
|
+
const value = [...innerValue];
|
|
39
|
+
emit("update:value", value);
|
|
40
|
+
emit("change", value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
provide(pickerViewContextKey, reactive({
|
|
46
|
+
maskStyle: toRef(() => props.maskStyle),
|
|
47
|
+
maskClass: toRef(() => props.maskClass),
|
|
48
|
+
indicatorClass: toRef(() => props.indicatorClass),
|
|
49
|
+
indicatorStyle: toRef(() => props.indicatorStyle),
|
|
50
|
+
registerColumn,
|
|
51
|
+
unregisterColumn,
|
|
52
|
+
getColumnValue
|
|
53
|
+
}));
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(bem).b()) }, [createElementVNode("div", { class: normalizeClass(unref(bem).e("wrapper")) }, [renderSlot(_ctx.$slots, "default")], 2)], 2);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { picker_view_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DefaultProps } from '../config';
|
|
2
|
-
import type { MotionEmits } from '../motion';
|
|
2
|
+
import type { MotionEmits } from '../motion/common';
|
|
3
3
|
export type PopoutBeforeClose = (type: 'close' | 'cancel' | 'confirm', loading: {
|
|
4
4
|
readonly cancel: boolean;
|
|
5
5
|
readonly confirm: boolean;
|
|
@@ -266,7 +266,6 @@ var popout_default = /*@__PURE__*/ defineComponent({
|
|
|
266
266
|
key: 0,
|
|
267
267
|
class: normalizeClass(unref(bem).e("footer"))
|
|
268
268
|
}, [mergedShowCancel.value ? renderSlot(_ctx.$slots, "cancel", {
|
|
269
|
-
key: 0,
|
|
270
269
|
onClick: onCancel,
|
|
271
270
|
loading: loading.cancel,
|
|
272
271
|
text: mergedCancelText.value
|
|
@@ -280,8 +279,7 @@ var popout_default = /*@__PURE__*/ defineComponent({
|
|
|
280
279
|
}, {
|
|
281
280
|
default: withCtx(() => [createTextVNode(toDisplayString(mergedCancelText.value), 1)]),
|
|
282
281
|
_: 1
|
|
283
|
-
}, 8, ["loading"])]) : createCommentVNode("v-if", true), __props.showConfirm ? renderSlot(_ctx.$slots, "confirm", {
|
|
284
|
-
key: 1,
|
|
282
|
+
}, 8, ["loading"])], void 0, 0) : createCommentVNode("v-if", true), __props.showConfirm ? renderSlot(_ctx.$slots, "confirm", {
|
|
285
283
|
onClick: onConfirm,
|
|
286
284
|
disabled: __props.confirmDisabled,
|
|
287
285
|
loading: loading.confirm,
|
|
@@ -297,7 +295,7 @@ var popout_default = /*@__PURE__*/ defineComponent({
|
|
|
297
295
|
}, {
|
|
298
296
|
default: withCtx(() => [createTextVNode(toDisplayString(mergedConfirmText.value), 1)]),
|
|
299
297
|
_: 1
|
|
300
|
-
}, 8, ["loading", "disabled"])]) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)
|
|
298
|
+
}, 8, ["loading", "disabled"])], void 0, 1) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)
|
|
301
299
|
], 34)]),
|
|
302
300
|
_: 3
|
|
303
301
|
}, 8, [
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
|
-
import { OnlyChild } from "../../utils/vnode.js";
|
|
3
2
|
import { useZIndex } from "../../use/useZIndex.js";
|
|
4
3
|
import { usePopper } from "../../use/usePopper.js";
|
|
5
4
|
import { useClickOutside } from "../../use/useClickOutside.js";
|
|
6
5
|
import motion_default from "../motion/motion.vue.js";
|
|
7
6
|
import { defaultPopoverProps } from "./common.js";
|
|
8
|
-
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeDefaults, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, shallowRef, unref, useAttrs, useModel, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
|
|
7
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeDefaults, mergeProps, normalizeClass, normalizeStyle, onMounted, onUpdated, openBlock, renderSlot, shallowRef, unref, useAttrs, useModel, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
|
|
9
8
|
//#region packages/sard/components/popover/popover.vue
|
|
10
9
|
var popover_default = /*@__PURE__*/ defineComponent({
|
|
11
10
|
inheritAttrs: false,
|
|
@@ -50,10 +49,13 @@ var popover_default = /*@__PURE__*/ defineComponent({
|
|
|
50
49
|
const attrs = useAttrs();
|
|
51
50
|
const slots = useSlots();
|
|
52
51
|
const bem = createBem("popover");
|
|
52
|
+
const referenceRef = useTemplateRef("referenceRef");
|
|
53
53
|
const elRef = shallowRef(null);
|
|
54
|
-
const
|
|
55
|
-
elRef.value =
|
|
54
|
+
const syncElRef = () => {
|
|
55
|
+
elRef.value = referenceRef.value?.firstElementChild ?? referenceRef.value;
|
|
56
56
|
};
|
|
57
|
+
onMounted(syncElRef);
|
|
58
|
+
onUpdated(syncElRef);
|
|
57
59
|
const mergedRef = computed(() => {
|
|
58
60
|
return props.reference || elRef.value;
|
|
59
61
|
});
|
|
@@ -97,14 +99,13 @@ var popover_default = /*@__PURE__*/ defineComponent({
|
|
|
97
99
|
}, popperStyle.value];
|
|
98
100
|
});
|
|
99
101
|
return (_ctx, _cache) => {
|
|
100
|
-
return openBlock(), createElementBlock(Fragment, null, [slots.reference ? (openBlock(),
|
|
102
|
+
return openBlock(), createElementBlock(Fragment, null, [slots.reference ? (openBlock(), createElementBlock("span", {
|
|
101
103
|
key: 0,
|
|
102
|
-
|
|
104
|
+
ref_key: "referenceRef",
|
|
105
|
+
ref: referenceRef,
|
|
106
|
+
style: { "display": "contents" },
|
|
103
107
|
onClick: onReferenceClick
|
|
104
|
-
}, {
|
|
105
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "reference")]),
|
|
106
|
-
_: 3
|
|
107
|
-
})) : createCommentVNode("v-if", true), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(motion_default, { name: "wide-zoom" }, {
|
|
108
|
+
}, [renderSlot(_ctx.$slots, "reference")], 512)) : createCommentVNode("v-if", true), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(motion_default, { name: "wide-zoom" }, {
|
|
108
109
|
default: withCtx(() => [withDirectives(createElementVNode("div", mergeProps({
|
|
109
110
|
ref: "popper",
|
|
110
111
|
class: popoverClass.value,
|
|
@@ -153,7 +153,7 @@ var popup_default = /*@__PURE__*/ defineComponent({
|
|
|
153
153
|
default: withCtx(() => [withDirectives(createElementVNode("div", mergeProps(_ctx.$attrs, {
|
|
154
154
|
class: popupClass.value,
|
|
155
155
|
style: popupStyle.value
|
|
156
|
-
}), [rendered.value ? renderSlot(_ctx.$slots, "default", {
|
|
156
|
+
}), [rendered.value ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : createCommentVNode("v-if", true)], 16), [[vShow, __props.visible]])]),
|
|
157
157
|
_: 3
|
|
158
158
|
}, 8, ["name"])]);
|
|
159
159
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InjectionKey } from 'vue';
|
|
2
2
|
import { type DefaultProps } from '../config';
|
|
3
|
-
import type { MotionEmits } from '../motion';
|
|
3
|
+
import type { MotionEmits } from '../motion/common';
|
|
4
4
|
export interface PreviewImageProps {
|
|
5
5
|
urls?: string[];
|
|
6
6
|
visible?: boolean;
|
|
@@ -28,10 +28,10 @@ declare const __VLS_base: import("vue").DefineComponent<PreviewImageProps, Previ
|
|
|
28
28
|
}>, {
|
|
29
29
|
visible: boolean;
|
|
30
30
|
closeOnBackPress: boolean;
|
|
31
|
+
loop: boolean;
|
|
31
32
|
current: number;
|
|
32
33
|
urls: string[];
|
|
33
34
|
showIndicator: boolean;
|
|
34
|
-
loop: boolean;
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,8 +5,8 @@ import { usePointerDown } from "../../use/usePointerDown.js";
|
|
|
5
5
|
import { useInitialVelocity } from "../../use/useInitialVelocity.js";
|
|
6
6
|
import popup_default from "../popup/popup.vue.js";
|
|
7
7
|
import { defaultPreviewImageProps, previewImageContextKey } from "./common.js";
|
|
8
|
-
import swiper_default from "../swiper/swiper.js";
|
|
9
|
-
import swiper_item_default from "../swiper/swiper-item.js";
|
|
8
|
+
import swiper_default from "../swiper/swiper.vue.js";
|
|
9
|
+
import swiper_item_default from "../swiper/swiper-item.vue.js";
|
|
10
10
|
import preview_image_item_default from "./preview-image-item.vue.js";
|
|
11
11
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, isRef, mergeDefaults, normalizeClass, normalizeStyle, openBlock, provide, reactive, ref, renderList, toDisplayString, unref, useModel, watch, withCtx } from "vue";
|
|
12
12
|
//#region packages/sard/components/preview-image/preview-image.vue
|
|
@@ -160,7 +160,7 @@ var preview_image_default = /*@__PURE__*/ defineComponent({
|
|
|
160
160
|
onTouchend: onTouchEnd,
|
|
161
161
|
onTouchcancel: onTouchEnd,
|
|
162
162
|
onPointerdown: _cache[1] || (_cache[1] = (...args) => unref(onPointerDown) && unref(onPointerDown)(...args))
|
|
163
|
-
}, [createVNode(
|
|
163
|
+
}, [createVNode(swiper_default, {
|
|
164
164
|
modelValue: unref(current),
|
|
165
165
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(current) ? current.value = $event : null),
|
|
166
166
|
loop: __props.loop,
|
|
@@ -169,7 +169,7 @@ var preview_image_default = /*@__PURE__*/ defineComponent({
|
|
|
169
169
|
class: normalizeClass([unref(bem).e("swiper"), unref(bem).is("preview-image")])
|
|
170
170
|
}, {
|
|
171
171
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.urls, (url, index) => {
|
|
172
|
-
return openBlock(), createBlock(
|
|
172
|
+
return openBlock(), createBlock(swiper_item_default, { key: index }, {
|
|
173
173
|
default: withCtx(() => [createVNode(preview_image_item_default, { url }, null, 8, ["url"])]),
|
|
174
174
|
_: 2
|
|
175
175
|
}, 1024);
|