@opentinyvue/vue-grid-select 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 +66 -84
- package/package.json +4 -4
- package/src/pc.vue.d.ts +124 -1
package/lib/index.js
CHANGED
|
@@ -2,38 +2,42 @@ import { defineComponent, $prefix, setup } from '@opentinyvue/vue-common';
|
|
|
2
2
|
import { renderless, api } from '@opentinyvue/vue-renderless/grid-select/vue';
|
|
3
3
|
import Grid from '@opentinyvue/vue-grid';
|
|
4
4
|
import BaseSelect from '@opentinyvue/vue-base-select';
|
|
5
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, withModifiers } 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
|
name: $prefix + "GridSelect",
|
|
38
42
|
components: {
|
|
39
43
|
TinyGrid: Grid,
|
|
@@ -111,65 +115,43 @@ var __vue2_script = defineComponent({
|
|
|
111
115
|
});
|
|
112
116
|
}
|
|
113
117
|
});
|
|
114
|
-
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
return _c("tiny-base-select", {
|
|
118
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
119
|
+
var _component_tiny_grid = resolveComponent("tiny-grid");
|
|
120
|
+
var _component_tiny_base_select = resolveComponent("tiny-base-select");
|
|
121
|
+
return openBlock(), createBlock(_component_tiny_base_select, {
|
|
119
122
|
ref: "baseSelectRef",
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
proxy: true
|
|
151
|
-
}]),
|
|
152
|
-
model: {
|
|
153
|
-
value: _vm.state.value,
|
|
154
|
-
callback: function callback($$v) {
|
|
155
|
-
_vm.$set(_vm.state, "value", $$v);
|
|
156
|
-
},
|
|
157
|
-
expression: "state.value"
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
var staticRenderFns = [];
|
|
162
|
-
var __cssModules = {};
|
|
163
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
164
|
-
function __vue2_injectStyles(context) {
|
|
165
|
-
for (var o in __cssModules) {
|
|
166
|
-
this[o] = __cssModules[o];
|
|
167
|
-
}
|
|
123
|
+
class: "tiny-grid-select",
|
|
124
|
+
modelValue: _ctx.state.value,
|
|
125
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
|
|
126
|
+
return _ctx.state.value = $event;
|
|
127
|
+
}),
|
|
128
|
+
multiple: _ctx.multiple,
|
|
129
|
+
filterable: _ctx.filterable,
|
|
130
|
+
"filter-method": _ctx.filter
|
|
131
|
+
}, {
|
|
132
|
+
panel: withCtx(function() {
|
|
133
|
+
return [createVNode(_component_tiny_grid, mergeProps({
|
|
134
|
+
ref: "gridRef",
|
|
135
|
+
"auto-resize": "",
|
|
136
|
+
"row-id": _ctx.valueField,
|
|
137
|
+
"select-config": _ctx.buildSelectConfig(),
|
|
138
|
+
"radio-config": _ctx.buildRadioConfig(),
|
|
139
|
+
"highlight-current-row": true,
|
|
140
|
+
columns: _ctx.state.gridData.columns,
|
|
141
|
+
data: _ctx.state.gridData,
|
|
142
|
+
onSelectAll: _ctx.selectChange,
|
|
143
|
+
onSelectChange: _ctx.selectChange,
|
|
144
|
+
onRadioChange: _ctx.radioChange,
|
|
145
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(function() {
|
|
146
|
+
}, ["stop"]))
|
|
147
|
+
}, _ctx.gridOp), null, 16, ["row-id", "select-config", "radio-config", "columns", "data", "onSelectAll", "onSelectChange", "onRadioChange"])];
|
|
148
|
+
}),
|
|
149
|
+
_: 1
|
|
150
|
+
/* STABLE */
|
|
151
|
+
}, 8, ["modelValue", "multiple", "filterable", "filter-method"]);
|
|
168
152
|
}
|
|
169
|
-
var GridSelect = /* @__PURE__ */
|
|
170
|
-
|
|
171
|
-
}();
|
|
172
|
-
var version = "2.21.0";
|
|
153
|
+
var GridSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
154
|
+
var version = "3.21.0";
|
|
173
155
|
GridSelect.install = function(Vue) {
|
|
174
156
|
Vue.component(GridSelect.name, GridSelect);
|
|
175
157
|
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-grid-select",
|
|
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-base-select": "~
|
|
13
|
-
"@opentinyvue/vue-grid": "~
|
|
12
|
+
"@opentinyvue/vue-base-select": "~3.21.0",
|
|
13
|
+
"@opentinyvue/vue-grid": "~3.21.0"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"types": "index.d.ts",
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,125 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
clearable: BooleanConstructor;
|
|
3
|
+
extraQueryParams: {
|
|
4
|
+
type: (StringConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | NumberConstructor)[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
filterable: BooleanConstructor;
|
|
8
|
+
filterMethod: FunctionConstructor;
|
|
9
|
+
gridOp: {
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
initLabel: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
initQuery: FunctionConstructor;
|
|
18
|
+
modelValue: {};
|
|
19
|
+
multiple: BooleanConstructor;
|
|
20
|
+
radioConfig: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default(): {
|
|
23
|
+
checkMethod(): true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
remote: BooleanConstructor;
|
|
27
|
+
remoteConfig: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
default(): {
|
|
30
|
+
showIcon: boolean;
|
|
31
|
+
clearData: boolean;
|
|
32
|
+
autoSearch: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
remoteMethod: FunctionConstructor;
|
|
36
|
+
reserveKeyword: BooleanConstructor;
|
|
37
|
+
selectConfig: {
|
|
38
|
+
type: ObjectConstructor;
|
|
39
|
+
default(): {
|
|
40
|
+
checkMethod(): true;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
textField: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
valueField: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
t: (this: any, path: any, options?: any) => any;
|
|
53
|
+
vm: any;
|
|
54
|
+
f: (props: any, attrs?: {}) => {};
|
|
55
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
56
|
+
d: (props: any) => void;
|
|
57
|
+
dp: (props: any) => void;
|
|
58
|
+
gcls: (key: any) => any;
|
|
59
|
+
m: (...cssClasses: any[]) => string;
|
|
60
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
61
|
+
clearable: BooleanConstructor;
|
|
62
|
+
extraQueryParams: {
|
|
63
|
+
type: (StringConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | NumberConstructor)[];
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
filterable: BooleanConstructor;
|
|
67
|
+
filterMethod: FunctionConstructor;
|
|
68
|
+
gridOp: {
|
|
69
|
+
type: ObjectConstructor;
|
|
70
|
+
default: () => {};
|
|
71
|
+
};
|
|
72
|
+
initLabel: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
initQuery: FunctionConstructor;
|
|
77
|
+
modelValue: {};
|
|
78
|
+
multiple: BooleanConstructor;
|
|
79
|
+
radioConfig: {
|
|
80
|
+
type: ObjectConstructor;
|
|
81
|
+
default(): {
|
|
82
|
+
checkMethod(): true;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
remote: BooleanConstructor;
|
|
86
|
+
remoteConfig: {
|
|
87
|
+
type: ObjectConstructor;
|
|
88
|
+
default(): {
|
|
89
|
+
showIcon: boolean;
|
|
90
|
+
clearData: boolean;
|
|
91
|
+
autoSearch: boolean;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
remoteMethod: FunctionConstructor;
|
|
95
|
+
reserveKeyword: BooleanConstructor;
|
|
96
|
+
selectConfig: {
|
|
97
|
+
type: ObjectConstructor;
|
|
98
|
+
default(): {
|
|
99
|
+
checkMethod(): true;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
textField: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
valueField: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
}>>, {
|
|
111
|
+
textField: string;
|
|
112
|
+
valueField: string;
|
|
113
|
+
clearable: boolean;
|
|
114
|
+
multiple: boolean;
|
|
115
|
+
remote: boolean;
|
|
116
|
+
remoteConfig: Record<string, any>;
|
|
117
|
+
filterable: boolean;
|
|
118
|
+
reserveKeyword: boolean;
|
|
119
|
+
gridOp: Record<string, any>;
|
|
120
|
+
selectConfig: Record<string, any>;
|
|
121
|
+
radioConfig: Record<string, any>;
|
|
122
|
+
extraQueryParams: string | number | boolean | Record<string, any> | unknown[];
|
|
123
|
+
initLabel: string;
|
|
124
|
+
}, {}>;
|
|
2
125
|
export default _default;
|