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

fix(h5): wxs removeClass

上级 2b52666d
......@@ -104,7 +104,7 @@ class ComponentDescriptor {
const wxsClsArr = getWxsClsArr(clsArr, classList, false)
if (wxsClsArr.length) {
const removeWxsClsArr = []
addWxsClsArr.length && wxsClsArr.forEach(cls => {
wxsClsArr.forEach(cls => {
const clsIndex = addWxsClsArr.findIndex(oldCls => oldCls === cls)
if (clsIndex !== -1) { // 在 addWxsClass 中
addWxsClsArr.splice(clsIndex, 1)
......@@ -112,7 +112,7 @@ class ComponentDescriptor {
removeWxsClsArr.push(cls)
}
})
this.$el.__wxsRemoveClsArr = removeWxsClsArr
this.$el.__wxsRemoveClass = removeWxsClsArr
this.$el.__wxsAddClass = addWxsClsArr.join(' ')
this.$vm.$forceUpdate()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册