30a39a296d
* pick form
* pick message
* pick room
* fix lint
* fix scroll?
* fix scroll.ts
* fix directives/sticky-container
* update global/sticky-container.vue
* fix, 🎨
* test.1
17 lines
641 B
TypeScript
17 lines
641 B
TypeScript
import { Directive } from 'vue';
|
|
|
|
export default {
|
|
mounted(src, binding, vn) {
|
|
//const query = binding.value;
|
|
|
|
const header = src.children[0];
|
|
const body = src.children[1];
|
|
const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop') || '0px';
|
|
src.style.setProperty('--stickyTop', `calc(${currentStickyTop} + ${header.offsetHeight}px)`);
|
|
if (body) body.dataset.stickyContainerHeaderHeight = header.offsetHeight.toString();
|
|
header.style.setProperty('--stickyTop', currentStickyTop);
|
|
header.style.position = 'sticky';
|
|
header.style.top = 'var(--stickyTop)';
|
|
header.style.zIndex = '1';
|
|
},
|
|
} as Directive;
|