Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
40
VApp/node_modules/vuetify/lib/components/VVirtualScroll/VVirtualScrollItem.mjs
generated
vendored
Normal file
40
VApp/node_modules/vuetify/lib/components/VVirtualScroll/VVirtualScrollItem.mjs
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
||||
// Composables
|
||||
import { makeComponentProps } from "../../composables/component.mjs";
|
||||
import { useResizeObserver } from "../../composables/resizeObserver.mjs"; // Utilities
|
||||
import { watch } from 'vue';
|
||||
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
||||
export const makeVVirtualScrollItemProps = propsFactory({
|
||||
renderless: Boolean,
|
||||
...makeComponentProps()
|
||||
}, 'VVirtualScrollItem');
|
||||
export const VVirtualScrollItem = genericComponent()({
|
||||
name: 'VVirtualScrollItem',
|
||||
inheritAttrs: false,
|
||||
props: makeVVirtualScrollItemProps(),
|
||||
emits: {
|
||||
'update:height': height => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
resizeRef,
|
||||
contentRect
|
||||
} = useResizeObserver(undefined, 'border');
|
||||
watch(() => contentRect.value?.height, height => {
|
||||
if (height != null) emit('update:height', height);
|
||||
});
|
||||
useRender(() => props.renderless ? _createVNode(_Fragment, null, [slots.default?.({
|
||||
itemRef: resizeRef
|
||||
})]) : _createVNode("div", _mergeProps({
|
||||
"ref": resizeRef,
|
||||
"class": ['v-virtual-scroll__item', props.class],
|
||||
"style": props.style
|
||||
}, attrs), [slots.default?.()]));
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VVirtualScrollItem.mjs.map
|
||||
Reference in New Issue
Block a user