inl-ui 0.0.19 → 0.0.21
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/dist/components/index.cjs +43 -0
- package/dist/components/index.d.ts +20 -0
- package/dist/components/index.js +38 -0
- package/dist/directives/index.cjs +74 -0
- package/dist/directives/index.d.ts +15 -0
- package/dist/directives/index.js +69 -0
- package/dist/hooks/index.cjs +133 -0
- package/dist/hooks/index.d.ts +50 -0
- package/dist/hooks/index.js +121 -0
- package/dist/iconfont.js +69 -0
- package/dist/index.cjs +435 -0
- package/dist/index.d.ts +177 -0
- package/dist/index.js +203 -1102
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -0
- package/dist/src/api/thingModel.d.ts +1 -0
- package/dist/src/pageComponent/views/systemManager/orgManager/depManager/batchImportModal.d.ts +20 -0
- package/dist/utils/index.cjs +181 -0
- package/dist/utils/index.d.ts +72 -0
- package/dist/utils/index.js +167 -0
- package/package.json +3 -3
- package/src/api/thingModel.ts +14 -1
- package/src/pageComponent/views/systemManager/orgManager/depManager/batchImportModal.tsx +120 -0
- package/src/pageComponent/views/systemManager/orgManager/depManager/employeeTable.tsx +38 -1
- package/src/pageComponent/views/thingModel/index.tsx +52 -12
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var qiankun = require('vite-plugin-qiankun');
|
|
6
|
+
var renderWithQiankun = require('vite-plugin-qiankun/dist/helper');
|
|
7
|
+
var vue = require('vue');
|
|
8
|
+
var axios = require('axios');
|
|
9
|
+
var antDesignVue = require('ant-design-vue');
|
|
10
|
+
var _ = require('lodash');
|
|
11
|
+
var core = require('@vueuse/core');
|
|
12
|
+
var dayjs = require('dayjs');
|
|
13
|
+
var iconsVue = require('@ant-design/icons-vue');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
+
|
|
17
|
+
var qiankun__default = /*#__PURE__*/_interopDefaultLegacy(qiankun);
|
|
18
|
+
var renderWithQiankun__default = /*#__PURE__*/_interopDefaultLegacy(renderWithQiankun);
|
|
19
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
20
|
+
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
21
|
+
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
22
|
+
|
|
23
|
+
var version = "0.1.0-rc.13";
|
|
24
|
+
|
|
25
|
+
const setTheme = theme => {
|
|
26
|
+
if (theme === "dark") {
|
|
27
|
+
document.getElementsByTagName("html")[0].setAttribute("data-doc-theme", "dark");
|
|
28
|
+
document.getElementsByTagName("body")[0].setAttribute("data-theme", "dark");
|
|
29
|
+
document.getElementsByTagName("html")[0].style.colorScheme = "dark";
|
|
30
|
+
} else {
|
|
31
|
+
document.getElementsByTagName("html")[0].setAttribute("data-doc-theme", "light");
|
|
32
|
+
document.getElementsByTagName("body")[0].setAttribute("data-theme", "light");
|
|
33
|
+
document.getElementsByTagName("html")[0].style.colorScheme = "light";
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var changeTheme = {
|
|
37
|
+
set(theme) {
|
|
38
|
+
window.localStorage.setItem("theme", theme);
|
|
39
|
+
setTheme(theme);
|
|
40
|
+
},
|
|
41
|
+
settingTheme(theme) {
|
|
42
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
43
|
+
theme = theme || window.localStorage.getItem("theme") || systemTheme;
|
|
44
|
+
setTheme(theme);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const setRem = opt => {
|
|
49
|
+
const fontSize = opt.fontSize || 14;
|
|
50
|
+
const designSize = opt.designSize || 1920;
|
|
51
|
+
const scale = document.documentElement.clientWidth / designSize;
|
|
52
|
+
document.documentElement.style.fontSize = `${fontSize * Math.min(scale, 2)}px`;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const isMicroApp = renderWithQiankun.qiankunWindow.__POWERED_BY_QIANKUN__;
|
|
56
|
+
const transformRoutes = (appName, routes) => {
|
|
57
|
+
if (isMicroApp) {
|
|
58
|
+
let addBase = function (rs) {
|
|
59
|
+
for (const r of rs) {
|
|
60
|
+
r.path = `/${appName}${r.path}`;
|
|
61
|
+
if (r.children?.length) {
|
|
62
|
+
addBase(r.children);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const newRoutes = routes.filter(item => item.name !== "login" && item.path !== "/login");
|
|
67
|
+
addBase(routes);
|
|
68
|
+
newRoutes.push({
|
|
69
|
+
path: "/:pathMatch(.*)*",
|
|
70
|
+
component: {
|
|
71
|
+
render: () => ""
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return newRoutes;
|
|
75
|
+
}
|
|
76
|
+
return routes;
|
|
77
|
+
};
|
|
78
|
+
function microAppPlugin(name) {
|
|
79
|
+
return qiankun__default["default"](name, {
|
|
80
|
+
useDevMode: true
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function render(AppRoot, rootEl, configApp) {
|
|
84
|
+
let app;
|
|
85
|
+
const _render = (props = {}) => {
|
|
86
|
+
const {
|
|
87
|
+
container
|
|
88
|
+
} = props;
|
|
89
|
+
const root = container ? container.querySelector(rootEl) : rootEl;
|
|
90
|
+
app = vue.createApp(AppRoot);
|
|
91
|
+
configApp(app, props);
|
|
92
|
+
app.mount(root);
|
|
93
|
+
};
|
|
94
|
+
const initQianKun = () => {
|
|
95
|
+
renderWithQiankun__default["default"]({
|
|
96
|
+
bootstrap() {
|
|
97
|
+
console.log("\u5FAE\u5E94\u7528\uFF1Abootstrap");
|
|
98
|
+
},
|
|
99
|
+
mount(props) {
|
|
100
|
+
console.log("\u5FAE\u5E94\u7528\uFF1Amount", props);
|
|
101
|
+
_render(props);
|
|
102
|
+
},
|
|
103
|
+
unmount(props) {
|
|
104
|
+
console.log("\u5FAE\u5E94\u7528\uFF1Aunmount", props);
|
|
105
|
+
app.unmount();
|
|
106
|
+
},
|
|
107
|
+
update(props) {
|
|
108
|
+
console.log("\u5FAE\u5E94\u7528\uFF1Aupdate", props);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
isMicroApp ? initQianKun() : _render();
|
|
113
|
+
}
|
|
114
|
+
const microAppUtils = {
|
|
115
|
+
isMicroApp,
|
|
116
|
+
transformRoutes,
|
|
117
|
+
microAppPlugin,
|
|
118
|
+
render
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const config = {
|
|
122
|
+
prefix: "inl",
|
|
123
|
+
requestOmitParams: ["createDt", "createUser", "updateDt", "updateUser"]
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const getToken = () => sessionStorage.getItem("token");
|
|
127
|
+
const getCorpId = () => sessionStorage.getItem("corpId");
|
|
128
|
+
const getUserinfo = () => {
|
|
129
|
+
const jsonString = sessionStorage.getItem("userinfo");
|
|
130
|
+
if (jsonString) {
|
|
131
|
+
return JSON.parse(jsonString);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
class ApiInstance {
|
|
135
|
+
instance;
|
|
136
|
+
config;
|
|
137
|
+
constructor(config$1) {
|
|
138
|
+
this.config = config$1;
|
|
139
|
+
this.instance = axios__default["default"].create(config$1);
|
|
140
|
+
this.instance.interceptors.request.use(config2 => {
|
|
141
|
+
const userinfo = getUserinfo();
|
|
142
|
+
const token = getToken();
|
|
143
|
+
const corpId = getCorpId();
|
|
144
|
+
if (!_.isEmpty(config2.data)) {
|
|
145
|
+
config2.data = _.omit(config2.data, ...config.requestOmitParams);
|
|
146
|
+
}
|
|
147
|
+
config2.headers.token = token;
|
|
148
|
+
config2.headers.userId = userinfo?.userId;
|
|
149
|
+
config2.headers.userName = userinfo?.userName;
|
|
150
|
+
config2.headers.corpId = corpId;
|
|
151
|
+
return config2;
|
|
152
|
+
}, err => {
|
|
153
|
+
return Promise.reject(err);
|
|
154
|
+
});
|
|
155
|
+
this.instance.interceptors.response.use(res => {
|
|
156
|
+
return new Promise((resolve, reject) => {
|
|
157
|
+
if (res.config.responseType === "blob") {
|
|
158
|
+
resolve(res.data);
|
|
159
|
+
}
|
|
160
|
+
if (res.data.code === "M0000") {
|
|
161
|
+
resolve(res.data);
|
|
162
|
+
} else if (res.data.code === "M4003") {
|
|
163
|
+
this.config.onTokenExpired?.(res);
|
|
164
|
+
reject(res);
|
|
165
|
+
} else {
|
|
166
|
+
const alertMessage = res.data.message ?? "\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
|
|
167
|
+
antDesignVue.message.error(alertMessage, alertMessage.length > 10 ? 10 : 3);
|
|
168
|
+
reject(res.data);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}, err => {
|
|
172
|
+
return Promise.reject(err);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const utils = {
|
|
178
|
+
changeTheme,
|
|
179
|
+
setRem,
|
|
180
|
+
microAppUtils,
|
|
181
|
+
ApiInstance
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const focusDirective = {
|
|
185
|
+
mounted(el, {
|
|
186
|
+
value
|
|
187
|
+
}) {
|
|
188
|
+
if (value !== false) {
|
|
189
|
+
el.focus();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const autoScroll = {
|
|
195
|
+
mounted(el, {
|
|
196
|
+
value = "ant-table-body",
|
|
197
|
+
modifiers
|
|
198
|
+
}) {
|
|
199
|
+
let timer;
|
|
200
|
+
let timer2;
|
|
201
|
+
let hover = false;
|
|
202
|
+
let wait = false;
|
|
203
|
+
const {
|
|
204
|
+
self
|
|
205
|
+
} = modifiers;
|
|
206
|
+
const _baseWidth = window.innerWidth / window.innerHeight > 2 ? 7200 : 2880;
|
|
207
|
+
const step = Math.ceil(_baseWidth / window.innerWidth);
|
|
208
|
+
const onmouseenter = () => hover = true;
|
|
209
|
+
const onmouseleave = () => hover = false;
|
|
210
|
+
const scrollEl = self ? el : el.querySelector(`.${value}`);
|
|
211
|
+
if (!scrollEl) return;
|
|
212
|
+
const startScroll = () => {
|
|
213
|
+
if (!document.contains(el)) {
|
|
214
|
+
timer && clearInterval(timer);
|
|
215
|
+
el.removeEventListener("mouseenter", onmouseenter);
|
|
216
|
+
el.removeEventListener("mouseleave", onmouseleave);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (hover) return;
|
|
220
|
+
const scrollElHeight = scrollEl.getBoundingClientRect().height;
|
|
221
|
+
if (scrollElHeight >= scrollEl.scrollHeight) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (!hover && scrollEl.scrollTop + scrollElHeight > scrollEl.scrollHeight - step) {
|
|
225
|
+
if (timer2) return;
|
|
226
|
+
timer2 = setTimeout(() => {
|
|
227
|
+
if (!hover) {
|
|
228
|
+
scrollEl.scrollTop = 0;
|
|
229
|
+
}
|
|
230
|
+
setTimeout(() => {
|
|
231
|
+
if (!hover) {
|
|
232
|
+
wait = false;
|
|
233
|
+
}
|
|
234
|
+
}, 1e3);
|
|
235
|
+
timer2 = null;
|
|
236
|
+
}, 1e3);
|
|
237
|
+
wait = true;
|
|
238
|
+
} else {
|
|
239
|
+
if (!wait) {
|
|
240
|
+
scrollEl.scrollTo({
|
|
241
|
+
top: scrollEl.scrollTop + step
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
timer = setInterval(startScroll, 100);
|
|
247
|
+
el.addEventListener("mouseenter", onmouseenter);
|
|
248
|
+
el.addEventListener("mouseleave", onmouseleave);
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
var directives = /*#__PURE__*/Object.freeze({
|
|
253
|
+
__proto__: null,
|
|
254
|
+
focusDirective: focusDirective,
|
|
255
|
+
autoScroll: autoScroll
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
function useNow(pattern) {
|
|
259
|
+
const now = vue.ref();
|
|
260
|
+
const updateNow = () => {
|
|
261
|
+
const nowDayjs = dayjs__default["default"]();
|
|
262
|
+
now.value = pattern ? nowDayjs.format(pattern) : nowDayjs;
|
|
263
|
+
};
|
|
264
|
+
core.useIntervalFn(updateNow, 1e3, {
|
|
265
|
+
immediate: false,
|
|
266
|
+
immediateCallback: true
|
|
267
|
+
});
|
|
268
|
+
return now;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function useTableList(getData, listProp, totalName = "totalCount") {
|
|
272
|
+
const tableList = vue.ref([]);
|
|
273
|
+
const isLoading = vue.ref(false);
|
|
274
|
+
const total = vue.ref(0);
|
|
275
|
+
const refresh = async () => {
|
|
276
|
+
isLoading.value = true;
|
|
277
|
+
try {
|
|
278
|
+
const {
|
|
279
|
+
data
|
|
280
|
+
} = await getData();
|
|
281
|
+
if (listProp) {
|
|
282
|
+
tableList.value = data[listProp];
|
|
283
|
+
total.value = data[totalName];
|
|
284
|
+
} else {
|
|
285
|
+
tableList.value = data;
|
|
286
|
+
}
|
|
287
|
+
} finally {
|
|
288
|
+
isLoading.value = false;
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
const refreshDebounced = _.debounce(refresh, 200);
|
|
292
|
+
const currPage = vue.ref(1);
|
|
293
|
+
const handlePageChange = page => {
|
|
294
|
+
currPage.value = page;
|
|
295
|
+
refresh();
|
|
296
|
+
};
|
|
297
|
+
vue.watch(total, () => {
|
|
298
|
+
const pageCount = Math.ceil(total.value / pageSize.value);
|
|
299
|
+
if (currPage.value > 1 && currPage.value > pageCount) {
|
|
300
|
+
currPage.value = pageCount;
|
|
301
|
+
refresh();
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
const pageSize = vue.ref(10);
|
|
305
|
+
const hanldePageSizeChange = size => {
|
|
306
|
+
currPage.value = 1;
|
|
307
|
+
pageSize.value = size;
|
|
308
|
+
refresh();
|
|
309
|
+
};
|
|
310
|
+
const pagination = vue.reactive({
|
|
311
|
+
current: currPage,
|
|
312
|
+
pageSize,
|
|
313
|
+
total,
|
|
314
|
+
showSizeChanger: true,
|
|
315
|
+
showQuickJumper: true,
|
|
316
|
+
showTotal: total2 => `\u5171 ${total2} \u6761`,
|
|
317
|
+
"onUpdate:current": handlePageChange,
|
|
318
|
+
"onUpdate:pageSize": hanldePageSizeChange
|
|
319
|
+
});
|
|
320
|
+
return {
|
|
321
|
+
isLoading,
|
|
322
|
+
tableList,
|
|
323
|
+
currPage,
|
|
324
|
+
handlePageChange,
|
|
325
|
+
pageSize,
|
|
326
|
+
hanldePageSizeChange,
|
|
327
|
+
total,
|
|
328
|
+
refresh: refreshDebounced,
|
|
329
|
+
pagination
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function useModalVisible(defaultVisible = false) {
|
|
334
|
+
const visible = vue.ref(defaultVisible);
|
|
335
|
+
const record = vue.ref();
|
|
336
|
+
const onToggle = r => {
|
|
337
|
+
if (r) {
|
|
338
|
+
record.value = r;
|
|
339
|
+
}
|
|
340
|
+
visible.value = !visible.value;
|
|
341
|
+
};
|
|
342
|
+
return [visible, onToggle, record];
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function useQianKunState(action) {
|
|
346
|
+
let isSync = false;
|
|
347
|
+
const state = vue.ref({});
|
|
348
|
+
if (___default["default"].isEmpty(action)) {
|
|
349
|
+
return state;
|
|
350
|
+
}
|
|
351
|
+
const {
|
|
352
|
+
onGlobalStateChange,
|
|
353
|
+
offGlobalStateChange,
|
|
354
|
+
setGlobalState
|
|
355
|
+
} = action;
|
|
356
|
+
const handleGlobalStateChange = value => {
|
|
357
|
+
isSync = true;
|
|
358
|
+
state.value = value;
|
|
359
|
+
vue.nextTick(() => isSync = false);
|
|
360
|
+
};
|
|
361
|
+
vue.watch(state, val => {
|
|
362
|
+
if (!isSync) {
|
|
363
|
+
setGlobalState(val);
|
|
364
|
+
}
|
|
365
|
+
}, {
|
|
366
|
+
deep: true
|
|
367
|
+
});
|
|
368
|
+
vue.onMounted(() => onGlobalStateChange(handleGlobalStateChange, true));
|
|
369
|
+
vue.onBeforeUnmount(() => offGlobalStateChange());
|
|
370
|
+
return state;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
var hooks = /*#__PURE__*/Object.freeze({
|
|
374
|
+
__proto__: null,
|
|
375
|
+
useNow: useNow,
|
|
376
|
+
useTableList: useTableList,
|
|
377
|
+
useModalVisible: useModalVisible,
|
|
378
|
+
useQianKunState: useQianKunState
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
const {
|
|
382
|
+
prefix
|
|
383
|
+
} = config;
|
|
384
|
+
function installComponent(component, name, withPrefix = true) {
|
|
385
|
+
component.install = app => {
|
|
386
|
+
name = withPrefix ? `${prefix}-${name}` : name;
|
|
387
|
+
app.component(name, component);
|
|
388
|
+
};
|
|
389
|
+
return component;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const Demo = vue.defineComponent({
|
|
393
|
+
props: {
|
|
394
|
+
name: {
|
|
395
|
+
type: String,
|
|
396
|
+
default: "\u5F20\u4E09"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
setup(props) {
|
|
400
|
+
return () => vue.createVNode("div", {
|
|
401
|
+
"class": "Demo"
|
|
402
|
+
}, ["\u6211\u662Fdemo, ", props.name]);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
var index$2 = installComponent(Demo, "demo");
|
|
406
|
+
|
|
407
|
+
const IconFont = iconsVue.createFromIconfontCN();
|
|
408
|
+
var index$1 = installComponent(IconFont, "icon-font", false);
|
|
409
|
+
|
|
410
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
411
|
+
__proto__: null,
|
|
412
|
+
Demo: index$2,
|
|
413
|
+
IconFont: index$1
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
var index = {
|
|
417
|
+
install(app) {
|
|
418
|
+
for (const component of Object.values(components)) {
|
|
419
|
+
app.use(component);
|
|
420
|
+
}
|
|
421
|
+
require("./iconfont.js");
|
|
422
|
+
},
|
|
423
|
+
version,
|
|
424
|
+
utils,
|
|
425
|
+
directives,
|
|
426
|
+
hooks,
|
|
427
|
+
components
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
exports.components = components;
|
|
431
|
+
exports["default"] = index;
|
|
432
|
+
exports.directives = directives;
|
|
433
|
+
exports.hooks = hooks;
|
|
434
|
+
exports.utils = utils;
|
|
435
|
+
exports.version = version;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
import * as vite_plugin_qiankun_dist_helper from 'vite-plugin-qiankun/dist/helper';
|
|
3
|
+
import * as vue from 'vue';
|
|
4
|
+
import { Directive, Ref, App } from 'vue';
|
|
5
|
+
import * as vite from 'vite';
|
|
6
|
+
import * as vue_router from 'vue-router';
|
|
7
|
+
import { Dayjs } from 'dayjs';
|
|
8
|
+
import * as lodash from 'lodash';
|
|
9
|
+
import * as _ant_design_icons_vue_lib_components_IconFont from '@ant-design/icons-vue/lib/components/IconFont';
|
|
10
|
+
|
|
11
|
+
interface IApiInstanceConfig extends AxiosRequestConfig {
|
|
12
|
+
onTokenExpired?: (res: AxiosResponse) => void;
|
|
13
|
+
}
|
|
14
|
+
declare class ApiInstance {
|
|
15
|
+
instance: AxiosInstance;
|
|
16
|
+
config: IApiInstanceConfig;
|
|
17
|
+
constructor(config: IApiInstanceConfig);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var version = "0.1.0-rc.13";
|
|
21
|
+
|
|
22
|
+
declare const utils: {
|
|
23
|
+
changeTheme: {
|
|
24
|
+
set(theme: string): void;
|
|
25
|
+
settingTheme(theme?: string | undefined): void;
|
|
26
|
+
};
|
|
27
|
+
setRem: (opt: {
|
|
28
|
+
fontSize?: number | undefined;
|
|
29
|
+
designSize?: number | undefined;
|
|
30
|
+
}) => void;
|
|
31
|
+
microAppUtils: {
|
|
32
|
+
isMicroApp: boolean | undefined;
|
|
33
|
+
transformRoutes: (appName: string, routes: vue_router.RouteRecordRaw[]) => vue_router.RouteRecordRaw[];
|
|
34
|
+
microAppPlugin: (name: string) => vite.PluginOption;
|
|
35
|
+
render: (AppRoot: vue.Component<any, any, any, vue.ComputedOptions, vue.MethodOptions>, rootEl: string, configApp: (app: vue.App<any>, props?: vite_plugin_qiankun_dist_helper.QiankunProps | undefined) => any) => void;
|
|
36
|
+
};
|
|
37
|
+
ApiInstance: typeof ApiInstance;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 输入框自动获取焦点
|
|
42
|
+
*/
|
|
43
|
+
declare const focusDirective: Directive;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 列表自动滚动
|
|
47
|
+
* 用法 v-autoScroll={'class'} class: 需要滚动的类名,必须是指令所在元素的子元素
|
|
48
|
+
* 修饰符: self:作用在v-autoScoll本身的元素上
|
|
49
|
+
*/
|
|
50
|
+
declare const autoScroll: Directive;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 通用指令
|
|
54
|
+
* import { xxx } from 'inl-ui/dist/directives'
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
declare const directives_focusDirective: typeof focusDirective;
|
|
58
|
+
declare const directives_autoScroll: typeof autoScroll;
|
|
59
|
+
declare namespace directives {
|
|
60
|
+
export {
|
|
61
|
+
directives_focusDirective as focusDirective,
|
|
62
|
+
directives_autoScroll as autoScroll,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare function useNow(): Ref<Dayjs>;
|
|
67
|
+
declare function useNow(pattern: string): Ref<string>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 通用表格查询hook
|
|
71
|
+
* @param getData 获取数据的函数 返回Promise
|
|
72
|
+
* @param listProp 数据列表在data中的属性 不传代表不分页
|
|
73
|
+
* @param totalName 总数在data中的属性 默认为totalCount
|
|
74
|
+
*/
|
|
75
|
+
declare function useTableList(getData: () => Promise<any>, listProp?: string, totalName?: string): {
|
|
76
|
+
isLoading: vue.Ref<boolean>;
|
|
77
|
+
tableList: any;
|
|
78
|
+
currPage: vue.Ref<number>;
|
|
79
|
+
handlePageChange: (page: number) => void;
|
|
80
|
+
pageSize: vue.Ref<number>;
|
|
81
|
+
hanldePageSizeChange: (size: number) => void;
|
|
82
|
+
total: vue.Ref<number>;
|
|
83
|
+
refresh: lodash.DebouncedFunc<() => Promise<void>>;
|
|
84
|
+
pagination: {
|
|
85
|
+
current: number;
|
|
86
|
+
pageSize: number;
|
|
87
|
+
total: number;
|
|
88
|
+
showSizeChanger: boolean;
|
|
89
|
+
showQuickJumper: boolean;
|
|
90
|
+
showTotal: (total: number) => string;
|
|
91
|
+
"onUpdate:current": (page: number) => void;
|
|
92
|
+
"onUpdate:pageSize": (size: number) => void;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 控制是否展示对话框
|
|
98
|
+
* @param defaultVisible 默认是否展示
|
|
99
|
+
* @returns {[boolean, function, object]} [是否显示,处理点击(传入row),传入的对象]
|
|
100
|
+
*/
|
|
101
|
+
declare function useModalVisible<T = any>(defaultVisible?: boolean): [Ref<Boolean>, (r?: T) => void, Ref<T | undefined>];
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 获取qiankun的state 父/子应用通用
|
|
105
|
+
* 只能在App中使用,获取到的state用provide共享给自组件
|
|
106
|
+
* @param action qiankun的全局状态action
|
|
107
|
+
*/
|
|
108
|
+
declare function useQianKunState(action: any): vue.Ref<{}>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* inl hooks 业务上的hook
|
|
112
|
+
* 用法: import { xxx } from 'inl-ui/dist/hooks'
|
|
113
|
+
* 更多通用的hooks从[@vueuse]中导入https://vueuse.org/
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
declare const hooks_useNow: typeof useNow;
|
|
117
|
+
declare const hooks_useTableList: typeof useTableList;
|
|
118
|
+
declare const hooks_useModalVisible: typeof useModalVisible;
|
|
119
|
+
declare const hooks_useQianKunState: typeof useQianKunState;
|
|
120
|
+
declare namespace hooks {
|
|
121
|
+
export {
|
|
122
|
+
hooks_useNow as useNow,
|
|
123
|
+
hooks_useTableList as useTableList,
|
|
124
|
+
hooks_useModalVisible as useModalVisible,
|
|
125
|
+
hooks_useQianKunState as useQianKunState,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare const _default$2: vue.DefineComponent<{
|
|
130
|
+
name: {
|
|
131
|
+
type: StringConstructor;
|
|
132
|
+
default: string;
|
|
133
|
+
};
|
|
134
|
+
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
135
|
+
name: {
|
|
136
|
+
type: StringConstructor;
|
|
137
|
+
default: string;
|
|
138
|
+
};
|
|
139
|
+
}>>, {
|
|
140
|
+
name: string;
|
|
141
|
+
}>;
|
|
142
|
+
|
|
143
|
+
declare const _default$1: vue.FunctionalComponent<_ant_design_icons_vue_lib_components_IconFont.IconFontProps, {}>;
|
|
144
|
+
|
|
145
|
+
declare namespace components {
|
|
146
|
+
export {
|
|
147
|
+
_default$2 as Demo,
|
|
148
|
+
_default$1 as IconFont,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare const _default: {
|
|
153
|
+
install(app: App): void;
|
|
154
|
+
version: string;
|
|
155
|
+
utils: {
|
|
156
|
+
changeTheme: {
|
|
157
|
+
set(theme: string): void;
|
|
158
|
+
settingTheme(theme?: string | undefined): void;
|
|
159
|
+
};
|
|
160
|
+
setRem: (opt: {
|
|
161
|
+
fontSize?: number | undefined;
|
|
162
|
+
designSize?: number | undefined;
|
|
163
|
+
}) => void;
|
|
164
|
+
microAppUtils: {
|
|
165
|
+
isMicroApp: boolean | undefined;
|
|
166
|
+
transformRoutes: (appName: string, routes: vue_router.RouteRecordRaw[]) => vue_router.RouteRecordRaw[];
|
|
167
|
+
microAppPlugin: (name: string) => vite.PluginOption;
|
|
168
|
+
render: (AppRoot: vue.Component<any, any, any, vue.ComputedOptions, vue.MethodOptions>, rootEl: string, configApp: (app: App<any>, props?: vite_plugin_qiankun_dist_helper.QiankunProps | undefined) => any) => void;
|
|
169
|
+
};
|
|
170
|
+
ApiInstance: typeof ApiInstance;
|
|
171
|
+
};
|
|
172
|
+
directives: typeof directives;
|
|
173
|
+
hooks: typeof hooks;
|
|
174
|
+
components: typeof components;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export { components, _default as default, directives, hooks, utils, version };
|