提交 a924e69c 编写于 作者: fxy060608's avatar fxy060608

feat(v3): add removeElementByCid

上级 40391f00
...@@ -158,6 +158,13 @@ export class VDomSync { ...@@ -158,6 +158,13 @@ export class VDomSync {
this.elements.splice(elmIndex, 1) this.elements.splice(elmIndex, 1)
} }
removeElementByCid (cid) {
if (!cid) {
return
}
this.elements = this.elements.filter(elm => elm.cid !== cid)
}
push (type, cid, data, options) { push (type, cid, data, options) {
const typeData = [cid, data] const typeData = [cid, data]
if (options) { if (options) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册