@shlko/v2-ele-insight
v1.0.1
Published
A simple vue directive for element scorll insight with IntersectionObserver
Downloads
72
Maintainers
Readme
v2-fake-fragment
In Vue 3, multiple root nodes can be used, which makes maintaining old Vue 2.7 projects very unpleasant since the component's root node must exist and only one node is permitted.
Important
As of now v2-fake-fragment is published on npm, if you are using vue3 this is useless.
Features
- remove current element without concern about the child nodes being removed at the same time
Installation
npm i @shlko/v2-fake-fragment
Modifiers
to
: Used to confirm the child nodes order in the parent children, default to current location- Example:
v-fake-fragment:to="`first`"
- Example:
v-fake-fragment:to="`last`"
- Example:
Setup
Using v2-fake-fragment
Globally:
import v2FakeFragment from "@shlko/v2-fake-fragment";
import Vue from "vue";
Vue.use(v2FakeFragment);
Usage
Example:
<div class="parent">
<div v2-fake-fragment:to="`first`">
...childNodes
</div>
</div>