@opentinyvue/vue-dynamic-scroller 2.21.0 → 3.21.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/lib/index.js +1 -1
- package/lib/pc.js +67 -87
- package/package.json +3 -3
- package/src/index.d.ts +73 -1
- package/src/pc.vue.d.ts +46 -1
package/lib/index.js
CHANGED
|
@@ -54,7 +54,7 @@ var DynamicScroller = defineComponent({
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
var version = "
|
|
57
|
+
var version = "3.21.0";
|
|
58
58
|
DynamicScroller.IdState = RecycleScroller.IdState;
|
|
59
59
|
DynamicScroller.install = function(Vue) {
|
|
60
60
|
Vue.component(DynamicScroller.name, DynamicScroller);
|
package/lib/pc.js
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import { renderless, api } from '@opentinyvue/vue-renderless/dynamic-scroller/vue';
|
|
2
2
|
import { defineComponent, props, setup, emitter } from '@opentinyvue/vue-common';
|
|
3
3
|
import RecycleScroller from '@opentinyvue/vue-recycle-scroller';
|
|
4
|
+
import { resolveComponent, openBlock, createBlock, mergeProps, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
4
5
|
|
|
5
|
-
function
|
|
6
|
-
var
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
7
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
8
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
9
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
10
|
+
t && (r = t);
|
|
11
|
+
var o = 0;
|
|
12
|
+
return function() {
|
|
13
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
14
|
+
};
|
|
11
15
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var originalRender = options.render;
|
|
20
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
21
|
-
hook.call(context);
|
|
22
|
-
return originalRender(h, context);
|
|
23
|
-
};
|
|
24
|
-
} else {
|
|
25
|
-
var existing = options.beforeCreate;
|
|
26
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
27
|
-
}
|
|
16
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17
|
+
}
|
|
18
|
+
function _unsupportedIterableToArray(r, a) {
|
|
19
|
+
if (r) {
|
|
20
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
21
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
22
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
28
23
|
}
|
|
29
|
-
return {
|
|
30
|
-
exports: scriptExports,
|
|
31
|
-
options
|
|
32
|
-
};
|
|
33
24
|
}
|
|
25
|
+
function _arrayLikeToArray(r, a) {
|
|
26
|
+
(null == a || a > r.length) && (a = r.length);
|
|
27
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
31
|
+
var target = sfc.__vccOpts || sfc;
|
|
32
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
33
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
34
|
+
target[key] = val;
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
34
38
|
|
|
35
|
-
var
|
|
39
|
+
var _sfc_main = defineComponent({
|
|
36
40
|
inheritAttrs: false,
|
|
37
41
|
emits: ["resize", "visible"],
|
|
38
42
|
props: [].concat(props, ["items", "keyField", "direction", "listTag", "itemTag", "minItemSize"]),
|
|
@@ -51,67 +55,43 @@ var __vue2_script = defineComponent({
|
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
});
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
var _c = _vm._self._c || _h;
|
|
58
|
-
return _c("tiny-recycle-scroller", _vm._b({
|
|
58
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
59
|
+
var _component_tiny_recycle_scroller = resolveComponent("tiny-recycle-scroller");
|
|
60
|
+
return openBlock(), createBlock(_component_tiny_recycle_scroller, mergeProps({
|
|
59
61
|
ref: "scroller",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
fn: function fn() {
|
|
93
|
-
return [_vm._t("after")];
|
|
94
|
-
},
|
|
95
|
-
proxy: true
|
|
96
|
-
}, {
|
|
97
|
-
key: "empty",
|
|
98
|
-
fn: function fn() {
|
|
99
|
-
return [_vm._t("empty")];
|
|
100
|
-
},
|
|
101
|
-
proxy: true
|
|
102
|
-
}], null, true)
|
|
103
|
-
}, "tiny-recycle-scroller", _vm.$attrs, false));
|
|
104
|
-
};
|
|
105
|
-
var staticRenderFns = [];
|
|
106
|
-
var __cssModules = {};
|
|
107
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
108
|
-
function __vue2_injectStyles(context) {
|
|
109
|
-
for (var o in __cssModules) {
|
|
110
|
-
this[o] = __cssModules[o];
|
|
111
|
-
}
|
|
62
|
+
class: "tiny-dynamic-scroller",
|
|
63
|
+
items: _ctx.state.itemsWithSize,
|
|
64
|
+
"min-item-size": _ctx.minItemSize,
|
|
65
|
+
direction: _ctx.direction,
|
|
66
|
+
"key-field": _ctx.keyField,
|
|
67
|
+
"list-tag": _ctx.listTag,
|
|
68
|
+
"item-tag": _ctx.itemTag
|
|
69
|
+
}, _ctx.$attrs, {
|
|
70
|
+
onResize: _ctx.onScrollerResize,
|
|
71
|
+
onVisible: _ctx.onScrollerVisible
|
|
72
|
+
}), {
|
|
73
|
+
default: withCtx(function(_ref) {
|
|
74
|
+
var itemWithSize = _ref.item, index = _ref.index, active = _ref.active;
|
|
75
|
+
return [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
|
|
76
|
+
item: itemWithSize.item,
|
|
77
|
+
index,
|
|
78
|
+
active,
|
|
79
|
+
itemWithSize
|
|
80
|
+
})))];
|
|
81
|
+
}),
|
|
82
|
+
before: withCtx(function() {
|
|
83
|
+
return [renderSlot(_ctx.$slots, "before")];
|
|
84
|
+
}),
|
|
85
|
+
after: withCtx(function() {
|
|
86
|
+
return [renderSlot(_ctx.$slots, "after")];
|
|
87
|
+
}),
|
|
88
|
+
empty: withCtx(function() {
|
|
89
|
+
return [renderSlot(_ctx.$slots, "empty")];
|
|
90
|
+
}),
|
|
91
|
+
_: 3
|
|
92
|
+
/* FORWARDED */
|
|
93
|
+
}, 16, ["items", "min-item-size", "direction", "key-field", "list-tag", "item-tag", "onResize", "onVisible"]);
|
|
112
94
|
}
|
|
113
|
-
var pc = /* @__PURE__ */
|
|
114
|
-
return __component__.exports;
|
|
115
|
-
}();
|
|
95
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
116
96
|
|
|
117
97
|
export { pc as default };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-dynamic-scroller",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@opentinyvue/vue-common": "~
|
|
10
|
+
"@opentinyvue/vue-common": "~3.21.0",
|
|
11
11
|
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
12
|
-
"@opentinyvue/vue-recycle-scroller": "~
|
|
12
|
+
"@opentinyvue/vue-recycle-scroller": "~3.21.0"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"types": "index.d.ts"
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,74 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
items: {
|
|
3
|
+
type: ArrayConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
keyField: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
direction: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
validator: (value: unknown) => boolean;
|
|
14
|
+
};
|
|
15
|
+
listTag: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
itemTag: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
minItemSize: {
|
|
24
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
tiny_mode: StringConstructor;
|
|
28
|
+
tiny_mode_root: BooleanConstructor;
|
|
29
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
30
|
+
tiny_renderless: FunctionConstructor;
|
|
31
|
+
tiny_theme: StringConstructor;
|
|
32
|
+
tiny_chart_theme: ObjectConstructor;
|
|
33
|
+
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
36
|
+
items: {
|
|
37
|
+
type: ArrayConstructor;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
keyField: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
direction: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
validator: (value: unknown) => boolean;
|
|
48
|
+
};
|
|
49
|
+
listTag: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
itemTag: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
minItemSize: {
|
|
58
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
tiny_mode: StringConstructor;
|
|
62
|
+
tiny_mode_root: BooleanConstructor;
|
|
63
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
64
|
+
tiny_renderless: FunctionConstructor;
|
|
65
|
+
tiny_theme: StringConstructor;
|
|
66
|
+
tiny_chart_theme: ObjectConstructor;
|
|
67
|
+
}>>, {
|
|
68
|
+
tiny_mode_root: boolean;
|
|
69
|
+
direction: string;
|
|
70
|
+
keyField: string;
|
|
71
|
+
listTag: string;
|
|
72
|
+
itemTag: string;
|
|
73
|
+
}, {}>;
|
|
2
74
|
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
items?: any;
|
|
3
|
+
tiny_mode?: any;
|
|
4
|
+
tiny_mode_root?: any;
|
|
5
|
+
tiny_template?: any;
|
|
6
|
+
tiny_renderless?: any;
|
|
7
|
+
_constants?: any;
|
|
8
|
+
tiny_theme?: any;
|
|
9
|
+
tiny_chart_theme?: any;
|
|
10
|
+
direction?: any;
|
|
11
|
+
keyField?: any;
|
|
12
|
+
listTag?: any;
|
|
13
|
+
itemTag?: any;
|
|
14
|
+
minItemSize?: any;
|
|
15
|
+
}>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("resize" | "visible")[], "resize" | "visible", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
16
|
+
items?: any;
|
|
17
|
+
tiny_mode?: any;
|
|
18
|
+
tiny_mode_root?: any;
|
|
19
|
+
tiny_template?: any;
|
|
20
|
+
tiny_renderless?: any;
|
|
21
|
+
_constants?: any;
|
|
22
|
+
tiny_theme?: any;
|
|
23
|
+
tiny_chart_theme?: any;
|
|
24
|
+
direction?: any;
|
|
25
|
+
keyField?: any;
|
|
26
|
+
listTag?: any;
|
|
27
|
+
itemTag?: any;
|
|
28
|
+
minItemSize?: any;
|
|
29
|
+
}>>> & {
|
|
30
|
+
onResize?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
onVisible?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
readonly items?: any;
|
|
34
|
+
readonly tiny_mode?: any;
|
|
35
|
+
readonly tiny_mode_root?: any;
|
|
36
|
+
readonly tiny_template?: any;
|
|
37
|
+
readonly tiny_renderless?: any;
|
|
38
|
+
readonly _constants?: any;
|
|
39
|
+
readonly tiny_theme?: any;
|
|
40
|
+
readonly tiny_chart_theme?: any;
|
|
41
|
+
readonly direction?: any;
|
|
42
|
+
readonly keyField?: any;
|
|
43
|
+
readonly listTag?: any;
|
|
44
|
+
readonly itemTag?: any;
|
|
45
|
+
readonly minItemSize?: any;
|
|
46
|
+
}, {}>;
|
|
2
47
|
export default _default;
|