mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat: Replace Vue.extend with defineComponent in design system (no-changelog) (#5918)
* refactor: replace new Vue() with custom event bus (no-changelog) * fix: export types from design system main * fix: update component types * fix: update form inputs event bus * refactor: replace global Vue references in design-system * refactor: update prop types * feat: improve types * fix: further type improvements * fix: further types improvements * fix: further type improvements * test: fix test snapshots * test: fix snapshot * chore: fix linting issues * test: fix personalization modal snapshot
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
PropType,
|
||||
nextTick,
|
||||
watch,
|
||||
ComponentPublicInstance,
|
||||
} from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -36,7 +37,7 @@ export default defineComponent({
|
||||
const wrapperRef = ref<HTMLElement | null>(null);
|
||||
const scrollerRef = ref<HTMLElement | null>(null);
|
||||
const itemsRef = ref<HTMLElement | null>(null);
|
||||
const itemRefs = ref<Record<string, HTMLElement | null>>({});
|
||||
const itemRefs = ref<Record<string, Element | ComponentPublicInstance | null>>({});
|
||||
|
||||
const scrollTop = ref(0);
|
||||
const wrapperHeight = ref(0);
|
||||
@@ -174,7 +175,7 @@ export default defineComponent({
|
||||
function onUpdateItemSize(item: { [key: string]: string }) {
|
||||
nextTick(() => {
|
||||
const itemId = item[props.itemKey];
|
||||
const itemRef = itemRefs.value[itemId];
|
||||
const itemRef = itemRefs.value[itemId] as HTMLElement;
|
||||
const previousSize = itemSizeCache.value[itemId];
|
||||
const size = itemRef ? itemRef.offsetHeight : props.itemSize;
|
||||
const difference = size - previousSize;
|
||||
|
||||
Reference in New Issue
Block a user