vue-utility-addbrotherdom v1.2.0
vue-utility-addbrotherdom
这个工具包主要用来向一个目标元素添加一个等宽的 div 元素;
目标元素的父元素的样式会变为style='display:flex; flex-direction:row; width:100%; height:100%;'
this utility used to add a brother div element of target element, which has same width with target element
its parent element will be change style='display:flex; flex-direction:row; width:100%; height:100%;'
usage:
stage first:
npm i vue-utility-addbrotherdom --save
stage second:
import vueUtilityAddBrother from 'vue-utility-addbrotherdom'
Vue.sue(vueUtilityAddBrother )
Methods Introduction:
pd_addBrotherElement(targetElementId:string, brotherElementId:string)=> brotherElement:Element
该方法用来向一个id=targetElementId
的元素添加一个id=brotherElementId
的 div 元素
this method used to add a div element, which property id=brotherElement
pd_removeBrotherElement(elementId:string)=> void
该方法用来删除一个id=elementid
的元素
this method used to delete a element called 'elementid'
pd_hasBrotherElement(targetElementId:string, brotherElementId:string)=> boolean
该方法返回一个 boolean
如果这个 boolean 为 true 则id=targetElementId
的元素包含一个id=brotherElementId
的元素,
反之则不包含
this method used to verify the element which property id=targetElementId
has the brother element which property id=brotherElementId