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

fix(app): add insert action

上级 345abd76
......@@ -212,9 +212,11 @@ export default class UniPageNode extends UniNode implements IUniPageNode {
createAction[5] = extras as UniNodeJSON
}
} else {
if (__DEV__) {
console.error(formatLog(`Insert`, action, 'not found createAction'))
}
// 部分手机上,create 和 insert 可能不在同一批次,被分批发送
this.updateActions.push(action)
// if (__DEV__) {
// console.error(formatLog(`Insert`, action, 'not found createAction'))
// }
}
break
}
......
......@@ -14,6 +14,7 @@ import {
formatLog,
ACTION_TYPE_PAGE_SCROLL,
ACTION_TYPE_ADD_WXS_EVENT,
ACTION_TYPE_INSERT,
} from '@dcloudio/uni-shared'
import { UniNodeJSONMinify } from 'packages/uni-shared/src/vdom/Node'
import { ACTION_TYPE_DICT, DictAction, Dictionary } from '../../../constants'
......@@ -64,8 +65,8 @@ function onPageUpdateSync(actions: (PageAction | DictAction)[]) {
action[4],
decodeNodeJson(getDict, action[5] as UniNodeJSONMinify)
)
// case ACTION_TYPE_INSERT:
// return $(action[1]).insert(action[2], action[3])
case ACTION_TYPE_INSERT:
return $(action[1]).insert(action[2], action[3])
case ACTION_TYPE_REMOVE:
return $(action[1]).remove()
case ACTION_TYPE_SET_ATTRIBUTE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册