@opentinyvue/vue-dept 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 +353 -240
- package/package.json +9 -9
- package/src/index.d.ts +67 -1
- package/src/pc.vue.d.ts +72 -1
package/lib/index.js
CHANGED
package/lib/pc.js
CHANGED
|
@@ -7,38 +7,42 @@ import Col from '@opentinyvue/vue-col';
|
|
|
7
7
|
import DialogBox from '@opentinyvue/vue-dialog-box';
|
|
8
8
|
import Select from '@opentinyvue/vue-select';
|
|
9
9
|
import Option from '@opentinyvue/vue-option';
|
|
10
|
+
import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createTextVNode, Fragment, renderList, createBlock, renderSlot } from 'vue';
|
|
10
11
|
|
|
11
|
-
function
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
13
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
14
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
15
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
16
|
+
t && (r = t);
|
|
17
|
+
var o = 0;
|
|
18
|
+
return function() {
|
|
19
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
20
|
+
};
|
|
17
21
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var originalRender = options.render;
|
|
26
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
27
|
-
hook.call(context);
|
|
28
|
-
return originalRender(h, context);
|
|
29
|
-
};
|
|
30
|
-
} else {
|
|
31
|
-
var existing = options.beforeCreate;
|
|
32
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
33
|
-
}
|
|
22
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
23
|
+
}
|
|
24
|
+
function _unsupportedIterableToArray(r, a) {
|
|
25
|
+
if (r) {
|
|
26
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
27
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
28
|
+
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;
|
|
34
29
|
}
|
|
35
|
-
return {
|
|
36
|
-
exports: scriptExports,
|
|
37
|
-
options
|
|
38
|
-
};
|
|
39
30
|
}
|
|
31
|
+
function _arrayLikeToArray(r, a) {
|
|
32
|
+
(null == a || a > r.length) && (a = r.length);
|
|
33
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
34
|
+
return n;
|
|
35
|
+
}
|
|
36
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
37
|
+
var target = sfc.__vccOpts || sfc;
|
|
38
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
39
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
40
|
+
target[key] = val;
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
};
|
|
40
44
|
|
|
41
|
-
var
|
|
45
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
46
|
components: {
|
|
43
47
|
TinyInput: Input,
|
|
44
48
|
TinyDialogBox: DialogBox,
|
|
@@ -59,221 +63,330 @@ var __vue2_script = defineComponent({
|
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
});
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return [_c("icon-popup", {
|
|
80
|
-
staticClass: "tiny-input__icon tiny-svg-icon",
|
|
81
|
-
on: {
|
|
82
|
-
"click": _vm.openDialog
|
|
83
|
-
}
|
|
84
|
-
})];
|
|
85
|
-
},
|
|
86
|
-
proxy: true
|
|
87
|
-
}]),
|
|
88
|
-
model: {
|
|
89
|
-
value: _vm.state.display,
|
|
90
|
-
callback: function callback($$v) {
|
|
91
|
-
_vm.$set(_vm.state, "display", $$v);
|
|
92
|
-
},
|
|
93
|
-
expression: "state.display"
|
|
94
|
-
}
|
|
95
|
-
}), _c("tiny-dialog-box", {
|
|
96
|
-
staticClass: "tiny-dept",
|
|
97
|
-
attrs: {
|
|
98
|
-
"visible": _vm.state.open,
|
|
99
|
-
"close-on-click-modal": false,
|
|
100
|
-
"width": "550px",
|
|
101
|
-
"append-to-body": "",
|
|
102
|
-
"title": _vm.title
|
|
103
|
-
},
|
|
104
|
-
on: {
|
|
105
|
-
"update:visible": function updateVisible($event) {
|
|
106
|
-
_vm.state.open = $event;
|
|
107
|
-
},
|
|
108
|
-
"close": _vm.closeDialog
|
|
109
|
-
},
|
|
110
|
-
scopedSlots: _vm._u([{
|
|
111
|
-
key: "footer",
|
|
112
|
-
fn: function fn() {
|
|
113
|
-
return [_c("span", {
|
|
114
|
-
staticClass: "tiny-toolbar"
|
|
115
|
-
}, [_c("button", {
|
|
116
|
-
staticClass: "tiny-button tiny-button--primary",
|
|
117
|
-
attrs: {
|
|
118
|
-
"type": "button"
|
|
119
|
-
},
|
|
120
|
-
on: {
|
|
121
|
-
"click": _vm.confirm
|
|
122
|
-
}
|
|
123
|
-
}, [_c("span", [_vm._v(_vm._s(_vm.t("ui.base.confirm")))])]), _c("button", {
|
|
124
|
-
staticClass: "tiny-button tiny-button--default",
|
|
125
|
-
attrs: {
|
|
126
|
-
"type": "button"
|
|
127
|
-
},
|
|
128
|
-
on: {
|
|
129
|
-
"click": _vm.cancel
|
|
130
|
-
}
|
|
131
|
-
}, [_c("span", [_vm._v(_vm._s(_vm.t("ui.base.cancel")))])])])];
|
|
132
|
-
},
|
|
133
|
-
proxy: true
|
|
134
|
-
}])
|
|
135
|
-
}, [_c("tiny-row", {
|
|
136
|
-
staticClass: "tiny-dept__search"
|
|
137
|
-
}, [_c("tiny-col", {
|
|
138
|
-
staticClass: "tiny-dept__label",
|
|
139
|
-
attrs: {
|
|
140
|
-
"title": _vm.t("ui.dept.search"),
|
|
141
|
-
"span": 3
|
|
142
|
-
}
|
|
143
|
-
}, [_vm._v(" " + _vm._s(_vm.t("ui.dept.search")) + " ")]), _c("tiny-col", {
|
|
144
|
-
attrs: {
|
|
145
|
-
"span": 5
|
|
146
|
-
}
|
|
147
|
-
}, [_c("tiny-select", {
|
|
148
|
-
staticClass: "tiny-detp__select",
|
|
149
|
-
attrs: {
|
|
150
|
-
"placement": "bottom-start",
|
|
151
|
-
"loading": _vm.state.loading,
|
|
152
|
-
"placeholder": _vm.t("ui.dept.input"),
|
|
153
|
-
"filterable": "",
|
|
154
|
-
"clearable": "",
|
|
155
|
-
"remote": "",
|
|
156
|
-
"remote-method": _vm.searchMethod
|
|
157
|
-
},
|
|
158
|
-
on: {
|
|
159
|
-
"change": _vm.searchChange,
|
|
160
|
-
"clear": function clear($event) {
|
|
161
|
-
return _vm.searchMethod("");
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
model: {
|
|
165
|
-
value: _vm.state.searchValue,
|
|
166
|
-
callback: function callback($$v) {
|
|
167
|
-
_vm.$set(_vm.state, "searchValue", $$v);
|
|
168
|
-
},
|
|
169
|
-
expression: "state.searchValue"
|
|
170
|
-
}
|
|
171
|
-
}, [_c("li", {
|
|
172
|
-
staticClass: "tiny-option tiny-select-dropdown__item",
|
|
173
|
-
staticStyle: {
|
|
174
|
-
"background": "#f1f1f1",
|
|
175
|
-
"cursor": "auto",
|
|
176
|
-
"border-bottom": "solid 1px #d9d9d9",
|
|
177
|
-
"box-shadow": "rgb(241, 241, 241) 0px -6px 0px 6px"
|
|
178
|
-
}
|
|
179
|
-
}, [_c("span", {
|
|
180
|
-
staticStyle: {
|
|
181
|
-
"float": "left",
|
|
182
|
-
"font-size": "12px"
|
|
183
|
-
}
|
|
184
|
-
}, [_vm._v(_vm._s(_vm.t("ui.dept.code")))]), _c("span", {
|
|
185
|
-
staticStyle: {
|
|
186
|
-
"float": "right"
|
|
187
|
-
}
|
|
188
|
-
}, [_vm._v(_vm._s(_vm.t("ui.dept.name")))])]), _vm._l(_vm.state.searchOptions, function(option, index) {
|
|
189
|
-
return _c("tiny-option", {
|
|
190
|
-
key: index,
|
|
191
|
-
attrs: {
|
|
192
|
-
"label": option.hrName,
|
|
193
|
-
"value": option.hrCode
|
|
194
|
-
}
|
|
195
|
-
}, [_c("span", {
|
|
196
|
-
staticStyle: {
|
|
197
|
-
"float": "left",
|
|
198
|
-
"font-size": "12px"
|
|
199
|
-
}
|
|
200
|
-
}, [_vm._v(_vm._s(option.hrCode))]), _c("span", {
|
|
201
|
-
staticStyle: {
|
|
202
|
-
"float": "right",
|
|
203
|
-
"color": "#8492a6",
|
|
204
|
-
"font-size": "12px"
|
|
205
|
-
}
|
|
206
|
-
}, [_vm._v(_vm._s(option.hrName))])]);
|
|
207
|
-
})], 2)], 1)], 1), _vm._l(_vm.deptState, function(dept, index) {
|
|
208
|
-
return _c("tiny-row", {
|
|
209
|
-
key: index,
|
|
210
|
-
staticClass: "tiny-dept__item"
|
|
211
|
-
}, [_c("tiny-col", {
|
|
212
|
-
staticClass: "tiny-dept__label",
|
|
213
|
-
attrs: {
|
|
214
|
-
"title": _vm.t("ui.dept." + dept.title),
|
|
215
|
-
"span": 3
|
|
216
|
-
}
|
|
217
|
-
}, [_vm._v(" " + _vm._s(_vm.t("ui.dept." + dept.title)) + " ")]), _c("tiny-col", {
|
|
218
|
-
attrs: {
|
|
219
|
-
"span": 9
|
|
220
|
-
}
|
|
221
|
-
}, [_c("tiny-select", {
|
|
222
|
-
ref: "select" + index,
|
|
223
|
-
refInFor: true,
|
|
224
|
-
staticClass: "tiny-detp__select",
|
|
225
|
-
attrs: {
|
|
226
|
-
"loading": _vm.state.loading,
|
|
227
|
-
"filterable": "",
|
|
228
|
-
"default-first-option": "",
|
|
229
|
-
"clearable": "",
|
|
230
|
-
"disabled": !!index && dept.disable
|
|
231
|
-
},
|
|
232
|
-
on: {
|
|
233
|
-
"visible-change": function visibleChange($event) {
|
|
234
|
-
return _vm.getCurrentList(index, $event);
|
|
235
|
-
},
|
|
236
|
-
"change": function change($event) {
|
|
237
|
-
return _vm.selectChange({
|
|
238
|
-
level: index,
|
|
239
|
-
value: $event
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
model: {
|
|
244
|
-
value: dept.value,
|
|
245
|
-
callback: function callback($$v) {
|
|
246
|
-
_vm.$set(dept, "value", $$v);
|
|
247
|
-
},
|
|
248
|
-
expression: "dept.value"
|
|
249
|
-
}
|
|
250
|
-
}, _vm._l(dept.options, function(option) {
|
|
251
|
-
return _c("tiny-option", {
|
|
252
|
-
key: option.hrCode,
|
|
253
|
-
attrs: {
|
|
254
|
-
"label": option.hrName,
|
|
255
|
-
"value": option.hrCode
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
}), 1)], 1)], 1);
|
|
259
|
-
}), _c("tiny-row", [_c("p", {
|
|
260
|
-
staticClass: "tiny-dept__label is-selected"
|
|
261
|
-
}, [_vm._v(" " + _vm._s(_vm.t("ui.dept.selected")) + " ")]), _c("p", {
|
|
262
|
-
staticClass: "tiny-dept__selected-info"
|
|
263
|
-
}, [_vm._v(" " + _vm._s(_vm.state.labels.join(" > ")) + " ")]), _vm._t("hrapprover", null, {
|
|
264
|
-
"slotScope": _vm.state
|
|
265
|
-
})], 2)], 2)], 1);
|
|
66
|
+
var _hoisted_1 = {
|
|
67
|
+
class: "tiny-dept"
|
|
68
|
+
};
|
|
69
|
+
var _hoisted_2 = {
|
|
70
|
+
class: "tiny-option tiny-select-dropdown__item",
|
|
71
|
+
style: {
|
|
72
|
+
"background": "#f1f1f1",
|
|
73
|
+
"cursor": "auto",
|
|
74
|
+
"border-bottom": "solid 1px #d9d9d9",
|
|
75
|
+
"box-shadow": "rgb(241, 241, 241) 0px -6px 0px 6px"
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var _hoisted_3 = {
|
|
79
|
+
style: {
|
|
80
|
+
"float": "left",
|
|
81
|
+
"font-size": "12px"
|
|
82
|
+
}
|
|
266
83
|
};
|
|
267
|
-
var
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
function __vue2_injectStyles(context) {
|
|
271
|
-
for (var o in __cssModules) {
|
|
272
|
-
this[o] = __cssModules[o];
|
|
84
|
+
var _hoisted_4 = {
|
|
85
|
+
style: {
|
|
86
|
+
"float": "right"
|
|
273
87
|
}
|
|
88
|
+
};
|
|
89
|
+
var _hoisted_5 = {
|
|
90
|
+
style: {
|
|
91
|
+
"float": "left",
|
|
92
|
+
"font-size": "12px"
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var _hoisted_6 = {
|
|
96
|
+
style: {
|
|
97
|
+
"float": "right",
|
|
98
|
+
"color": "#8492a6",
|
|
99
|
+
"font-size": "12px"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var _hoisted_7 = {
|
|
103
|
+
class: "tiny-dept__label is-selected"
|
|
104
|
+
};
|
|
105
|
+
var _hoisted_8 = {
|
|
106
|
+
class: "tiny-dept__selected-info"
|
|
107
|
+
};
|
|
108
|
+
var _hoisted_9 = {
|
|
109
|
+
class: "tiny-toolbar"
|
|
110
|
+
};
|
|
111
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
112
|
+
var _component_icon_popup = resolveComponent("icon-popup");
|
|
113
|
+
var _component_tiny_input = resolveComponent("tiny-input");
|
|
114
|
+
var _component_tiny_col = resolveComponent("tiny-col");
|
|
115
|
+
var _component_tiny_option = resolveComponent("tiny-option");
|
|
116
|
+
var _component_tiny_select = resolveComponent("tiny-select");
|
|
117
|
+
var _component_tiny_row = resolveComponent("tiny-row");
|
|
118
|
+
var _component_tiny_dialog_box = resolveComponent("tiny-dialog-box");
|
|
119
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_tiny_input, {
|
|
120
|
+
tiny_mode: "pc",
|
|
121
|
+
size: _ctx.size,
|
|
122
|
+
modelValue: _ctx.state.display,
|
|
123
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
|
|
124
|
+
return _ctx.state.display = $event;
|
|
125
|
+
}),
|
|
126
|
+
disabled: _ctx.disabled,
|
|
127
|
+
readonly: "",
|
|
128
|
+
"display-only": _ctx.displayOnly
|
|
129
|
+
}, {
|
|
130
|
+
suffix: withCtx(function() {
|
|
131
|
+
return [createVNode(_component_icon_popup, {
|
|
132
|
+
class: "tiny-input__icon tiny-svg-icon",
|
|
133
|
+
onClick: _ctx.openDialog
|
|
134
|
+
}, null, 8, ["onClick"])];
|
|
135
|
+
}),
|
|
136
|
+
_: 1
|
|
137
|
+
/* STABLE */
|
|
138
|
+
}, 8, ["size", "modelValue", "disabled", "display-only"]), createVNode(_component_tiny_dialog_box, {
|
|
139
|
+
class: "tiny-dept",
|
|
140
|
+
visible: _ctx.state.open,
|
|
141
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = function($event) {
|
|
142
|
+
return _ctx.state.open = $event;
|
|
143
|
+
}),
|
|
144
|
+
"close-on-click-modal": false,
|
|
145
|
+
width: "550px",
|
|
146
|
+
"append-to-body": "",
|
|
147
|
+
onClose: _ctx.closeDialog,
|
|
148
|
+
title: _ctx.title
|
|
149
|
+
}, {
|
|
150
|
+
footer: withCtx(function() {
|
|
151
|
+
return [createElementVNode("span", _hoisted_9, [createElementVNode("button", {
|
|
152
|
+
type: "button",
|
|
153
|
+
onClick: _cache[3] || (_cache[3] = function() {
|
|
154
|
+
return _ctx.confirm && _ctx.confirm.apply(_ctx, arguments);
|
|
155
|
+
}),
|
|
156
|
+
class: "tiny-button tiny-button--primary"
|
|
157
|
+
}, [createElementVNode(
|
|
158
|
+
"span",
|
|
159
|
+
null,
|
|
160
|
+
toDisplayString(_ctx.t("ui.base.confirm")),
|
|
161
|
+
1
|
|
162
|
+
/* TEXT */
|
|
163
|
+
)]), createElementVNode("button", {
|
|
164
|
+
type: "button",
|
|
165
|
+
onClick: _cache[4] || (_cache[4] = function() {
|
|
166
|
+
return _ctx.cancel && _ctx.cancel.apply(_ctx, arguments);
|
|
167
|
+
}),
|
|
168
|
+
class: "tiny-button tiny-button--default"
|
|
169
|
+
}, [createElementVNode(
|
|
170
|
+
"span",
|
|
171
|
+
null,
|
|
172
|
+
toDisplayString(_ctx.t("ui.base.cancel")),
|
|
173
|
+
1
|
|
174
|
+
/* TEXT */
|
|
175
|
+
)])])];
|
|
176
|
+
}),
|
|
177
|
+
default: withCtx(function() {
|
|
178
|
+
return [createVNode(_component_tiny_row, {
|
|
179
|
+
class: "tiny-dept__search"
|
|
180
|
+
}, {
|
|
181
|
+
default: withCtx(function() {
|
|
182
|
+
return [createVNode(_component_tiny_col, {
|
|
183
|
+
class: "tiny-dept__label",
|
|
184
|
+
title: _ctx.t("ui.dept.search"),
|
|
185
|
+
span: 3
|
|
186
|
+
}, {
|
|
187
|
+
default: withCtx(function() {
|
|
188
|
+
return [createTextVNode(
|
|
189
|
+
toDisplayString(_ctx.t("ui.dept.search")),
|
|
190
|
+
1
|
|
191
|
+
/* TEXT */
|
|
192
|
+
)];
|
|
193
|
+
}),
|
|
194
|
+
_: 1
|
|
195
|
+
/* STABLE */
|
|
196
|
+
}, 8, ["title"]), createVNode(_component_tiny_col, {
|
|
197
|
+
span: 5
|
|
198
|
+
}, {
|
|
199
|
+
default: withCtx(function() {
|
|
200
|
+
return [createVNode(_component_tiny_select, {
|
|
201
|
+
class: "tiny-detp__select",
|
|
202
|
+
modelValue: _ctx.state.searchValue,
|
|
203
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
|
|
204
|
+
return _ctx.state.searchValue = $event;
|
|
205
|
+
}),
|
|
206
|
+
placement: "bottom-start",
|
|
207
|
+
loading: _ctx.state.loading,
|
|
208
|
+
placeholder: _ctx.t("ui.dept.input"),
|
|
209
|
+
filterable: "",
|
|
210
|
+
clearable: "",
|
|
211
|
+
remote: "",
|
|
212
|
+
"remote-method": _ctx.searchMethod,
|
|
213
|
+
onChange: _ctx.searchChange,
|
|
214
|
+
onClear: _cache[2] || (_cache[2] = function($event) {
|
|
215
|
+
return _ctx.searchMethod("");
|
|
216
|
+
})
|
|
217
|
+
}, {
|
|
218
|
+
default: withCtx(function() {
|
|
219
|
+
return [createElementVNode("li", _hoisted_2, [createElementVNode(
|
|
220
|
+
"span",
|
|
221
|
+
_hoisted_3,
|
|
222
|
+
toDisplayString(_ctx.t("ui.dept.code")),
|
|
223
|
+
1
|
|
224
|
+
/* TEXT */
|
|
225
|
+
), createElementVNode(
|
|
226
|
+
"span",
|
|
227
|
+
_hoisted_4,
|
|
228
|
+
toDisplayString(_ctx.t("ui.dept.name")),
|
|
229
|
+
1
|
|
230
|
+
/* TEXT */
|
|
231
|
+
)]), (openBlock(true), createElementBlock(
|
|
232
|
+
Fragment,
|
|
233
|
+
null,
|
|
234
|
+
renderList(_ctx.state.searchOptions, function(option, index) {
|
|
235
|
+
return openBlock(), createBlock(_component_tiny_option, {
|
|
236
|
+
key: index,
|
|
237
|
+
label: option.hrName,
|
|
238
|
+
value: option.hrCode
|
|
239
|
+
}, {
|
|
240
|
+
default: withCtx(function() {
|
|
241
|
+
return [createElementVNode(
|
|
242
|
+
"span",
|
|
243
|
+
_hoisted_5,
|
|
244
|
+
toDisplayString(option.hrCode),
|
|
245
|
+
1
|
|
246
|
+
/* TEXT */
|
|
247
|
+
), createElementVNode(
|
|
248
|
+
"span",
|
|
249
|
+
_hoisted_6,
|
|
250
|
+
toDisplayString(option.hrName),
|
|
251
|
+
1
|
|
252
|
+
/* TEXT */
|
|
253
|
+
)];
|
|
254
|
+
}),
|
|
255
|
+
_: 2
|
|
256
|
+
/* DYNAMIC */
|
|
257
|
+
}, 1032, ["label", "value"]);
|
|
258
|
+
}),
|
|
259
|
+
128
|
|
260
|
+
/* KEYED_FRAGMENT */
|
|
261
|
+
))];
|
|
262
|
+
}),
|
|
263
|
+
_: 1
|
|
264
|
+
/* STABLE */
|
|
265
|
+
}, 8, ["modelValue", "loading", "placeholder", "remote-method", "onChange"])];
|
|
266
|
+
}),
|
|
267
|
+
_: 1
|
|
268
|
+
/* STABLE */
|
|
269
|
+
})];
|
|
270
|
+
}),
|
|
271
|
+
_: 1
|
|
272
|
+
/* STABLE */
|
|
273
|
+
}), (openBlock(true), createElementBlock(
|
|
274
|
+
Fragment,
|
|
275
|
+
null,
|
|
276
|
+
renderList(_ctx.deptState, function(dept, index) {
|
|
277
|
+
return openBlock(), createBlock(
|
|
278
|
+
_component_tiny_row,
|
|
279
|
+
{
|
|
280
|
+
class: "tiny-dept__item",
|
|
281
|
+
key: index
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
default: withCtx(function() {
|
|
285
|
+
return [createVNode(_component_tiny_col, {
|
|
286
|
+
class: "tiny-dept__label",
|
|
287
|
+
title: _ctx.t("ui.dept." + dept.title),
|
|
288
|
+
span: 3
|
|
289
|
+
}, {
|
|
290
|
+
default: withCtx(function() {
|
|
291
|
+
return [createTextVNode(
|
|
292
|
+
toDisplayString(_ctx.t("ui.dept." + dept.title)),
|
|
293
|
+
1
|
|
294
|
+
/* TEXT */
|
|
295
|
+
)];
|
|
296
|
+
}),
|
|
297
|
+
_: 2
|
|
298
|
+
/* DYNAMIC */
|
|
299
|
+
}, 1032, ["title"]), createVNode(
|
|
300
|
+
_component_tiny_col,
|
|
301
|
+
{
|
|
302
|
+
span: 9
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
default: withCtx(function() {
|
|
306
|
+
return [createVNode(_component_tiny_select, {
|
|
307
|
+
class: "tiny-detp__select",
|
|
308
|
+
ref_for: true,
|
|
309
|
+
ref: "select" + index,
|
|
310
|
+
modelValue: dept.value,
|
|
311
|
+
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
|
312
|
+
return dept.value = $event;
|
|
313
|
+
},
|
|
314
|
+
loading: _ctx.state.loading,
|
|
315
|
+
filterable: "",
|
|
316
|
+
"default-first-option": "",
|
|
317
|
+
clearable: "",
|
|
318
|
+
disabled: !!index && dept.disable,
|
|
319
|
+
onVisibleChange: function onVisibleChange($event) {
|
|
320
|
+
return _ctx.getCurrentList(index, $event);
|
|
321
|
+
},
|
|
322
|
+
onChange: function onChange($event) {
|
|
323
|
+
return _ctx.selectChange({
|
|
324
|
+
level: index,
|
|
325
|
+
value: $event
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}, {
|
|
329
|
+
default: withCtx(function() {
|
|
330
|
+
return [(openBlock(true), createElementBlock(
|
|
331
|
+
Fragment,
|
|
332
|
+
null,
|
|
333
|
+
renderList(dept.options, function(option) {
|
|
334
|
+
return openBlock(), createBlock(_component_tiny_option, {
|
|
335
|
+
key: option.hrCode,
|
|
336
|
+
label: option.hrName,
|
|
337
|
+
value: option.hrCode
|
|
338
|
+
}, null, 8, ["label", "value"]);
|
|
339
|
+
}),
|
|
340
|
+
128
|
|
341
|
+
/* KEYED_FRAGMENT */
|
|
342
|
+
))];
|
|
343
|
+
}),
|
|
344
|
+
_: 2
|
|
345
|
+
/* DYNAMIC */
|
|
346
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "loading", "disabled", "onVisibleChange", "onChange"])];
|
|
347
|
+
}),
|
|
348
|
+
_: 2
|
|
349
|
+
/* DYNAMIC */
|
|
350
|
+
},
|
|
351
|
+
1024
|
|
352
|
+
/* DYNAMIC_SLOTS */
|
|
353
|
+
)];
|
|
354
|
+
}),
|
|
355
|
+
_: 2
|
|
356
|
+
/* DYNAMIC */
|
|
357
|
+
},
|
|
358
|
+
1024
|
|
359
|
+
/* DYNAMIC_SLOTS */
|
|
360
|
+
);
|
|
361
|
+
}),
|
|
362
|
+
128
|
|
363
|
+
/* KEYED_FRAGMENT */
|
|
364
|
+
)), createVNode(_component_tiny_row, null, {
|
|
365
|
+
default: withCtx(function() {
|
|
366
|
+
return [createElementVNode(
|
|
367
|
+
"p",
|
|
368
|
+
_hoisted_7,
|
|
369
|
+
toDisplayString(_ctx.t("ui.dept.selected")),
|
|
370
|
+
1
|
|
371
|
+
/* TEXT */
|
|
372
|
+
), createElementVNode(
|
|
373
|
+
"p",
|
|
374
|
+
_hoisted_8,
|
|
375
|
+
toDisplayString(_ctx.state.labels.join(" > ")),
|
|
376
|
+
1
|
|
377
|
+
/* TEXT */
|
|
378
|
+
), renderSlot(_ctx.$slots, "hrapprover", {
|
|
379
|
+
slotScope: _ctx.state
|
|
380
|
+
})];
|
|
381
|
+
}),
|
|
382
|
+
_: 3
|
|
383
|
+
/* FORWARDED */
|
|
384
|
+
})];
|
|
385
|
+
}),
|
|
386
|
+
_: 3
|
|
387
|
+
/* FORWARDED */
|
|
388
|
+
}, 8, ["visible", "onClose", "title"])]);
|
|
274
389
|
}
|
|
275
|
-
var pc = /* @__PURE__ */
|
|
276
|
-
return __component__.exports;
|
|
277
|
-
}();
|
|
390
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
278
391
|
|
|
279
392
|
export { pc as default };
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-dept",
|
|
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
|
-
"@opentinyvue/vue-select": "~
|
|
14
|
-
"@opentinyvue/vue-option": "~
|
|
15
|
-
"@opentinyvue/vue-row": "~
|
|
16
|
-
"@opentinyvue/vue-col": "~
|
|
17
|
-
"@opentinyvue/vue-input": "~
|
|
13
|
+
"@opentinyvue/vue-select": "~3.21.0",
|
|
14
|
+
"@opentinyvue/vue-option": "~3.21.0",
|
|
15
|
+
"@opentinyvue/vue-row": "~3.21.0",
|
|
16
|
+
"@opentinyvue/vue-col": "~3.21.0",
|
|
17
|
+
"@opentinyvue/vue-input": "~3.21.0",
|
|
18
18
|
"@opentinyvue/vue-theme": "~3.21.0",
|
|
19
|
-
"@opentinyvue/vue-dialog-box": "~
|
|
19
|
+
"@opentinyvue/vue-dialog-box": "~3.21.0"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,68 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
modelValue: StringConstructor;
|
|
3
|
+
disabled: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
autoSelect: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
size: StringConstructor;
|
|
12
|
+
fetchDeptList: FunctionConstructor;
|
|
13
|
+
fetchDeptByValue: FunctionConstructor;
|
|
14
|
+
fetchDept: FunctionConstructor;
|
|
15
|
+
beforeConfirm: FunctionConstructor;
|
|
16
|
+
title: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
displayOnly: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
tiny_mode: StringConstructor;
|
|
25
|
+
tiny_mode_root: BooleanConstructor;
|
|
26
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
27
|
+
tiny_renderless: FunctionConstructor;
|
|
28
|
+
tiny_theme: StringConstructor;
|
|
29
|
+
tiny_chart_theme: ObjectConstructor;
|
|
30
|
+
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
33
|
+
modelValue: StringConstructor;
|
|
34
|
+
disabled: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
autoSelect: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
size: StringConstructor;
|
|
43
|
+
fetchDeptList: FunctionConstructor;
|
|
44
|
+
fetchDeptByValue: FunctionConstructor;
|
|
45
|
+
fetchDept: FunctionConstructor;
|
|
46
|
+
beforeConfirm: FunctionConstructor;
|
|
47
|
+
title: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
displayOnly: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
tiny_mode: StringConstructor;
|
|
56
|
+
tiny_mode_root: BooleanConstructor;
|
|
57
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
58
|
+
tiny_renderless: FunctionConstructor;
|
|
59
|
+
tiny_theme: StringConstructor;
|
|
60
|
+
tiny_chart_theme: ObjectConstructor;
|
|
61
|
+
}>>, {
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
title: string;
|
|
64
|
+
tiny_mode_root: boolean;
|
|
65
|
+
displayOnly: boolean;
|
|
66
|
+
autoSelect: boolean;
|
|
67
|
+
}, {}>;
|
|
2
68
|
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,73 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
disabled?: any;
|
|
3
|
+
title?: any;
|
|
4
|
+
size?: any;
|
|
5
|
+
tiny_mode?: any;
|
|
6
|
+
tiny_mode_root?: any;
|
|
7
|
+
tiny_template?: any;
|
|
8
|
+
tiny_renderless?: any;
|
|
9
|
+
_constants?: any;
|
|
10
|
+
tiny_theme?: any;
|
|
11
|
+
tiny_chart_theme?: any;
|
|
12
|
+
modelValue?: any;
|
|
13
|
+
displayOnly?: any;
|
|
14
|
+
fetchDeptList?: any;
|
|
15
|
+
fetchDeptByValue?: any;
|
|
16
|
+
fetchDept?: any;
|
|
17
|
+
beforeConfirm?: any;
|
|
18
|
+
autoSelect?: any;
|
|
19
|
+
}>, {
|
|
20
|
+
t: (this: any, path: any, options?: any) => any;
|
|
21
|
+
vm: any;
|
|
22
|
+
f: (props: any, attrs?: {}) => {};
|
|
23
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
24
|
+
d: (props: any) => void;
|
|
25
|
+
dp: (props: any) => void;
|
|
26
|
+
gcls: (key: any) => any;
|
|
27
|
+
m: (...cssClasses: any[]) => string;
|
|
28
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("cancel" | "change" | "close" | "selected" | "update:modelValue" | "confirm" | "open")[], "cancel" | "change" | "close" | "selected" | "update:modelValue" | "confirm" | "open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
29
|
+
disabled?: any;
|
|
30
|
+
title?: any;
|
|
31
|
+
size?: any;
|
|
32
|
+
tiny_mode?: any;
|
|
33
|
+
tiny_mode_root?: any;
|
|
34
|
+
tiny_template?: any;
|
|
35
|
+
tiny_renderless?: any;
|
|
36
|
+
_constants?: any;
|
|
37
|
+
tiny_theme?: any;
|
|
38
|
+
tiny_chart_theme?: any;
|
|
39
|
+
modelValue?: any;
|
|
40
|
+
displayOnly?: any;
|
|
41
|
+
fetchDeptList?: any;
|
|
42
|
+
fetchDeptByValue?: any;
|
|
43
|
+
fetchDept?: any;
|
|
44
|
+
beforeConfirm?: any;
|
|
45
|
+
autoSelect?: any;
|
|
46
|
+
}>>> & {
|
|
47
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
52
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
onSelected?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
readonly disabled?: any;
|
|
56
|
+
readonly title?: any;
|
|
57
|
+
readonly size?: any;
|
|
58
|
+
readonly tiny_mode?: any;
|
|
59
|
+
readonly tiny_mode_root?: any;
|
|
60
|
+
readonly tiny_template?: any;
|
|
61
|
+
readonly tiny_renderless?: any;
|
|
62
|
+
readonly _constants?: any;
|
|
63
|
+
readonly tiny_theme?: any;
|
|
64
|
+
readonly tiny_chart_theme?: any;
|
|
65
|
+
readonly modelValue?: any;
|
|
66
|
+
readonly displayOnly?: any;
|
|
67
|
+
readonly fetchDeptList?: any;
|
|
68
|
+
readonly fetchDeptByValue?: any;
|
|
69
|
+
readonly fetchDept?: any;
|
|
70
|
+
readonly beforeConfirm?: any;
|
|
71
|
+
readonly autoSelect?: any;
|
|
72
|
+
}, {}>;
|
|
2
73
|
export default _default;
|