adtec-core-package 0.8.9 → 0.9.1
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/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<template #content>
|
|
13
13
|
<!-- 此处的默认值先看tooltipContent有没有,没有就给默认content -->
|
|
14
14
|
<slot name="tooltipContent"
|
|
15
|
-
|
|
15
|
+
>{{ props.tooltipContent ? props.tooltipContent : props.content }}
|
|
16
16
|
</slot>
|
|
17
17
|
</template>
|
|
18
18
|
<div class="content" :style="{ width: props.width }" @mouseover="isShowTooltip">
|
|
@@ -46,10 +46,10 @@ const isShow = ref<boolean>(true)
|
|
|
46
46
|
const contentRef = ref()
|
|
47
47
|
const isShowTooltip = function (): void {
|
|
48
48
|
// 计算span标签的offsetWidth与盒子元素的offsetWidth,给isShow赋值
|
|
49
|
-
if (contentRef.value && contentRef.value.parentNode.offsetWidth
|
|
50
|
-
isShow.value = true
|
|
51
|
-
} else {
|
|
49
|
+
if (contentRef.value && contentRef.value.parentNode.offsetWidth < contentRef.value.offsetWidth) {
|
|
52
50
|
isShow.value = false
|
|
51
|
+
} else {
|
|
52
|
+
isShow.value = true
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
</script>
|
|
@@ -58,9 +58,5 @@ const isShowTooltip = function (): void {
|
|
|
58
58
|
overflow: hidden;
|
|
59
59
|
white-space: nowrap;
|
|
60
60
|
text-overflow: ellipsis;
|
|
61
|
-
:deep(.el-text) {
|
|
62
|
-
height: 100%;
|
|
63
|
-
vertical-align: middle;
|
|
64
|
-
}
|
|
65
61
|
}
|
|
66
62
|
</style>
|
package/src/utils/AxiosConfig.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { useEventBus } from '@vueuse/core'
|
|
|
17
17
|
/** 是否正在刷新的标志 */
|
|
18
18
|
let isRefreshing = false
|
|
19
19
|
const loginAgainBus = useEventBus<string>('loginAgainBus')
|
|
20
|
+
import WujieVue from 'wujie-vue3'
|
|
20
21
|
/** 存储请求的数组 */
|
|
21
22
|
let requests: any[] = []
|
|
22
23
|
const request = axios.create({
|
|
@@ -138,6 +139,7 @@ request.interceptors.response.use(
|
|
|
138
139
|
grouping: true,
|
|
139
140
|
})
|
|
140
141
|
loginAgainBus.emit('loginAgain')
|
|
142
|
+
WujieVue.bus.$emit('loginAgain')
|
|
141
143
|
throw {
|
|
142
144
|
code: '10508',
|
|
143
145
|
msg: '用户信息已过期,请重新登录',
|
|
@@ -188,6 +190,7 @@ export default <T = any>(config: any) => {
|
|
|
188
190
|
grouping: true,
|
|
189
191
|
})
|
|
190
192
|
loginAgainBus.emit('loginAgain')
|
|
193
|
+
WujieVue.bus.$emit('loginAgain')
|
|
191
194
|
throw {
|
|
192
195
|
code: data.code,
|
|
193
196
|
msg: data.msg,
|