@opentinyvue/vue-image 2.22.0 → 3.22.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/mobile-first.js +113 -109
- package/lib/pc.js +99 -88
- package/package.json +5 -5
- package/src/index.d.ts +150 -1
- package/src/mobile-first.vue.d.ts +1 -1
- package/src/pc.vue.d.ts +1 -1
package/lib/index.js
CHANGED
package/lib/mobile-first.js
CHANGED
|
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/image/vue';
|
|
|
2
2
|
import { defineComponent, Teleport, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import ImageViewer from '@opentinyvue/vue-image-viewer';
|
|
4
4
|
import imageError from '@opentinyvue/vue-theme/images/image-error.jpg';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createElementVNode, mergeProps, createBlock, Teleport as Teleport$1, withCtx, createCommentVNode } from 'vue';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var originalRender = options.render;
|
|
21
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
-
hook.call(context);
|
|
23
|
-
return originalRender(h, context);
|
|
24
|
-
};
|
|
25
|
-
} else {
|
|
26
|
-
var existing = options.beforeCreate;
|
|
27
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
-
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
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;
|
|
29
24
|
}
|
|
30
|
-
return {
|
|
31
|
-
exports: scriptExports,
|
|
32
|
-
options
|
|
33
|
-
};
|
|
34
25
|
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var _sfc_main = defineComponent({
|
|
37
41
|
components: {
|
|
38
42
|
ImageViewer,
|
|
39
43
|
Teleport
|
|
@@ -54,90 +58,90 @@ var __vue2_script = defineComponent({
|
|
|
54
58
|
});
|
|
55
59
|
}
|
|
56
60
|
});
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
attrs: {
|
|
82
|
-
"src": _vm.state.images.imageError,
|
|
83
|
-
"alt": ""
|
|
84
|
-
}
|
|
85
|
-
})];
|
|
86
|
-
}, {
|
|
87
|
-
"dataTag": "tiny-image-error"
|
|
88
|
-
}) : _c("img", _vm._b({
|
|
89
|
-
class: ["align-top w-full h-full rounded cursor-pointer", {
|
|
90
|
-
"relative left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 block": _vm.state.getAlignCenter
|
|
91
|
-
}],
|
|
92
|
-
style: _vm.state.getImageStyle,
|
|
93
|
-
attrs: {
|
|
94
|
-
"src": _vm.state.src
|
|
95
|
-
},
|
|
96
|
-
on: {
|
|
97
|
-
"click": _vm.clickHandler
|
|
98
|
-
}
|
|
99
|
-
}, "img", _vm.$attrs, false)), _c("div", {
|
|
100
|
-
class: ["inline-block w-full h-full hover:bg-color-text-disabled absolute top-0 left-0 cursor-pointer", _vm.showHover ? "block" : "hidden"],
|
|
101
|
-
attrs: {
|
|
102
|
-
"data-tag": "tiny-image-showhover"
|
|
103
|
-
}
|
|
104
|
-
}), _c("teleport", {
|
|
105
|
-
attrs: {
|
|
106
|
-
"disabled": !_vm.appendToBody,
|
|
107
|
-
"to": "body"
|
|
108
|
-
}
|
|
109
|
-
}, [_vm.state.getPreview && _vm.state.showViewer ? _c("image-viewer", {
|
|
110
|
-
attrs: {
|
|
111
|
-
"z-index": _vm.zIndex,
|
|
112
|
-
"on-switch": _vm.handleSwitch,
|
|
113
|
-
"on-close": _vm.closeViewer,
|
|
114
|
-
"url-list": _vm.previewSrcList,
|
|
115
|
-
"show-index": _vm.showIndex,
|
|
116
|
-
"keep-style": _vm.keepStyle
|
|
117
|
-
},
|
|
118
|
-
on: {
|
|
119
|
-
"delete": _vm.deleteHander
|
|
61
|
+
var _hoisted_1 = /* @__PURE__ */ createElementVNode(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
class: "w-full h-full"
|
|
65
|
+
},
|
|
66
|
+
null,
|
|
67
|
+
-1
|
|
68
|
+
/* HOISTED */
|
|
69
|
+
);
|
|
70
|
+
var _hoisted_2 = ["src"];
|
|
71
|
+
var _hoisted_3 = ["src"];
|
|
72
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
73
|
+
var _component_image_viewer = resolveComponent("image-viewer");
|
|
74
|
+
return openBlock(), createElementBlock(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
"data-tag": "tiny-image",
|
|
78
|
+
class: normalizeClass(["relative inline-block overflow-hidden w-full rounded", {
|
|
79
|
+
"rounded-full": _ctx.round
|
|
80
|
+
}]),
|
|
81
|
+
style: normalizeStyle({
|
|
82
|
+
"width": (!_ctx.lazy ? _ctx.imageSize : "") + "px",
|
|
83
|
+
"height": (!_ctx.lazy ? _ctx.imageSize : "") + "px"
|
|
84
|
+
})
|
|
120
85
|
},
|
|
121
|
-
|
|
122
|
-
key:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
86
|
+
[_ctx.state.loading ? renderSlot(_ctx.$slots, "placeholder", {
|
|
87
|
+
key: 0,
|
|
88
|
+
dataTag: "tiny-image-loading"
|
|
89
|
+
}, function() {
|
|
90
|
+
return [_hoisted_1];
|
|
91
|
+
}) : _ctx.state.error ? renderSlot(_ctx.$slots, "error", {
|
|
92
|
+
key: 1,
|
|
93
|
+
dataTag: "tiny-image-error"
|
|
94
|
+
}, function() {
|
|
95
|
+
return [createElementVNode("img", {
|
|
96
|
+
class: "flex justify-center items-center text-sm align-middle text-color-bg-3 bg-no-repeat bg-center",
|
|
97
|
+
src: _ctx.state.images.imageError,
|
|
98
|
+
alt: ""
|
|
99
|
+
}, null, 8, _hoisted_2)];
|
|
100
|
+
}) : (openBlock(), createElementBlock("img", mergeProps({
|
|
101
|
+
key: 2
|
|
102
|
+
}, _ctx.$attrs, {
|
|
103
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
104
|
+
return _ctx.clickHandler && _ctx.clickHandler.apply(_ctx, arguments);
|
|
105
|
+
}),
|
|
106
|
+
src: _ctx.state.src,
|
|
107
|
+
style: _ctx.state.getImageStyle,
|
|
108
|
+
class: ["align-top w-full h-full rounded cursor-pointer", {
|
|
109
|
+
"relative left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 block": _ctx.state.getAlignCenter
|
|
110
|
+
}]
|
|
111
|
+
}), null, 16, _hoisted_3)), createElementVNode(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
"data-tag": "tiny-image-showhover",
|
|
115
|
+
class: normalizeClass(["inline-block w-full h-full hover:bg-color-text-disabled absolute top-0 left-0 cursor-pointer", _ctx.showHover ? "block" : "hidden"])
|
|
116
|
+
},
|
|
117
|
+
null,
|
|
118
|
+
2
|
|
119
|
+
/* CLASS */
|
|
120
|
+
), (openBlock(), createBlock(Teleport$1, {
|
|
121
|
+
disabled: !_ctx.appendToBody,
|
|
122
|
+
to: "body"
|
|
123
|
+
}, [_ctx.state.getPreview && _ctx.state.showViewer ? (openBlock(), createBlock(_component_image_viewer, {
|
|
124
|
+
key: 0,
|
|
125
|
+
"z-index": _ctx.zIndex,
|
|
126
|
+
"on-switch": _ctx.handleSwitch,
|
|
127
|
+
"on-close": _ctx.closeViewer,
|
|
128
|
+
"url-list": _ctx.previewSrcList,
|
|
129
|
+
"show-index": _ctx.showIndex,
|
|
130
|
+
"keep-style": _ctx.keepStyle,
|
|
131
|
+
onDelete: _ctx.deleteHander
|
|
132
|
+
}, {
|
|
133
|
+
count: withCtx(function(slotScoped) {
|
|
134
|
+
return [renderSlot(_ctx.$slots, "count", {
|
|
135
|
+
index: slotScoped.index
|
|
126
136
|
})];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
function __vue2_injectStyles(context) {
|
|
135
|
-
for (var o in __cssModules) {
|
|
136
|
-
this[o] = __cssModules[o];
|
|
137
|
-
}
|
|
137
|
+
}),
|
|
138
|
+
_: 3
|
|
139
|
+
/* FORWARDED */
|
|
140
|
+
}, 8, ["z-index", "on-switch", "on-close", "url-list", "show-index", "keep-style", "onDelete"])) : createCommentVNode("v-if", true)], 8, ["disabled"]))],
|
|
141
|
+
6
|
|
142
|
+
/* CLASS, STYLE */
|
|
143
|
+
);
|
|
138
144
|
}
|
|
139
|
-
var mobileFirst = /* @__PURE__ */
|
|
140
|
-
return __component__.exports;
|
|
141
|
-
}();
|
|
145
|
+
var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
142
146
|
|
|
143
147
|
export { mobileFirst as default };
|
package/lib/pc.js
CHANGED
|
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/image/vue';
|
|
|
2
2
|
import { defineComponent, Teleport, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import ImageViewer from '@opentinyvue/vue-image-viewer';
|
|
4
4
|
import { iconImageError } from '@opentinyvue/vue-icon';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, renderSlot, createElementVNode, createVNode, toDisplayString, mergeProps, createBlock, Teleport as Teleport$1, withCtx, createCommentVNode } from 'vue';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var originalRender = options.render;
|
|
21
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
-
hook.call(context);
|
|
23
|
-
return originalRender(h, context);
|
|
24
|
-
};
|
|
25
|
-
} else {
|
|
26
|
-
var existing = options.beforeCreate;
|
|
27
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
-
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
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;
|
|
29
24
|
}
|
|
30
|
-
return {
|
|
31
|
-
exports: scriptExports,
|
|
32
|
-
options
|
|
33
|
-
};
|
|
34
25
|
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var _sfc_main = defineComponent({
|
|
37
41
|
components: {
|
|
38
42
|
ImageViewer,
|
|
39
43
|
Teleport,
|
|
@@ -50,70 +54,77 @@ var __vue2_script = defineComponent({
|
|
|
50
54
|
});
|
|
51
55
|
}
|
|
52
56
|
});
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
var _hoisted_1 = {
|
|
58
|
+
class: "tiny-image"
|
|
59
|
+
};
|
|
60
|
+
var _hoisted_2 = /* @__PURE__ */ createElementVNode(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
class: "tiny-image__placeholder"
|
|
64
|
+
},
|
|
65
|
+
null,
|
|
66
|
+
-1
|
|
67
|
+
/* HOISTED */
|
|
68
|
+
);
|
|
69
|
+
var _hoisted_3 = {
|
|
70
|
+
class: "tiny-image__error"
|
|
71
|
+
};
|
|
72
|
+
var _hoisted_4 = {
|
|
73
|
+
class: "tiny-image__error-text"
|
|
74
|
+
};
|
|
75
|
+
var _hoisted_5 = ["src"];
|
|
76
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
77
|
+
var _component_tiny_icon_image_error = resolveComponent("tiny-icon-image-error");
|
|
78
|
+
var _component_image_viewer = resolveComponent("image-viewer");
|
|
79
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [_ctx.state.loading ? renderSlot(_ctx.$slots, "placeholder", {
|
|
80
|
+
key: 0
|
|
81
|
+
}, function() {
|
|
82
|
+
return [_hoisted_2];
|
|
83
|
+
}) : _ctx.state.error ? renderSlot(_ctx.$slots, "error", {
|
|
84
|
+
key: 1
|
|
85
|
+
}, function() {
|
|
86
|
+
return [createElementVNode("div", _hoisted_3, [createVNode(_component_tiny_icon_image_error), createElementVNode(
|
|
87
|
+
"div",
|
|
88
|
+
_hoisted_4,
|
|
89
|
+
toDisplayString(_ctx.t("ui.image.loadFail")),
|
|
90
|
+
1
|
|
91
|
+
/* TEXT */
|
|
92
|
+
)])];
|
|
93
|
+
}) : (openBlock(), createElementBlock("img", mergeProps({
|
|
94
|
+
key: 2,
|
|
95
|
+
class: "tiny-image__inner"
|
|
96
|
+
}, _ctx.$attrs, {
|
|
97
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
98
|
+
return _ctx.clickHandler && _ctx.clickHandler.apply(_ctx, arguments);
|
|
99
|
+
}),
|
|
100
|
+
src: _ctx.state.src,
|
|
101
|
+
style: _ctx.state.getImageStyle,
|
|
71
102
|
class: {
|
|
72
|
-
"tiny-image__inner-center":
|
|
73
|
-
"tiny-image__preview":
|
|
74
|
-
},
|
|
75
|
-
style: _vm.state.getImageStyle,
|
|
76
|
-
attrs: {
|
|
77
|
-
"src": _vm.state.src
|
|
78
|
-
},
|
|
79
|
-
on: {
|
|
80
|
-
"click": _vm.clickHandler
|
|
103
|
+
"tiny-image__inner-center": _ctx.state.getAlignCenter,
|
|
104
|
+
"tiny-image__preview": _ctx.state.getPreview
|
|
81
105
|
}
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, [_vm.state.getPreview && _vm.state.showViewer ? _c("image-viewer", {
|
|
106
|
+
}), null, 16, _hoisted_5)), (openBlock(), createBlock(Teleport$1, {
|
|
107
|
+
disabled: !_ctx.appendToBody,
|
|
108
|
+
to: "body"
|
|
109
|
+
}, [_ctx.state.getPreview && _ctx.state.showViewer ? (openBlock(), createBlock(_component_image_viewer, {
|
|
110
|
+
key: 0,
|
|
88
111
|
ref: "imageViewer",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}], null, true)
|
|
105
|
-
}) : _vm._e()], 1)], 2);
|
|
106
|
-
};
|
|
107
|
-
var staticRenderFns = [];
|
|
108
|
-
var __cssModules = {};
|
|
109
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
110
|
-
function __vue2_injectStyles(context) {
|
|
111
|
-
for (var o in __cssModules) {
|
|
112
|
-
this[o] = __cssModules[o];
|
|
113
|
-
}
|
|
112
|
+
"z-index": _ctx.zIndex,
|
|
113
|
+
"on-switch": _ctx.handleSwitch,
|
|
114
|
+
"on-close": _ctx.closeViewer,
|
|
115
|
+
"url-list": _ctx.previewSrcList,
|
|
116
|
+
"keep-style": _ctx.keepStyle,
|
|
117
|
+
"show-index": _ctx.showIndex
|
|
118
|
+
}, {
|
|
119
|
+
count: withCtx(function(slotScoped) {
|
|
120
|
+
return [renderSlot(_ctx.$slots, "count", {
|
|
121
|
+
index: slotScoped.index
|
|
122
|
+
})];
|
|
123
|
+
}),
|
|
124
|
+
_: 3
|
|
125
|
+
/* FORWARDED */
|
|
126
|
+
}, 8, ["z-index", "on-switch", "on-close", "url-list", "keep-style", "show-index"])) : createCommentVNode("v-if", true)], 8, ["disabled"]))]);
|
|
114
127
|
}
|
|
115
|
-
var pc = /* @__PURE__ */
|
|
116
|
-
return __component__.exports;
|
|
117
|
-
}();
|
|
128
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
118
129
|
|
|
119
130
|
export { pc as default };
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.22.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"module": "./lib/index.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opentinyvue/utils": "~
|
|
12
|
-
"@opentinyvue/vue-common": "~
|
|
13
|
-
"@opentinyvue/vue-icon": "~
|
|
14
|
-
"@opentinyvue/vue-image-viewer": "~
|
|
11
|
+
"@opentinyvue/utils": "~3.22.0",
|
|
12
|
+
"@opentinyvue/vue-common": "~3.22.0",
|
|
13
|
+
"@opentinyvue/vue-icon": "~3.22.0",
|
|
14
|
+
"@opentinyvue/vue-image-viewer": "~3.22.0",
|
|
15
15
|
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
16
16
|
"@opentinyvue/vue-theme": "~3.22.0"
|
|
17
17
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IImageApi } from '@opentinyvue/vue-renderless/types/image.type';
|
|
1
2
|
export declare const $constants: {
|
|
2
3
|
NONE: string;
|
|
3
4
|
CONTAIN: string;
|
|
@@ -71,5 +72,153 @@ export declare const imageProps: {
|
|
|
71
72
|
tiny_theme: StringConstructor;
|
|
72
73
|
tiny_chart_theme: ObjectConstructor;
|
|
73
74
|
};
|
|
74
|
-
declare const _default:
|
|
75
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
76
|
+
_constants: {
|
|
77
|
+
type: ObjectConstructor;
|
|
78
|
+
default: () => {
|
|
79
|
+
NONE: string;
|
|
80
|
+
CONTAIN: string;
|
|
81
|
+
COVER: string;
|
|
82
|
+
FILL: string;
|
|
83
|
+
SCALE_DOWN: string;
|
|
84
|
+
DEFAULT_POPPER_ZINDEX: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
fit: StringConstructor;
|
|
88
|
+
lazy: BooleanConstructor;
|
|
89
|
+
previewSrcList: {
|
|
90
|
+
type: ArrayConstructor;
|
|
91
|
+
default: () => never[];
|
|
92
|
+
};
|
|
93
|
+
scrollContainer: {
|
|
94
|
+
type: (StringConstructor | {
|
|
95
|
+
new (): HTMLElement;
|
|
96
|
+
prototype: HTMLElement;
|
|
97
|
+
})[] | null;
|
|
98
|
+
default: null;
|
|
99
|
+
};
|
|
100
|
+
src: StringConstructor;
|
|
101
|
+
zIndex: {
|
|
102
|
+
type: NumberConstructor;
|
|
103
|
+
default: number;
|
|
104
|
+
};
|
|
105
|
+
showIndex: {
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: boolean;
|
|
108
|
+
};
|
|
109
|
+
showHover: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
default: boolean;
|
|
112
|
+
};
|
|
113
|
+
previewVisible: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: boolean;
|
|
116
|
+
};
|
|
117
|
+
round: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
imageSize: {
|
|
122
|
+
type: NumberConstructor;
|
|
123
|
+
default: number;
|
|
124
|
+
};
|
|
125
|
+
keepStyle: {
|
|
126
|
+
type: BooleanConstructor;
|
|
127
|
+
default: boolean;
|
|
128
|
+
};
|
|
129
|
+
appendToBody: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
132
|
+
};
|
|
133
|
+
tiny_mode: StringConstructor;
|
|
134
|
+
tiny_mode_root: BooleanConstructor;
|
|
135
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
136
|
+
tiny_renderless: FunctionConstructor;
|
|
137
|
+
tiny_theme: StringConstructor;
|
|
138
|
+
tiny_chart_theme: ObjectConstructor;
|
|
139
|
+
}, IImageApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
140
|
+
_constants: {
|
|
141
|
+
type: ObjectConstructor;
|
|
142
|
+
default: () => {
|
|
143
|
+
NONE: string;
|
|
144
|
+
CONTAIN: string;
|
|
145
|
+
COVER: string;
|
|
146
|
+
FILL: string;
|
|
147
|
+
SCALE_DOWN: string;
|
|
148
|
+
DEFAULT_POPPER_ZINDEX: number;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
fit: StringConstructor;
|
|
152
|
+
lazy: BooleanConstructor;
|
|
153
|
+
previewSrcList: {
|
|
154
|
+
type: ArrayConstructor;
|
|
155
|
+
default: () => never[];
|
|
156
|
+
};
|
|
157
|
+
scrollContainer: {
|
|
158
|
+
type: (StringConstructor | {
|
|
159
|
+
new (): HTMLElement;
|
|
160
|
+
prototype: HTMLElement;
|
|
161
|
+
})[] | null;
|
|
162
|
+
default: null;
|
|
163
|
+
};
|
|
164
|
+
src: StringConstructor;
|
|
165
|
+
zIndex: {
|
|
166
|
+
type: NumberConstructor;
|
|
167
|
+
default: number;
|
|
168
|
+
};
|
|
169
|
+
showIndex: {
|
|
170
|
+
type: BooleanConstructor;
|
|
171
|
+
default: boolean;
|
|
172
|
+
};
|
|
173
|
+
showHover: {
|
|
174
|
+
type: BooleanConstructor;
|
|
175
|
+
default: boolean;
|
|
176
|
+
};
|
|
177
|
+
previewVisible: {
|
|
178
|
+
type: BooleanConstructor;
|
|
179
|
+
default: boolean;
|
|
180
|
+
};
|
|
181
|
+
round: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
185
|
+
imageSize: {
|
|
186
|
+
type: NumberConstructor;
|
|
187
|
+
default: number;
|
|
188
|
+
};
|
|
189
|
+
keepStyle: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: boolean;
|
|
192
|
+
};
|
|
193
|
+
appendToBody: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: boolean;
|
|
196
|
+
};
|
|
197
|
+
tiny_mode: StringConstructor;
|
|
198
|
+
tiny_mode_root: BooleanConstructor;
|
|
199
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
200
|
+
tiny_renderless: FunctionConstructor;
|
|
201
|
+
tiny_theme: StringConstructor;
|
|
202
|
+
tiny_chart_theme: ObjectConstructor;
|
|
203
|
+
}>>, {
|
|
204
|
+
zIndex: number;
|
|
205
|
+
lazy: boolean;
|
|
206
|
+
appendToBody: boolean;
|
|
207
|
+
tiny_mode_root: boolean;
|
|
208
|
+
_constants: Record<string, any>;
|
|
209
|
+
round: boolean;
|
|
210
|
+
scrollContainer: {
|
|
211
|
+
type: (StringConstructor | {
|
|
212
|
+
new (): HTMLElement;
|
|
213
|
+
prototype: HTMLElement;
|
|
214
|
+
})[] | null;
|
|
215
|
+
default: null;
|
|
216
|
+
};
|
|
217
|
+
previewVisible: boolean;
|
|
218
|
+
showIndex: boolean;
|
|
219
|
+
keepStyle: boolean;
|
|
220
|
+
previewSrcList: unknown[];
|
|
221
|
+
showHover: boolean;
|
|
222
|
+
imageSize: number;
|
|
223
|
+
}, {}>;
|
|
75
224
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: any
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("@vue/runtime-core").PublicProps>;
|
|
2
2
|
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: any
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("@vue/runtime-core").PublicProps>;
|
|
2
2
|
export default _default;
|