1.0.5 • Published 3 years ago

xiao-you-transform-v3 v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

xiao-you-transform-v3

description

一个用来将字符串 Dom 节点转换成 Vue3 虚拟节点的库

A library use for make string HTML node transform Vue3 virtual Node

Install

npm i xiao-you-transform-v3

Use

Template Transfrom Node

import { templateTransformNodes } from 'xiao-you-transform-v3'

const template:string = `<div id="root"><span><i><b>11</b></i></span></div>`

const node = templateTransformNodes(template)
// node = HTML NODE

Node Transfrom VNodes

import {
    templateTransformNodes,
    nodesTransformVNodes
} from 'xiao-you-transform-v3'

const template:string = `<div id="root"><span><i><b>11</b></i></span></div>`

const nodes = templateTransformNodes(template)
// node = HTML NODE

const VNodes = nodesTransformVNodes(nodes)

// Use In Vue3

// 1. Use In Setup Function
setup(){
    return VNodes
}

//2. Use In Render Function

render(){
    return VNodes
}
1.0.2

3 years ago

1.0.1

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago