fix: 修改bug
This commit is contained in:
parent
6b9bf45825
commit
f03572e374
|
@ -2,7 +2,7 @@
|
||||||
<ResizeObserver @resize="onResize">
|
<ResizeObserver @resize="onResize">
|
||||||
<div class="tag-box" ref="box">
|
<div class="tag-box" ref="box">
|
||||||
<div v-for="(item, i) in value" :key="item.id" ref="tags">
|
<div v-for="(item, i) in value" :key="item.id" ref="tags">
|
||||||
<div v-if="i != _index" class="tag">
|
<div v-if="i !== _index" class="tag">
|
||||||
{{ item?.name }}
|
{{ item?.name }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
: {}
|
: {}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ offWidth ? item?.name : '...' }}
|
{{ offWidth ? item?.name + (_index < value.length ? '...' : '') : '...' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,6 +51,7 @@ const onResize = ({ width }: { width: number }) => {
|
||||||
if (total >= width) {
|
if (total >= width) {
|
||||||
_index.value = i;
|
_index.value = i;
|
||||||
offWidth.value = val > 40 ? val : 0;
|
offWidth.value = val > 40 ? val : 0;
|
||||||
|
console.log(i, offWidth.value)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,6 +82,7 @@ const onResize = ({ width }: { width: number }) => {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
padding: 0 14px;
|
padding: 0 14px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -105,9 +105,7 @@ const updateIframeStyle = () => {
|
||||||
const iframe = document.querySelector(
|
const iframe = document.querySelector(
|
||||||
'#notifier_iframe',
|
'#notifier_iframe',
|
||||||
) as HTMLIFrameElement;
|
) as HTMLIFrameElement;
|
||||||
console.log(iframe)
|
|
||||||
iframe.onload = () => {
|
iframe.onload = () => {
|
||||||
console.log(iframe?.contentWindow, '123')
|
|
||||||
const currentUrl = iframe?.contentWindow?.location?.search || '';
|
const currentUrl = iframe?.contentWindow?.location?.search || '';
|
||||||
let authCode = '';
|
let authCode = '';
|
||||||
if (currentUrl.startsWith('?')) {
|
if (currentUrl.startsWith('?')) {
|
||||||
|
|
Loading…
Reference in New Issue