1.0.1 • Published 1 year ago

@shlko/v2-fake-fragment v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

v2-fake-fragment

npm

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`"

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>
1.0.1

1 year ago

1.0.0

1 year ago