omi - fix remove attr
This commit is contained in:
parent
9464034403
commit
ee400d1f29
|
@ -24,3 +24,14 @@ export function proxyUpdate(ele) {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function proxyProps(ele) {
|
||||
ele.props = new JSONProxy(ele.props).observe(false, (patch) => {
|
||||
if(patch.path!== '/children'){
|
||||
ele.pureSetAttribute(patch.path.replace('/',''), patch.value)
|
||||
if (!ele._willUpdate) {
|
||||
ele.update()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -167,7 +167,9 @@ export default class WeElement extends HTMLElement {
|
|||
ele.props[key] = JSON.parse(val.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:([^\/])/g, '"$2":$4').replace(/'([\s\S]*?)'/g, '"$1"'))
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ele.props[key] = null
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue