inl-ui 0.1.71 → 0.1.73
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/README.md +49 -49
- package/dist/components/index.cjs +126 -100
- package/dist/components/index.d.ts +22 -1
- package/dist/components/index.js +126 -100
- package/dist/iconfont.js +1 -1
- package/dist/index.cjs +187 -103
- package/dist/index.d.ts +23 -2
- package/dist/index.js +187 -103
- package/dist/theme/index.js +70 -70
- package/dist/theme/scripts/dark-vars.js +21 -21
- package/dist/theme/scripts/default-vars.js +25 -25
- package/dist/theme/scripts/light-vars.js +22 -22
- package/dist/theme/style/color/bezierEasing.less +110 -110
- package/dist/theme/style/color/colorPalette.less +81 -81
- package/dist/theme/style/color/colors.less +162 -162
- package/dist/theme/style/color/tinyColor.less +1184 -1184
- package/dist/theme/style/compact.less +4 -4
- package/dist/theme/style/dark.less +4 -4
- package/dist/theme/style/default.less +4 -4
- package/dist/theme/style/index.less +2 -2
- package/dist/theme/style/index.tsx +2 -2
- package/dist/theme/style/themes/compact.less +295 -295
- package/dist/theme/style/themes/dark.less +790 -790
- package/dist/theme/style/themes/default.less +1067 -1067
- package/dist/theme/style/themes/index.less +7 -7
- package/dist/theme/style/themes/var-dark.less +343 -343
- package/dist/theme/style/themes/var-default.less +184 -184
- package/dist/theme/style/themes/variable.less +1122 -1122
- package/dist/theme/style/variable.less +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# 工业PC ui库
|
|
2
|
-
|
|
3
|
-
前端通用库,包括组件、hooks、utils等。
|
|
4
|
-
|
|
5
|
-
### 运行
|
|
6
|
-
|
|
7
|
-
+ 开发模式 yarn dev
|
|
8
|
-
+ 生产打包 yarn build
|
|
9
|
-
+ 生成文档 yarn build:docs
|
|
10
|
-
+ 打包图扑工具 yarn buildtp
|
|
11
|
-
|
|
12
|
-
### 使用方法
|
|
13
|
-
|
|
14
|
-
```javascript
|
|
15
|
-
import inl from 'inl-ui';
|
|
16
|
-
import 'inl-ui/dist/style.css';
|
|
17
|
-
|
|
18
|
-
vue.use(inl)
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### 激活主题
|
|
24
|
-
|
|
25
|
-
**vite.config.ts**
|
|
26
|
-
|
|
27
|
-
```javascript
|
|
28
|
-
const additionalData = require("inl-ui/dist/theme").default;
|
|
29
|
-
|
|
30
|
-
...
|
|
31
|
-
|
|
32
|
-
css: {
|
|
33
|
-
preprocessorOptions: {
|
|
34
|
-
less: {
|
|
35
|
-
javascriptEnabled: true,
|
|
36
|
-
additionalData,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 文档链接
|
|
43
|
-
|
|
44
|
-
##### [组件文档](./src/components/README.md)
|
|
45
|
-
|
|
46
|
-
##### [hooks文档](./src/hooks/README.md)
|
|
47
|
-
|
|
48
|
-
##### [Utils文档](./src/utils/README.md)
|
|
49
|
-
|
|
1
|
+
# 工业PC ui库
|
|
2
|
+
|
|
3
|
+
前端通用库,包括组件、hooks、utils等。
|
|
4
|
+
|
|
5
|
+
### 运行
|
|
6
|
+
|
|
7
|
+
+ 开发模式 yarn dev
|
|
8
|
+
+ 生产打包 yarn build
|
|
9
|
+
+ 生成文档 yarn build:docs
|
|
10
|
+
+ 打包图扑工具 yarn buildtp
|
|
11
|
+
|
|
12
|
+
### 使用方法
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
import inl from 'inl-ui';
|
|
16
|
+
import 'inl-ui/dist/style.css';
|
|
17
|
+
|
|
18
|
+
vue.use(inl)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### 激活主题
|
|
24
|
+
|
|
25
|
+
**vite.config.ts**
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
const additionalData = require("inl-ui/dist/theme").default;
|
|
29
|
+
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
css: {
|
|
33
|
+
preprocessorOptions: {
|
|
34
|
+
less: {
|
|
35
|
+
javascriptEnabled: true,
|
|
36
|
+
additionalData,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 文档链接
|
|
43
|
+
|
|
44
|
+
##### [组件文档](./src/components/README.md)
|
|
45
|
+
|
|
46
|
+
##### [hooks文档](./src/hooks/README.md)
|
|
47
|
+
|
|
48
|
+
##### [Utils文档](./src/utils/README.md)
|
|
49
|
+
|
|
@@ -6455,8 +6455,8 @@ function useMicroApp(appList) {
|
|
|
6455
6455
|
const appContainerList = vue.ref([]);
|
|
6456
6456
|
const handleRouteChange = core.useThrottleFn(async () => {
|
|
6457
6457
|
const microAppName = activeAppName.value;
|
|
6458
|
-
|
|
6459
|
-
if (!microAppDefine) return;
|
|
6458
|
+
let microAppDefine = appList.find(item => item.name === microAppName);
|
|
6459
|
+
if (!microAppDefine && !microAppName.startsWith("mtip-")) return;
|
|
6460
6460
|
const domId = `microApp_${microAppName}`;
|
|
6461
6461
|
if (!appContainerList.value.some(item => item.id === domId)) {
|
|
6462
6462
|
appContainerList.value.push({
|
|
@@ -6473,8 +6473,8 @@ function useMicroApp(appList) {
|
|
|
6473
6473
|
return;
|
|
6474
6474
|
}
|
|
6475
6475
|
const app = qiankun.loadMicroApp({
|
|
6476
|
-
name: microAppDefine.name,
|
|
6477
|
-
entry: microAppDefine.entry
|
|
6476
|
+
name: microAppDefine ? microAppDefine.name : microAppName,
|
|
6477
|
+
entry: microAppDefine ? microAppDefine.entry : `/${microAppName}/`,
|
|
6478
6478
|
container: `#${domId}`
|
|
6479
6479
|
});
|
|
6480
6480
|
const microApp = {
|
|
@@ -11296,7 +11296,7 @@ const defaultPropNames = {
|
|
|
11296
11296
|
peopleUserName: "userName"
|
|
11297
11297
|
};
|
|
11298
11298
|
const PeopleSelect = vue.defineComponent({
|
|
11299
|
-
emits: ["update:value"],
|
|
11299
|
+
emits: ["update:value", "update:open", "change", "close"],
|
|
11300
11300
|
props: {
|
|
11301
11301
|
list: {
|
|
11302
11302
|
type: Array,
|
|
@@ -11306,6 +11306,14 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11306
11306
|
type: Array,
|
|
11307
11307
|
default: () => []
|
|
11308
11308
|
},
|
|
11309
|
+
open: {
|
|
11310
|
+
type: Boolean,
|
|
11311
|
+
default: void 0
|
|
11312
|
+
},
|
|
11313
|
+
renderBtn: {
|
|
11314
|
+
type: Boolean,
|
|
11315
|
+
default: true
|
|
11316
|
+
},
|
|
11309
11317
|
buttonText: {
|
|
11310
11318
|
type: String,
|
|
11311
11319
|
default: "\u6DFB\u52A0\u4EBA\u5458"
|
|
@@ -11336,7 +11344,11 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11336
11344
|
}) {
|
|
11337
11345
|
const mixPropNames = Object.assign(defaultPropNames, props.propNames);
|
|
11338
11346
|
vue.provide("propNames", mixPropNames);
|
|
11339
|
-
const
|
|
11347
|
+
const modalOpen = vue.ref(false);
|
|
11348
|
+
vue.watch(() => props.open, val => {
|
|
11349
|
+
if (val === void 0) return;
|
|
11350
|
+
modalOpen.value = val;
|
|
11351
|
+
});
|
|
11340
11352
|
const formatList = vue.computed(() => {
|
|
11341
11353
|
const copyList = ___default["default"].cloneDeep(props.list);
|
|
11342
11354
|
formatTree(copyList, props.renderNameTree, mixPropNames.peopleList, mixPropNames.peopleId);
|
|
@@ -11355,8 +11367,8 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11355
11367
|
const initSelect = () => {
|
|
11356
11368
|
selectPeopleList.value = getUserListById(formatList.value, props.value, mixPropNames.peopleId);
|
|
11357
11369
|
};
|
|
11358
|
-
vue.watch([() => props.value, formatList,
|
|
11359
|
-
if (
|
|
11370
|
+
vue.watch([() => props.value, formatList, modalOpen], () => {
|
|
11371
|
+
if (modalOpen.value) initSelect();
|
|
11360
11372
|
});
|
|
11361
11373
|
const selectedKeys = vue.computed(() => selectPeopleList.value.map(item => item.id));
|
|
11362
11374
|
const handleSelect = (val, e) => {
|
|
@@ -11408,100 +11420,114 @@ const PeopleSelect = vue.defineComponent({
|
|
|
11408
11420
|
const handleCommit = () => {
|
|
11409
11421
|
const idList = selectPeopleList.value.map(item => item[mixPropNames.peopleId]);
|
|
11410
11422
|
emit("update:value", idList);
|
|
11411
|
-
|
|
11423
|
+
emit("change", idList);
|
|
11424
|
+
modalOpen.value = false;
|
|
11425
|
+
emit("update:open", modalOpen.value);
|
|
11412
11426
|
};
|
|
11413
|
-
const onClose = () =>
|
|
11414
|
-
|
|
11415
|
-
"
|
|
11416
|
-
}
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
"
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
"
|
|
11435
|
-
|
|
11436
|
-
"
|
|
11437
|
-
|
|
11438
|
-
"
|
|
11439
|
-
"
|
|
11440
|
-
"
|
|
11441
|
-
|
|
11442
|
-
"
|
|
11443
|
-
"zoomedDep": zoomedList.value?.[0],
|
|
11444
|
-
"onCheck": handleSelectNode
|
|
11445
|
-
}, null), vue.createVNode(vue.resolveComponent("a-tree"), {
|
|
11446
|
-
"class": "tree",
|
|
11447
|
-
"checkable": true,
|
|
11448
|
-
"showLine": true,
|
|
11449
|
-
"blockNode": true,
|
|
11450
|
-
"autoExpandParent": true,
|
|
11451
|
-
"fieldNames": {
|
|
11452
|
-
children: "subList",
|
|
11453
|
-
key: "id",
|
|
11454
|
-
title: "name"
|
|
11455
|
-
},
|
|
11456
|
-
"treeData": zoomedList.value || formatList.value,
|
|
11457
|
-
"checkedKeys": selectedKeys.value,
|
|
11458
|
-
"onCheck": handleSelect,
|
|
11459
|
-
"onSelect": (keys, {
|
|
11460
|
-
node
|
|
11461
|
-
}) => handleSelectNode(node),
|
|
11462
|
-
"expandedKeys": expandKeys.value,
|
|
11463
|
-
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11464
|
-
}, {
|
|
11465
|
-
title: node => vue.createVNode("div", {
|
|
11466
|
-
"class": "node-title"
|
|
11467
|
-
}, [vue.createVNode("span", {
|
|
11468
|
-
"class": "name"
|
|
11469
|
-
}, [node.name]), node.isDep && vue.createVNode("span", {
|
|
11470
|
-
"class": "count"
|
|
11471
|
-
}, [node.peopleCount, "\u4EBA"])])
|
|
11472
|
-
})]), vue.createVNode("div", {
|
|
11473
|
-
"class": "right"
|
|
11474
|
-
}, [vue.createVNode("div", {
|
|
11475
|
-
"class": "header"
|
|
11476
|
-
}, [vue.createVNode("h2", {
|
|
11477
|
-
"class": "title"
|
|
11478
|
-
}, ["\u5DF2\u9009\u4EBA\u5458", vue.createVNode("span", {
|
|
11479
|
-
"class": "select-text"
|
|
11480
|
-
}, ["\uFF08\u5DF2\u9009\u62E9", vue.createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11481
|
-
"type": "link",
|
|
11482
|
-
"disabled": !selectPeopleList.value.length,
|
|
11483
|
-
"onClick": handleClear
|
|
11427
|
+
const onClose = () => {
|
|
11428
|
+
selectPeopleList.value = [];
|
|
11429
|
+
emit("close");
|
|
11430
|
+
};
|
|
11431
|
+
return () => {
|
|
11432
|
+
let trigger = null;
|
|
11433
|
+
if (props.renderBtn || slots.default) {
|
|
11434
|
+
trigger = vue.createVNode("div", {
|
|
11435
|
+
"style": "display: inline-block;",
|
|
11436
|
+
"onClick": () => {
|
|
11437
|
+
modalOpen.value = true;
|
|
11438
|
+
}
|
|
11439
|
+
}, [typeof slots.default === "function" ? slots.default() : vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11440
|
+
"type": "primary"
|
|
11441
|
+
}, {
|
|
11442
|
+
default: () => [props.buttonText]
|
|
11443
|
+
})]);
|
|
11444
|
+
}
|
|
11445
|
+
return vue.createVNode("div", {
|
|
11446
|
+
"class": "people-select-cpn"
|
|
11447
|
+
}, [trigger, vue.createVNode(vue.resolveComponent("a-modal"), {
|
|
11448
|
+
"wrapClassName": "people-select-cpn-modal",
|
|
11449
|
+
"title": "\u6DFB\u52A0\u4EBA\u5458",
|
|
11450
|
+
"centered": true,
|
|
11451
|
+
"width": 900,
|
|
11452
|
+
"onOk": handleCommit,
|
|
11453
|
+
"onCancel": () => emit("update:open", false),
|
|
11454
|
+
"afterClose": onClose,
|
|
11455
|
+
"visible": modalOpen.value,
|
|
11456
|
+
"onUpdate:visible": $event => modalOpen.value = $event
|
|
11484
11457
|
}, {
|
|
11485
|
-
default: () => ["
|
|
11486
|
-
|
|
11487
|
-
"
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
"
|
|
11492
|
-
"
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11458
|
+
default: () => [vue.createVNode("div", {
|
|
11459
|
+
"class": "container"
|
|
11460
|
+
}, [vue.createVNode("div", {
|
|
11461
|
+
"class": "left"
|
|
11462
|
+
}, [vue.createVNode(SearchPeopleInput, {
|
|
11463
|
+
"list": formatList.value,
|
|
11464
|
+
"renderName": props.renderNameSearch,
|
|
11465
|
+
"onSelect": handleSelect
|
|
11466
|
+
}, null), vue.createVNode(DepBreadcrumb, {
|
|
11467
|
+
"list": formatList.value,
|
|
11468
|
+
"zoomedDep": zoomedList.value?.[0],
|
|
11469
|
+
"onCheck": handleSelectNode
|
|
11470
|
+
}, null), vue.createVNode(vue.resolveComponent("a-tree"), {
|
|
11471
|
+
"class": "tree",
|
|
11472
|
+
"checkable": true,
|
|
11473
|
+
"showLine": true,
|
|
11474
|
+
"blockNode": true,
|
|
11475
|
+
"autoExpandParent": true,
|
|
11476
|
+
"fieldNames": {
|
|
11477
|
+
children: "subList",
|
|
11478
|
+
key: "id",
|
|
11479
|
+
title: "name"
|
|
11480
|
+
},
|
|
11481
|
+
"treeData": zoomedList.value || formatList.value,
|
|
11482
|
+
"checkedKeys": selectedKeys.value,
|
|
11483
|
+
"onCheck": handleSelect,
|
|
11484
|
+
"onSelect": (keys, {
|
|
11485
|
+
node
|
|
11486
|
+
}) => handleSelectNode(node),
|
|
11487
|
+
"expandedKeys": expandKeys.value,
|
|
11488
|
+
"onUpdate:expandedKeys": $event => expandKeys.value = $event
|
|
11489
|
+
}, {
|
|
11490
|
+
title: node => vue.createVNode("div", {
|
|
11491
|
+
"class": "node-title"
|
|
11492
|
+
}, [vue.createVNode("span", {
|
|
11493
|
+
"class": "name"
|
|
11494
|
+
}, [node.name]), node.isDep && vue.createVNode("span", {
|
|
11495
|
+
"class": "count"
|
|
11496
|
+
}, [node.peopleCount, "\u4EBA"])])
|
|
11497
|
+
})]), vue.createVNode("div", {
|
|
11498
|
+
"class": "right"
|
|
11499
|
+
}, [vue.createVNode("div", {
|
|
11500
|
+
"class": "header"
|
|
11501
|
+
}, [vue.createVNode("h2", {
|
|
11502
|
+
"class": "title"
|
|
11503
|
+
}, ["\u5DF2\u9009\u4EBA\u5458", vue.createVNode("span", {
|
|
11504
|
+
"class": "select-text"
|
|
11505
|
+
}, ["\uFF08\u5DF2\u9009\u62E9", vue.createVNode("em", null, [selectPeopleList.value.length]), "\u4EBA\uFF09"])]), vue.createVNode(vue.resolveComponent("a-button"), {
|
|
11506
|
+
"type": "link",
|
|
11507
|
+
"disabled": !selectPeopleList.value.length,
|
|
11508
|
+
"onClick": handleClear
|
|
11509
|
+
}, {
|
|
11510
|
+
default: () => ["\u6E05\u7A7A"]
|
|
11511
|
+
})]), vue.createVNode("div", {
|
|
11512
|
+
"class": "selected-container"
|
|
11513
|
+
}, [selectPeopleList.value.length ? selectPeopleList.value.map(people => {
|
|
11514
|
+
let _slot;
|
|
11515
|
+
return vue.createVNode(vue.resolveComponent("a-tag"), {
|
|
11516
|
+
"key": people.userId,
|
|
11517
|
+
"closable": true,
|
|
11518
|
+
"onClose": () => handleDelete(people)
|
|
11519
|
+
}, _isSlot$6(_slot = props.renderNameTag(people)) ? _slot : {
|
|
11520
|
+
default: () => [_slot]
|
|
11521
|
+
});
|
|
11522
|
+
}) : vue.createVNode(vue.resolveComponent("a-empty"), {
|
|
11523
|
+
"style": {
|
|
11524
|
+
width: "100%",
|
|
11525
|
+
paddingTop: "10%"
|
|
11526
|
+
},
|
|
11527
|
+
"description": "\u6682\u65E0"
|
|
11528
|
+
}, null)])])])]
|
|
11529
|
+
})]);
|
|
11530
|
+
};
|
|
11505
11531
|
}
|
|
11506
11532
|
});
|
|
11507
11533
|
var index$3 = installComponent(PeopleSelect, "people-select");
|
|
@@ -848,6 +848,14 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
848
848
|
type: PropType<string[]>;
|
|
849
849
|
default: () => never[];
|
|
850
850
|
};
|
|
851
|
+
open: {
|
|
852
|
+
type: BooleanConstructor;
|
|
853
|
+
default: undefined;
|
|
854
|
+
};
|
|
855
|
+
renderBtn: {
|
|
856
|
+
type: BooleanConstructor;
|
|
857
|
+
default: boolean;
|
|
858
|
+
};
|
|
851
859
|
buttonText: {
|
|
852
860
|
type: StringConstructor;
|
|
853
861
|
default: string;
|
|
@@ -868,7 +876,7 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
868
876
|
type: PropType<RenderName>;
|
|
869
877
|
default: (people: any, dep: any) => string;
|
|
870
878
|
};
|
|
871
|
-
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:value"[], "update:value", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
879
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "close" | "update:value" | "update:open")[], "change" | "close" | "update:value" | "update:open", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
872
880
|
list: {
|
|
873
881
|
type: PropType<any[]>;
|
|
874
882
|
default: () => never[];
|
|
@@ -877,6 +885,14 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
877
885
|
type: PropType<string[]>;
|
|
878
886
|
default: () => never[];
|
|
879
887
|
};
|
|
888
|
+
open: {
|
|
889
|
+
type: BooleanConstructor;
|
|
890
|
+
default: undefined;
|
|
891
|
+
};
|
|
892
|
+
renderBtn: {
|
|
893
|
+
type: BooleanConstructor;
|
|
894
|
+
default: boolean;
|
|
895
|
+
};
|
|
880
896
|
buttonText: {
|
|
881
897
|
type: StringConstructor;
|
|
882
898
|
default: string;
|
|
@@ -898,10 +914,15 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
898
914
|
default: (people: any, dep: any) => string;
|
|
899
915
|
};
|
|
900
916
|
}>> & {
|
|
917
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
918
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
901
919
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
920
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
902
921
|
}, {
|
|
903
922
|
value: string[];
|
|
904
923
|
list: any[];
|
|
924
|
+
open: boolean;
|
|
925
|
+
renderBtn: boolean;
|
|
905
926
|
buttonText: string;
|
|
906
927
|
propNames: PropNames;
|
|
907
928
|
renderNameTree: RenderName;
|