inl-ui 0.1.44 → 0.1.46
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 +35 -9
- package/dist/components/index.js +37 -11
- package/dist/iconfont.js +1 -1
- package/dist/index.cjs +36 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +37 -11
- package/dist/style.css +1 -1
- 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
|
+
|
|
@@ -6542,7 +6542,7 @@ function getOpenUrl(url) {
|
|
|
6542
6542
|
|
|
6543
6543
|
const closeTabMagicKey = "control_shift_q";
|
|
6544
6544
|
const TabList = vue.defineComponent({
|
|
6545
|
-
emits: ["update:activeKey", "update:list", "tabSelect", "closeExtraPage", "closeIframePage", "fullscreen", "refreshIframe", "refreshExtraPage"],
|
|
6545
|
+
emits: ["update:activeKey", "update:list", "tabSelect", "closeExtraPage", "closeIframePage", "fullscreen", "refreshIframe", "refreshExtraPage", "mouseLeave"],
|
|
6546
6546
|
props: {
|
|
6547
6547
|
list: {
|
|
6548
6548
|
type: Array,
|
|
@@ -6550,13 +6550,21 @@ const TabList = vue.defineComponent({
|
|
|
6550
6550
|
},
|
|
6551
6551
|
activeKey: {
|
|
6552
6552
|
type: String
|
|
6553
|
-
}
|
|
6553
|
+
},
|
|
6554
|
+
containerRef: Object
|
|
6554
6555
|
},
|
|
6555
6556
|
setup(props, {
|
|
6556
6557
|
emit,
|
|
6557
6558
|
expose
|
|
6558
6559
|
}) {
|
|
6559
6560
|
const qiankunState = vue.inject("qiankunState");
|
|
6561
|
+
const tabListRef = vue.ref();
|
|
6562
|
+
const {
|
|
6563
|
+
isOutside
|
|
6564
|
+
} = core.useMouseInElement(tabListRef);
|
|
6565
|
+
vue.watchEffect(() => {
|
|
6566
|
+
if (isOutside.value) emit("mouseLeave");
|
|
6567
|
+
});
|
|
6560
6568
|
const tabContainerRef = vue.ref();
|
|
6561
6569
|
const tabList = core.useVModel(props, "list", emit);
|
|
6562
6570
|
const activeTabKey = core.useVModel(props, "activeKey", emit);
|
|
@@ -6721,7 +6729,8 @@ const TabList = vue.defineComponent({
|
|
|
6721
6729
|
closeTab
|
|
6722
6730
|
});
|
|
6723
6731
|
return () => vue.createVNode("div", {
|
|
6724
|
-
"class": "tab-list"
|
|
6732
|
+
"class": "tab-list",
|
|
6733
|
+
"ref": tabListRef
|
|
6725
6734
|
}, [vue.createVNode("div", {
|
|
6726
6735
|
"class": "tabs-container",
|
|
6727
6736
|
"ref": tabContainerRef,
|
|
@@ -6730,7 +6739,8 @@ const TabList = vue.defineComponent({
|
|
|
6730
6739
|
"key": getTabUniqueKey(item),
|
|
6731
6740
|
"placement": "bottomLeft",
|
|
6732
6741
|
"trigger": ["contextmenu"],
|
|
6733
|
-
"overlayClassName": "tabs-search-dropdown"
|
|
6742
|
+
"overlayClassName": "tabs-search-dropdown",
|
|
6743
|
+
"getPopupContainer": () => props.containerRef.value
|
|
6734
6744
|
}, {
|
|
6735
6745
|
default: () => [vue.createVNode(antDesignVue.Tooltip, {
|
|
6736
6746
|
"title": item.name,
|
|
@@ -7061,7 +7071,21 @@ const PageContent = vue.defineComponent({
|
|
|
7061
7071
|
const {
|
|
7062
7072
|
isFullscreen,
|
|
7063
7073
|
enter
|
|
7064
|
-
} = core.useFullscreen(
|
|
7074
|
+
} = core.useFullscreen(containerRef);
|
|
7075
|
+
const {
|
|
7076
|
+
elementY
|
|
7077
|
+
} = core.useMouseInElement(containerRef);
|
|
7078
|
+
const isTabsShow = vue.ref(false);
|
|
7079
|
+
vue.watchEffect(() => {
|
|
7080
|
+
if (isFullscreen.value) {
|
|
7081
|
+
isTabsShow.value = false;
|
|
7082
|
+
}
|
|
7083
|
+
});
|
|
7084
|
+
vue.watchEffect(() => {
|
|
7085
|
+
if (elementY.value < 10) {
|
|
7086
|
+
isTabsShow.value = true;
|
|
7087
|
+
}
|
|
7088
|
+
});
|
|
7065
7089
|
const isPadding = vue.computed(() => {
|
|
7066
7090
|
let iframePadding = false;
|
|
7067
7091
|
if (activeKey.value) {
|
|
@@ -7129,19 +7153,21 @@ const PageContent = vue.defineComponent({
|
|
|
7129
7153
|
return () => vue.createVNode("div", {
|
|
7130
7154
|
"class": "page-content",
|
|
7131
7155
|
"ref": containerRef
|
|
7132
|
-
}, [props.showTabList && vue.createVNode(TabList, {
|
|
7156
|
+
}, [props.showTabList && vue.withDirectives(vue.createVNode(TabList, {
|
|
7133
7157
|
"ref": tabListRef,
|
|
7134
7158
|
"activeKey": activeKey.value,
|
|
7135
7159
|
"onUpdate:activeKey": $event => activeKey.value = $event,
|
|
7136
7160
|
"list": tabList.value,
|
|
7137
7161
|
"onUpdate:list": $event => tabList.value = $event,
|
|
7162
|
+
"containerRef": containerRef,
|
|
7138
7163
|
"onTabSelect": onTabSelect,
|
|
7139
7164
|
"onCloseExtraPage": handleExtraPageClose,
|
|
7140
7165
|
"onCloseIframePage": handleIframePageClose,
|
|
7141
7166
|
"onFullscreen": handleFullscreen,
|
|
7142
7167
|
"onRefreshIframe": handleRefreshIframe,
|
|
7143
|
-
"onRefreshExtraPage": handleRefreshExtraPage
|
|
7144
|
-
|
|
7168
|
+
"onRefreshExtraPage": handleRefreshExtraPage,
|
|
7169
|
+
"onMouseLeave": () => isTabsShow.value = false
|
|
7170
|
+
}, null), [[vue.vShow, !isFullscreen.value || isTabsShow.value]]), vue.createVNode("div", {
|
|
7145
7171
|
"class": ["page-container", {
|
|
7146
7172
|
padding: isPadding.value,
|
|
7147
7173
|
fullscreen: isFullscreen.value
|
|
@@ -12807,7 +12833,7 @@ async function audioToText(file) {
|
|
|
12807
12833
|
}
|
|
12808
12834
|
const {
|
|
12809
12835
|
result
|
|
12810
|
-
} = await fetch(`/api/chat/v1/translate
|
|
12836
|
+
} = await fetch(`/api/chat/v1/translate?path=${path}&session_hash=1`, {
|
|
12811
12837
|
headers,
|
|
12812
12838
|
method: "POST"
|
|
12813
12839
|
}).then(res => res.json());
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, createVNode, ref, watch, resolveComponent, isVNode, inject, computed, onActivated, onDeactivated, onBeforeUnmount, nextTick, Fragment, withDirectives, vShow, toRaw, reactive, provide,
|
|
1
|
+
import { defineComponent, createVNode, ref, watch, resolveComponent, isVNode, inject, computed, onActivated, onDeactivated, onBeforeUnmount, watchEffect, nextTick, Fragment, withDirectives, vShow, toRaw, reactive, provide, createTextVNode, onMounted, KeepAlive, shallowRef, onBeforeMount, mergeProps, onBeforeUpdate, Teleport } from 'vue';
|
|
2
2
|
import { createFromIconfontCN, SearchOutlined, DownOutlined, PoweroffOutlined, MenuUnfoldOutlined, MenuFoldOutlined, SkinFilled, FullscreenOutlined, CaretUpOutlined, CaretRightOutlined, CaretDownOutlined, FileExcelTwoTone, InboxOutlined, MessageOutlined } from '@ant-design/icons-vue';
|
|
3
3
|
import { useRoute, useRouter } from 'vue-router';
|
|
4
|
-
import { useMounted, resolveRef, useThrottleFn, useVModel, useMagicKeys, whenever, watchArray, useEventListener, useSessionStorage, useFullscreen, useLocalStorage, useToggle, useElementBounding, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
|
|
4
|
+
import { useMounted, resolveRef, useThrottleFn, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useEventListener, useSessionStorage, useFullscreen, useLocalStorage, useToggle, useElementBounding, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
|
|
5
5
|
import axios$2 from 'axios';
|
|
6
6
|
import { message, Menu, MenuItem, Input as Input$1, Badge, Avatar as Avatar$1, MenuDivider, Modal, SubMenu, Dropdown, Tooltip, Select, Layout as Layout$1, LayoutHeader, LayoutSider, LayoutContent, Form, Row, Col, FormItem, SelectOption, Switch, InputNumber } from 'ant-design-vue';
|
|
7
7
|
import _, { isPlainObject as isPlainObject$1, omit, differenceBy, isObject as isObject$2, concat } from 'lodash';
|
|
@@ -6531,7 +6531,7 @@ function getOpenUrl(url) {
|
|
|
6531
6531
|
|
|
6532
6532
|
const closeTabMagicKey = "control_shift_q";
|
|
6533
6533
|
const TabList = defineComponent({
|
|
6534
|
-
emits: ["update:activeKey", "update:list", "tabSelect", "closeExtraPage", "closeIframePage", "fullscreen", "refreshIframe", "refreshExtraPage"],
|
|
6534
|
+
emits: ["update:activeKey", "update:list", "tabSelect", "closeExtraPage", "closeIframePage", "fullscreen", "refreshIframe", "refreshExtraPage", "mouseLeave"],
|
|
6535
6535
|
props: {
|
|
6536
6536
|
list: {
|
|
6537
6537
|
type: Array,
|
|
@@ -6539,13 +6539,21 @@ const TabList = defineComponent({
|
|
|
6539
6539
|
},
|
|
6540
6540
|
activeKey: {
|
|
6541
6541
|
type: String
|
|
6542
|
-
}
|
|
6542
|
+
},
|
|
6543
|
+
containerRef: Object
|
|
6543
6544
|
},
|
|
6544
6545
|
setup(props, {
|
|
6545
6546
|
emit,
|
|
6546
6547
|
expose
|
|
6547
6548
|
}) {
|
|
6548
6549
|
const qiankunState = inject("qiankunState");
|
|
6550
|
+
const tabListRef = ref();
|
|
6551
|
+
const {
|
|
6552
|
+
isOutside
|
|
6553
|
+
} = useMouseInElement(tabListRef);
|
|
6554
|
+
watchEffect(() => {
|
|
6555
|
+
if (isOutside.value) emit("mouseLeave");
|
|
6556
|
+
});
|
|
6549
6557
|
const tabContainerRef = ref();
|
|
6550
6558
|
const tabList = useVModel(props, "list", emit);
|
|
6551
6559
|
const activeTabKey = useVModel(props, "activeKey", emit);
|
|
@@ -6710,7 +6718,8 @@ const TabList = defineComponent({
|
|
|
6710
6718
|
closeTab
|
|
6711
6719
|
});
|
|
6712
6720
|
return () => createVNode("div", {
|
|
6713
|
-
"class": "tab-list"
|
|
6721
|
+
"class": "tab-list",
|
|
6722
|
+
"ref": tabListRef
|
|
6714
6723
|
}, [createVNode("div", {
|
|
6715
6724
|
"class": "tabs-container",
|
|
6716
6725
|
"ref": tabContainerRef,
|
|
@@ -6719,7 +6728,8 @@ const TabList = defineComponent({
|
|
|
6719
6728
|
"key": getTabUniqueKey(item),
|
|
6720
6729
|
"placement": "bottomLeft",
|
|
6721
6730
|
"trigger": ["contextmenu"],
|
|
6722
|
-
"overlayClassName": "tabs-search-dropdown"
|
|
6731
|
+
"overlayClassName": "tabs-search-dropdown",
|
|
6732
|
+
"getPopupContainer": () => props.containerRef.value
|
|
6723
6733
|
}, {
|
|
6724
6734
|
default: () => [createVNode(Tooltip, {
|
|
6725
6735
|
"title": item.name,
|
|
@@ -7050,7 +7060,21 @@ const PageContent = defineComponent({
|
|
|
7050
7060
|
const {
|
|
7051
7061
|
isFullscreen,
|
|
7052
7062
|
enter
|
|
7053
|
-
} = useFullscreen(
|
|
7063
|
+
} = useFullscreen(containerRef);
|
|
7064
|
+
const {
|
|
7065
|
+
elementY
|
|
7066
|
+
} = useMouseInElement(containerRef);
|
|
7067
|
+
const isTabsShow = ref(false);
|
|
7068
|
+
watchEffect(() => {
|
|
7069
|
+
if (isFullscreen.value) {
|
|
7070
|
+
isTabsShow.value = false;
|
|
7071
|
+
}
|
|
7072
|
+
});
|
|
7073
|
+
watchEffect(() => {
|
|
7074
|
+
if (elementY.value < 10) {
|
|
7075
|
+
isTabsShow.value = true;
|
|
7076
|
+
}
|
|
7077
|
+
});
|
|
7054
7078
|
const isPadding = computed(() => {
|
|
7055
7079
|
let iframePadding = false;
|
|
7056
7080
|
if (activeKey.value) {
|
|
@@ -7118,19 +7142,21 @@ const PageContent = defineComponent({
|
|
|
7118
7142
|
return () => createVNode("div", {
|
|
7119
7143
|
"class": "page-content",
|
|
7120
7144
|
"ref": containerRef
|
|
7121
|
-
}, [props.showTabList && createVNode(TabList, {
|
|
7145
|
+
}, [props.showTabList && withDirectives(createVNode(TabList, {
|
|
7122
7146
|
"ref": tabListRef,
|
|
7123
7147
|
"activeKey": activeKey.value,
|
|
7124
7148
|
"onUpdate:activeKey": $event => activeKey.value = $event,
|
|
7125
7149
|
"list": tabList.value,
|
|
7126
7150
|
"onUpdate:list": $event => tabList.value = $event,
|
|
7151
|
+
"containerRef": containerRef,
|
|
7127
7152
|
"onTabSelect": onTabSelect,
|
|
7128
7153
|
"onCloseExtraPage": handleExtraPageClose,
|
|
7129
7154
|
"onCloseIframePage": handleIframePageClose,
|
|
7130
7155
|
"onFullscreen": handleFullscreen,
|
|
7131
7156
|
"onRefreshIframe": handleRefreshIframe,
|
|
7132
|
-
"onRefreshExtraPage": handleRefreshExtraPage
|
|
7133
|
-
|
|
7157
|
+
"onRefreshExtraPage": handleRefreshExtraPage,
|
|
7158
|
+
"onMouseLeave": () => isTabsShow.value = false
|
|
7159
|
+
}, null), [[vShow, !isFullscreen.value || isTabsShow.value]]), createVNode("div", {
|
|
7134
7160
|
"class": ["page-container", {
|
|
7135
7161
|
padding: isPadding.value,
|
|
7136
7162
|
fullscreen: isFullscreen.value
|
|
@@ -12796,7 +12822,7 @@ async function audioToText(file) {
|
|
|
12796
12822
|
}
|
|
12797
12823
|
const {
|
|
12798
12824
|
result
|
|
12799
|
-
} = await fetch(`/api/chat/v1/translate
|
|
12825
|
+
} = await fetch(`/api/chat/v1/translate?path=${path}&session_hash=1`, {
|
|
12800
12826
|
headers,
|
|
12801
12827
|
method: "POST"
|
|
12802
12828
|
}).then(res => res.json());
|