vue3+TS学习(coderwhy)
skylon2
前端爱好者!
展开
-
mini-vue(coderwhy学习笔记)
function createApp(rootComponent) { return { mount(selector) { const container = document.querySelector(selector) let oldVNode; let isMounted = false; watchEffect(function() { if.原创 2021-09-01 11:49:59 · 188 阅读 · 0 评论 -
mini-vue 渲染器实现(coderwhy学习视频笔记)
const h = (tag, props, childern) => { return { tag, props, childern } } const mount = (vnode, container) => { const el = vnode.el = document.createElement(vnode.tag) if (vnode.props) { for (const key .原创 2021-08-31 14:15:48 · 128 阅读 · 0 评论