@opentinyvue/vue-card-template 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 +134 -110
- package/package.json +3 -3
- package/src/index.d.ts +47 -1
- package/src/pc.vue.d.ts +46 -1
package/lib/index.js
CHANGED
package/lib/pc.js
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import { renderless, api } from '@opentinyvue/vue-renderless/card-template/vue';
|
|
2
2
|
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import { iconEdit, iconHelp, iconMore, iconClose, iconExcel } from '@opentinyvue/vue-icon';
|
|
4
|
+
import { openBlock, createElementBlock, normalizeClass, renderSlot, createElementVNode, toDisplayString, Fragment, renderList, withModifiers, createBlock, resolveDynamicComponent, withDirectives, createTextVNode, vShow, createCommentVNode, normalizeStyle } 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
|
props: [].concat(props, ["tools", "header", "bodyStyle", "headerLine"]),
|
|
37
41
|
setup: function setup$1(props2, context) {
|
|
38
42
|
return setup({
|
|
@@ -50,91 +54,111 @@ var __vue2_script = defineComponent({
|
|
|
50
54
|
IconExcel: iconExcel()
|
|
51
55
|
}
|
|
52
56
|
});
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
}, [_c(item.icon, {
|
|
86
|
-
tag: "component",
|
|
87
|
-
staticClass: "tiny-svg-size"
|
|
88
|
-
})], 1);
|
|
89
|
-
}), 0), _c("div", {
|
|
90
|
-
directives: [{
|
|
91
|
-
name: "show",
|
|
92
|
-
rawName: "v-show",
|
|
93
|
-
value: _vm.state.moreTools && _vm.state.moreTools.length && _vm.state.showMoreTools,
|
|
94
|
-
expression: "state.moreTools && state.moreTools.length && state.showMoreTools"
|
|
95
|
-
}],
|
|
96
|
-
ref: "selector",
|
|
97
|
-
staticClass: "tiny-selector tiny-card-template__more",
|
|
98
|
-
on: {
|
|
99
|
-
"mouseleave": function mouseleave($event) {
|
|
100
|
-
_vm.state.showMoreTools = false;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}, [_c("ul", {
|
|
104
|
-
staticClass: "tiny-poplist"
|
|
105
|
-
}, _vm._l(_vm.state.moreTools, function(item, index) {
|
|
106
|
-
return _c("li", {
|
|
107
|
-
key: index,
|
|
108
|
-
class: {
|
|
109
|
-
"select-pre": _vm.state.isEnter
|
|
57
|
+
var _hoisted_1 = {
|
|
58
|
+
ref: "item",
|
|
59
|
+
class: "tiny-card-template"
|
|
60
|
+
};
|
|
61
|
+
var _hoisted_2 = {
|
|
62
|
+
class: "tiny-card-template__title"
|
|
63
|
+
};
|
|
64
|
+
var _hoisted_3 = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "tiny-card-template__tools"
|
|
67
|
+
};
|
|
68
|
+
var _hoisted_4 = {
|
|
69
|
+
class: "tiny-card-template__list"
|
|
70
|
+
};
|
|
71
|
+
var _hoisted_5 = ["title", "onClick"];
|
|
72
|
+
var _hoisted_6 = {
|
|
73
|
+
class: "tiny-poplist"
|
|
74
|
+
};
|
|
75
|
+
var _hoisted_7 = ["title", "onClick"];
|
|
76
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
77
|
+
return openBlock(), createElementBlock(
|
|
78
|
+
"div",
|
|
79
|
+
_hoisted_1,
|
|
80
|
+
[_ctx.slots.header || _ctx.header || _ctx.tools && _ctx.tools.length ? (openBlock(), createElementBlock(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
key: 0,
|
|
84
|
+
class: normalizeClass([{
|
|
85
|
+
"is-line": _ctx.headerLine
|
|
86
|
+
}, "tiny-card-template__header"])
|
|
110
87
|
},
|
|
111
|
-
|
|
112
|
-
|
|
88
|
+
[renderSlot(_ctx.$slots, "header", {}, function() {
|
|
89
|
+
return [createElementVNode(
|
|
90
|
+
"span",
|
|
91
|
+
_hoisted_2,
|
|
92
|
+
toDisplayString(_ctx.header),
|
|
93
|
+
1
|
|
94
|
+
/* TEXT */
|
|
95
|
+
)];
|
|
96
|
+
}), _ctx.tools && _ctx.tools.length ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("ul", _hoisted_4, [(openBlock(true), createElementBlock(
|
|
97
|
+
Fragment,
|
|
98
|
+
null,
|
|
99
|
+
renderList(_ctx.state.currentTools, function(item, index) {
|
|
100
|
+
return openBlock(), createElementBlock("li", {
|
|
101
|
+
key: index,
|
|
102
|
+
title: item.title,
|
|
103
|
+
onClick: withModifiers(item.click, ["stop"])
|
|
104
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), {
|
|
105
|
+
class: "tiny-svg-size"
|
|
106
|
+
}))], 8, _hoisted_5);
|
|
107
|
+
}),
|
|
108
|
+
128
|
|
109
|
+
/* KEYED_FRAGMENT */
|
|
110
|
+
))]), withDirectives(createElementVNode(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
ref: "selector",
|
|
114
|
+
class: "tiny-selector tiny-card-template__more",
|
|
115
|
+
onMouseleave: _cache[0] || (_cache[0] = function($event) {
|
|
116
|
+
return _ctx.state.showMoreTools = false;
|
|
117
|
+
})
|
|
118
|
+
},
|
|
119
|
+
[createElementVNode("ul", _hoisted_6, [(openBlock(true), createElementBlock(
|
|
120
|
+
Fragment,
|
|
121
|
+
null,
|
|
122
|
+
renderList(_ctx.state.moreTools, function(item, index) {
|
|
123
|
+
return openBlock(), createElementBlock("li", {
|
|
124
|
+
key: index,
|
|
125
|
+
title: item.title,
|
|
126
|
+
class: normalizeClass({
|
|
127
|
+
"select-pre": _ctx.state.isEnter
|
|
128
|
+
}),
|
|
129
|
+
onClick: function onClick($event) {
|
|
130
|
+
return _ctx.toolClick(item.click);
|
|
131
|
+
}
|
|
132
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), {
|
|
133
|
+
class: "tiny-svg-size"
|
|
134
|
+
})), createTextVNode(
|
|
135
|
+
" " + toDisplayString(item.title),
|
|
136
|
+
1
|
|
137
|
+
/* TEXT */
|
|
138
|
+
)], 10, _hoisted_7);
|
|
139
|
+
}),
|
|
140
|
+
128
|
|
141
|
+
/* KEYED_FRAGMENT */
|
|
142
|
+
))])],
|
|
143
|
+
544
|
|
144
|
+
/* NEED_HYDRATION, NEED_PATCH */
|
|
145
|
+
), [[vShow, _ctx.state.moreTools && _ctx.state.moreTools.length && _ctx.state.showMoreTools]])])) : createCommentVNode("v-if", true)],
|
|
146
|
+
2
|
|
147
|
+
/* CLASS */
|
|
148
|
+
)) : createCommentVNode("v-if", true), createElementVNode(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
style: normalizeStyle(_ctx.bodyStyle),
|
|
152
|
+
class: "tiny-card-template__body"
|
|
113
153
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
staticClass: "tiny-svg-size"
|
|
122
|
-
}), _vm._v(" " + _vm._s(item.title) + " ")], 1);
|
|
123
|
-
}), 0)])]) : _vm._e()], 2) : _vm._e(), _c("div", {
|
|
124
|
-
staticClass: "tiny-card-template__body",
|
|
125
|
-
style: _vm.bodyStyle
|
|
126
|
-
}, [_vm._t("default")], 2), _vm._t("footer")], 2);
|
|
127
|
-
};
|
|
128
|
-
var staticRenderFns = [];
|
|
129
|
-
var __cssModules = {};
|
|
130
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
131
|
-
function __vue2_injectStyles(context) {
|
|
132
|
-
for (var o in __cssModules) {
|
|
133
|
-
this[o] = __cssModules[o];
|
|
134
|
-
}
|
|
154
|
+
[renderSlot(_ctx.$slots, "default")],
|
|
155
|
+
4
|
|
156
|
+
/* STYLE */
|
|
157
|
+
), renderSlot(_ctx.$slots, "footer")],
|
|
158
|
+
512
|
|
159
|
+
/* NEED_PATCH */
|
|
160
|
+
);
|
|
135
161
|
}
|
|
136
|
-
var pc = /* @__PURE__ */
|
|
137
|
-
return __component__.exports;
|
|
138
|
-
}();
|
|
162
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
139
163
|
|
|
140
164
|
export { pc as default };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-card-template",
|
|
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": "~
|
|
11
|
-
"@opentinyvue/vue-icon": "~
|
|
10
|
+
"@opentinyvue/vue-common": "~3.21.0",
|
|
11
|
+
"@opentinyvue/vue-icon": "~3.21.0",
|
|
12
12
|
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
13
13
|
"@opentinyvue/vue-theme": "~3.21.0"
|
|
14
14
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
_constants: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
MOREICON: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
tools: ArrayConstructor;
|
|
9
|
+
header: StringConstructor;
|
|
10
|
+
bodyStyle: ObjectConstructor;
|
|
11
|
+
headerLine: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
tiny_mode: StringConstructor;
|
|
16
|
+
tiny_mode_root: BooleanConstructor;
|
|
17
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
18
|
+
tiny_renderless: FunctionConstructor;
|
|
19
|
+
tiny_theme: StringConstructor;
|
|
20
|
+
tiny_chart_theme: ObjectConstructor;
|
|
21
|
+
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
24
|
+
_constants: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
default: () => {
|
|
27
|
+
MOREICON: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
tools: ArrayConstructor;
|
|
31
|
+
header: StringConstructor;
|
|
32
|
+
bodyStyle: ObjectConstructor;
|
|
33
|
+
headerLine: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
tiny_mode: StringConstructor;
|
|
38
|
+
tiny_mode_root: BooleanConstructor;
|
|
39
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
40
|
+
tiny_renderless: FunctionConstructor;
|
|
41
|
+
tiny_theme: StringConstructor;
|
|
42
|
+
tiny_chart_theme: ObjectConstructor;
|
|
43
|
+
}>>, {
|
|
44
|
+
tiny_mode_root: boolean;
|
|
45
|
+
_constants: Record<string, any>;
|
|
46
|
+
headerLine: boolean;
|
|
47
|
+
}, {}>;
|
|
2
48
|
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
|
+
header?: 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
|
+
tools?: any;
|
|
11
|
+
bodyStyle?: any;
|
|
12
|
+
headerLine?: any;
|
|
13
|
+
}>, {
|
|
14
|
+
t: (this: any, path: any, options?: any) => any;
|
|
15
|
+
vm: any;
|
|
16
|
+
f: (props: any, attrs?: {}) => {};
|
|
17
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
18
|
+
d: (props: any) => void;
|
|
19
|
+
dp: (props: any) => void;
|
|
20
|
+
gcls: (key: any) => any;
|
|
21
|
+
m: (...cssClasses: any[]) => string;
|
|
22
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
23
|
+
header?: any;
|
|
24
|
+
tiny_mode?: any;
|
|
25
|
+
tiny_mode_root?: any;
|
|
26
|
+
tiny_template?: any;
|
|
27
|
+
tiny_renderless?: any;
|
|
28
|
+
_constants?: any;
|
|
29
|
+
tiny_theme?: any;
|
|
30
|
+
tiny_chart_theme?: any;
|
|
31
|
+
tools?: any;
|
|
32
|
+
bodyStyle?: any;
|
|
33
|
+
headerLine?: any;
|
|
34
|
+
}>>>, {
|
|
35
|
+
readonly header?: any;
|
|
36
|
+
readonly tiny_mode?: any;
|
|
37
|
+
readonly tiny_mode_root?: any;
|
|
38
|
+
readonly tiny_template?: any;
|
|
39
|
+
readonly tiny_renderless?: any;
|
|
40
|
+
readonly _constants?: any;
|
|
41
|
+
readonly tiny_theme?: any;
|
|
42
|
+
readonly tiny_chart_theme?: any;
|
|
43
|
+
readonly tools?: any;
|
|
44
|
+
readonly bodyStyle?: any;
|
|
45
|
+
readonly headerLine?: any;
|
|
46
|
+
}, {}>;
|
|
2
47
|
export default _default;
|