@opentinyvue/vue-filter-box 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 +89 -71
- package/package.json +4 -4
- package/src/pc.vue.d.ts +80 -1
package/lib/index.js
CHANGED
|
@@ -2,37 +2,41 @@ import { renderless, api } from '@opentinyvue/vue-renderless/filter-box/vue';
|
|
|
2
2
|
import { defineComponent, $prefix, setup, $props } from '@opentinyvue/vue-common';
|
|
3
3
|
import { iconDownWard, iconError, iconHelpCircle } from '@opentinyvue/vue-icon';
|
|
4
4
|
import Tooltip from '@opentinyvue/vue-tooltip';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createBlock, withCtx, createVNode, createCommentVNode, withModifiers, resolveDynamicComponent } from 'vue';
|
|
5
6
|
import '@opentinyvue/vue-theme/filter-box/index.css';
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
var
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
9
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
10
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
11
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
12
|
+
t && (r = t);
|
|
13
|
+
var o = 0;
|
|
14
|
+
return function() {
|
|
15
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var originalRender = options.render;
|
|
22
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
23
|
-
hook.call(context);
|
|
24
|
-
return originalRender(h, context);
|
|
25
|
-
};
|
|
26
|
-
} else {
|
|
27
|
-
var existing = options.beforeCreate;
|
|
28
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
29
|
-
}
|
|
18
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19
|
+
}
|
|
20
|
+
function _unsupportedIterableToArray(r, a) {
|
|
21
|
+
if (r) {
|
|
22
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
23
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
24
|
+
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;
|
|
30
25
|
}
|
|
31
|
-
return {
|
|
32
|
-
exports: scriptExports,
|
|
33
|
-
options
|
|
34
|
-
};
|
|
35
26
|
}
|
|
27
|
+
function _arrayLikeToArray(r, a) {
|
|
28
|
+
(null == a || a > r.length) && (a = r.length);
|
|
29
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
33
|
+
var target = sfc.__vccOpts || sfc;
|
|
34
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
35
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
36
|
+
target[key] = val;
|
|
37
|
+
}
|
|
38
|
+
return target;
|
|
39
|
+
};
|
|
36
40
|
|
|
37
41
|
function _extends() {
|
|
38
42
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
@@ -43,7 +47,7 @@ function _extends() {
|
|
|
43
47
|
return n;
|
|
44
48
|
}, _extends.apply(null, arguments);
|
|
45
49
|
}
|
|
46
|
-
var
|
|
50
|
+
var _sfc_main = defineComponent({
|
|
47
51
|
name: $prefix + "FilterBox",
|
|
48
52
|
emits: ["click", "handle-clear"],
|
|
49
53
|
components: {
|
|
@@ -87,51 +91,65 @@ var __vue2_script = defineComponent({
|
|
|
87
91
|
});
|
|
88
92
|
}
|
|
89
93
|
});
|
|
90
|
-
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
var
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
94
|
+
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
95
|
+
var _component_icon_help_circle = resolveComponent("icon-help-circle");
|
|
96
|
+
var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
|
|
97
|
+
var _component_icon_error = resolveComponent("icon-error");
|
|
98
|
+
return openBlock(), createElementBlock(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
class: normalizeClass(["tiny-filter-box", _ctx.disabled && "disabled", _ctx.blank && "is-blank"]),
|
|
102
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
103
|
+
return _ctx.handeClick && _ctx.handeClick.apply(_ctx, arguments);
|
|
104
|
+
})
|
|
105
|
+
},
|
|
106
|
+
[createElementVNode(
|
|
107
|
+
"p",
|
|
108
|
+
{
|
|
109
|
+
class: normalizeClass(["title", _ctx.dropDownVisible && "active"])
|
|
110
|
+
},
|
|
111
|
+
[createElementVNode(
|
|
112
|
+
"label",
|
|
113
|
+
null,
|
|
114
|
+
toDisplayString(_ctx.label),
|
|
115
|
+
1
|
|
116
|
+
/* TEXT */
|
|
117
|
+
), _ctx.tip ? (openBlock(), createBlock(_component_tiny_tooltip, {
|
|
118
|
+
key: 0,
|
|
119
|
+
effect: "light",
|
|
120
|
+
content: _ctx.tip,
|
|
121
|
+
placement: "top"
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(function() {
|
|
124
|
+
return [createVNode(_component_icon_help_circle)];
|
|
125
|
+
}),
|
|
126
|
+
_: 1
|
|
127
|
+
/* STABLE */
|
|
128
|
+
}, 8, ["content"])) : createCommentVNode("v-if", true)],
|
|
129
|
+
2
|
|
130
|
+
/* CLASS */
|
|
131
|
+
), createElementVNode(
|
|
132
|
+
"p",
|
|
133
|
+
{
|
|
134
|
+
class: normalizeClass(["value", ["value", !_ctx.value && _ctx.value !== 0 && "placeholder"]])
|
|
135
|
+
},
|
|
136
|
+
toDisplayString(_ctx.value || _ctx.value === 0 ? _ctx.value : _ctx.placeholder),
|
|
137
|
+
3
|
|
138
|
+
/* TEXT, CLASS */
|
|
139
|
+
), _ctx.value && _ctx.showClose && !_ctx.disabled ? (openBlock(), createBlock(_component_icon_error, {
|
|
140
|
+
key: 0,
|
|
141
|
+
class: "filter-icon-close",
|
|
142
|
+
onClick: withModifiers(_ctx.handleClear, ["stop"])
|
|
143
|
+
}, null, 8, ["onClick"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.expandButtonIcon), {
|
|
144
|
+
key: 1,
|
|
145
|
+
class: normalizeClass(["filter-box-icon", _ctx.dropDownVisible && "is-reverse"])
|
|
146
|
+
}, null, 8, ["class"]))],
|
|
147
|
+
2
|
|
148
|
+
/* CLASS */
|
|
149
|
+
);
|
|
130
150
|
}
|
|
131
|
-
var FilterBox = /* @__PURE__ */
|
|
132
|
-
|
|
133
|
-
}();
|
|
134
|
-
var version = "2.21.0";
|
|
151
|
+
var FilterBox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
152
|
+
var version = "3.21.0";
|
|
135
153
|
FilterBox.install = function(Vue) {
|
|
136
154
|
Vue.component(FilterBox.name, FilterBox);
|
|
137
155
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-filter-box",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
11
|
-
"@opentinyvue/vue-common": "~
|
|
12
|
-
"@opentinyvue/vue-icon": "~
|
|
13
|
-
"@opentinyvue/vue-tooltip": "~
|
|
11
|
+
"@opentinyvue/vue-common": "~3.21.0",
|
|
12
|
+
"@opentinyvue/vue-icon": "~3.21.0",
|
|
13
|
+
"@opentinyvue/vue-tooltip": "~3.21.0",
|
|
14
14
|
"@opentinyvue/vue-theme": "~3.21.0"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,81 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
label: StringConstructor;
|
|
3
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
4
|
+
tip: StringConstructor;
|
|
5
|
+
placeholder: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
showClose: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
disabled: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
dropDownVisible: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
blank: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
tiny_mode: StringConstructor;
|
|
26
|
+
tiny_mode_root: BooleanConstructor;
|
|
27
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
28
|
+
tiny_renderless: FunctionConstructor;
|
|
29
|
+
tiny_theme: StringConstructor;
|
|
30
|
+
tiny_chart_theme: ObjectConstructor;
|
|
31
|
+
}, {
|
|
32
|
+
t: (this: any, path: any, options?: any) => any;
|
|
33
|
+
vm: any;
|
|
34
|
+
f: (props: any, attrs?: {}) => {};
|
|
35
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
36
|
+
d: (props: any) => void;
|
|
37
|
+
dp: (props: any) => void;
|
|
38
|
+
gcls: (key: any) => any;
|
|
39
|
+
m: (...cssClasses: any[]) => string;
|
|
40
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("click" | "handle-clear")[], "click" | "handle-clear", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
41
|
+
label: StringConstructor;
|
|
42
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
43
|
+
tip: StringConstructor;
|
|
44
|
+
placeholder: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
showClose: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
disabled: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
dropDownVisible: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
blank: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
tiny_mode: StringConstructor;
|
|
65
|
+
tiny_mode_root: BooleanConstructor;
|
|
66
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
67
|
+
tiny_renderless: FunctionConstructor;
|
|
68
|
+
tiny_theme: StringConstructor;
|
|
69
|
+
tiny_chart_theme: ObjectConstructor;
|
|
70
|
+
}>> & {
|
|
71
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
"onHandle-clear"?: ((...args: any[]) => any) | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
tiny_mode_root: boolean;
|
|
76
|
+
showClose: boolean;
|
|
77
|
+
placeholder: string;
|
|
78
|
+
blank: boolean;
|
|
79
|
+
dropDownVisible: boolean;
|
|
80
|
+
}, {}>;
|
|
2
81
|
export default _default;
|