diff --git a/packages/frontend/src/components/MkWindow.vue b/packages/frontend/src/components/MkWindow.vue index 687abed63..b662479b2 100644 --- a/packages/frontend/src/components/MkWindow.vue +++ b/packages/frontend/src/components/MkWindow.vue @@ -29,7 +29,7 @@ -
+
@@ -541,7 +541,7 @@ defineExpose({ flex: 1; overflow: auto; background: var(--panel); - container-type: inline-size; + container-type: size; } $handleSize: 8px; diff --git a/packages/frontend/src/directives/container.ts b/packages/frontend/src/directives/container.ts deleted file mode 100644 index a8a93eb9b..000000000 --- a/packages/frontend/src/directives/container.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Directive } from 'vue'; - -const map = new WeakMap(); - -export default { - mounted(el: HTMLElement, binding, vn) { - const ro = new ResizeObserver((entries, observer) => { - el.style.setProperty('--containerHeight', el.offsetHeight + 'px'); - }); - ro.observe(el); - map.set(el, ro); - }, - - unmounted(el, binding, vn) { - const ro = map.get(el); - if (ro) { - ro.disconnect(); - map.delete(el); - } - }, -} as Directive; diff --git a/packages/frontend/src/directives/index.ts b/packages/frontend/src/directives/index.ts index 064ee4f64..7847d661d 100644 --- a/packages/frontend/src/directives/index.ts +++ b/packages/frontend/src/directives/index.ts @@ -11,7 +11,6 @@ import clickAnime from './click-anime'; import panel from './panel'; import adaptiveBorder from './adaptive-border'; import adaptiveBg from './adaptive-bg'; -import container from './container'; export default function(app: App) { for (const [key, value] of Object.entries(directives)) { @@ -32,5 +31,4 @@ export const directives = { 'panel': panel, 'adaptive-border': adaptiveBorder, 'adaptive-bg': adaptiveBg, - 'container': container, }; diff --git a/packages/frontend/src/pages/channel.vue b/packages/frontend/src/pages/channel.vue index 0a2f66d4f..af1b4d205 100644 --- a/packages/frontend/src/pages/channel.vue +++ b/packages/frontend/src/pages/channel.vue @@ -206,7 +206,7 @@ definePageMetadata(computed(() => channel ? { diff --git a/packages/frontend/src/ui/universal.vue b/packages/frontend/src/ui/universal.vue index 246296751..1fd63910a 100644 --- a/packages/frontend/src/ui/universal.vue +++ b/packages/frontend/src/ui/universal.vue @@ -2,10 +2,10 @@
- +
-
+