-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.drawio
More file actions
264 lines (264 loc) · 55.3 KB
/
Copy pathvue.drawio
File metadata and controls
264 lines (264 loc) · 55.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<mxfile host="app.diagrams.net" modified="2022-08-28T04:51:41.754Z" agent="5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" etag="MwuPZTbBAERbL8h7Oldd" version="20.2.7" type="github">
<diagram name="Page-1" id="c7558073-3199-34d8-9f00-42111426c3f3">
<mxGraphModel dx="1038" dy="1708" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="826" pageHeight="1169" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="2" value="<p style="margin: 4px 0px 0px;"><u>// 初始化一个应用的方式如下</u></p><p style="margin: 4px 0px 0px;"><u><br></u></p><p style="margin: 4px 0px 0px;"><u>import { createApp } from 'vue'</u></p><p style="margin: 4px 0px 0px;"><u><br></u></p><p style="margin: 4px 0px 0px;"><u>import App from './app'</u></p><p style="margin: 4px 0px 0px;"><u><br></u></p><p style="margin: 4px 0px 0px;"><u>const app = <font color="#ff0080">createApp(App)</font></u></p><p style="margin: 4px 0px 0px;"><u><br></u></p><p style="margin: 4px 0px 0px;"><u>app.mount('#app')</u></p><div><br></div>" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#E6FFCC" parent="1" vertex="1">
<mxGeometry x="184" y="140" width="276" height="176" as="geometry" />
</mxCell>
<object label="Vue3" id="5">
<mxCell style="shape=process;whiteSpace=wrap;align=center;verticalAlign=middle;size=0.0475;fontStyle=1;strokeWidth=3;fillColor=#FFCCCC" parent="1" vertex="1">
<mxGeometry x="201" y="391" width="249" height="50" as="geometry" />
</mxCell>
</object>
<mxCell id="56" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;strokeColor=#990000;strokeWidth=2" parent="1" source="2" target="5" edge="1">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="50" y="500" as="sourcePoint" />
<mxPoint x="150" y="400" as="targetPoint" />
<Array as="points">
<mxPoint x="320" y="330" />
<mxPoint x="290" y="350" />
<mxPoint x="280" y="360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="57" value="创建实例" style="text;spacingTop=-5;align=center" parent="1" vertex="1">
<mxGeometry x="306" y="341" width="30" height="20" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-98" value="<div style="text-align: left;"><b>const <font color="#cc0066">createApp</font> = ((...args) =&gt; {</b></div><div style="text-align: left;"><b><br></b></div><div style="text-align: left;"><b><font color="#0000cc">&nbsp; </font><font color="#0000ff">// 创建 app 对象</font></b></div><div style="text-align: left;"><b>&nbsp; const app = <font color="#cc0066">ensureRenderer</font>().createApp(...args)</b></div><div style="text-align: left;"><b>&nbsp; const { mount } = app</b></div><div style="text-align: left;"><b><br></b></div><div style="text-align: left;"><b>&nbsp;<font color="#0000ff"> // 重写 mount 方法</font></b></div><div style="text-align: left;"><b>&nbsp; <font color="#cc0066">app.mount</font> = (containerOrSelector) =&gt; {</b></div><div style="text-align: left;"><b>&nbsp; &nbsp; // ...</b></div><div style="text-align: left;"><b>&nbsp; }</b></div><div style="text-align: left;"><b><br></b></div><div style="text-align: left;"><b>&nbsp; return app</b></div><div style="text-align: left;"><b>})</b></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="510" y="30" width="340" height="320" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-100" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#000000;jumpSize=4;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="460" y="230" as="sourcePoint" />
<mxPoint x="510" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-102" value="<div><font color="#000000"><b>// 渲染相关的一些配置,比如更新属性的方法,操作 DOM 的方法</b></font></div><div><font color="#000000"><b>const rendererOptions = {...</b></font><b style="background-color: initial;">}</b></div><div><font color="#000000"><b><br></b></font></div><div><font color="#000000"><b>let renderer</b></font></div><div><font color="#000000"><b><br></b></font></div><div><font color="#000000"><b>// 延时创建渲染器,当用户只依赖响应式包的时候,可以通过 tree-shaking 移除核心渲染逻辑相关的代码</b></font></div><div><font color="#000000"><b>function ensureRenderer() {</b></font></div><div><font color="#000000"><b>&nbsp; return renderer || (renderer = createRenderer(rendererOptions))</b></font></div><div><font color="#000000"><b>}</b></font></div><div><font color="#000000"><b>function createRenderer(options) {</b></font></div><div><font color="#000000"><b>&nbsp; return baseCreateRenderer(options)</b></font></div><div><font color="#000000"><b>}</b></font></div><div><b style="">function <font color="#cc0066">baseCreateRenderer</font>(options) {</b></div><div><b style="">&nbsp; function <font color="#cc0066">render</font>(vnode, container) {</b></div><div><b style="">&nbsp; &nbsp;<font color="#0000ff"> // 组件渲染的核心逻辑</font></b></div><div><font color="#000000"><b>&nbsp; }</b></font></div><div><font color="#000000"><b>&nbsp; return {</b></font></div><div><font color="#000000"><b>&nbsp; &nbsp; render,</b></font></div><div><b style="">&nbsp; &nbsp; createApp: <font color="#cc0066">createAppAPI</font>(render)</b></div><div><font color="#000000"><b>&nbsp; }</b></font></div><div><font color="#000000"><b>}</b></font></div><div><font color="#000000"><b><br></b></font></div><div><br></div><div><br></div>" style="whiteSpace=wrap;html=1;aspect=fixed;align=left;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="980" y="-10" width="370" height="370" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-103" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="p2N06ffcsC0MJF7vxpci-105" target="p2N06ffcsC0MJF7vxpci-102">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="850" y="150" as="sourcePoint" />
<mxPoint x="900" y="100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-105" value="<b style="text-align: left;"><font color="#cc0000">ensureRenderer</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#0000FF;" vertex="1" parent="1">
<mxGeometry x="900" y="150" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-106" value="" style="endArrow=none;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" target="p2N06ffcsC0MJF7vxpci-105">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="850" y="150" as="sourcePoint" />
<mxPoint x="960" y="228" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-107" value="<div style="text-align: left;"><font style=""><b style="">function <font color="#cc0066">createAppAPI</font>(render) {</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; // createApp createApp 方法接受的两个参数:根组件的对象和 prop</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; return function createApp(rootComponent, rootProps = null) {</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; const app = {</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; &nbsp; _component: rootComponent,</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; &nbsp; _props: rootProps,</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; &nbsp; mount(rootContainer) {</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><b>&nbsp; &nbsp; &nbsp; &nbsp;<font color="#0000ff">&nbsp;// 创建根组件的 vnode</font></b></div><div style="color: rgb(0, 0, 0); text-align: left;"><b>&nbsp; &nbsp; &nbsp;&nbsp;<font color="#cc0066">&nbsp; const vnode = createVNode(rootComponent, rootProps)</font></b></div><div style="color: rgb(0, 0, 0); text-align: left;"><b>&nbsp; &nbsp; &nbsp; &nbsp;<font color="#0000ff">&nbsp;// 利用渲染器渲染 vnode</font></b></div><div style="color: rgb(0, 0, 0); text-align: left;"><b>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<font color="#cc0066">render(vnode, rootContainer)</font></b></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; &nbsp; &nbsp; app._container = rootContainer</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; &nbsp; &nbsp; return vnode.component.proxy</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; &nbsp; }</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b><br></b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; }</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; &nbsp; return app</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>&nbsp; }</b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b><br></b></font></div><div style="color: rgb(0, 0, 0); text-align: left;"><font color="#000000"><b>}</b></font></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="1450" y="-5" width="380" height="340" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-110" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;" edge="1" parent="1" target="p2N06ffcsC0MJF7vxpci-107">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1350" y="170" as="sourcePoint" />
<mxPoint x="1400" y="120" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-111" value="<div><b>app.mount = (containerOrSelector) =&gt; {</b></div><div><b>&nbsp; // 标准化容器</b></div><div><b>&nbsp; const container = normalizeContainer(containerOrSelector)</b></div><div>&nbsp;......</div><div><b>&nbsp; const component = app._component</b></div><div><b><br></b></div><div><b>&nbsp; &nbsp;// 如组件对象没定义 render 函数和 template ,取容器的 innerHTML 作为组件模板内容</b></div><div><b><br></b></div><div><b>&nbsp; if (!isFunction(component) &amp;&amp; !component.render &amp;&amp; !component.template) {</b></div><div><b><br></b></div><div><b>&nbsp; &nbsp; component.template = container.innerHTML</b></div><div><b><br></b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>&nbsp; // 挂载前清空容器内容</b></div><div><b>&nbsp; container.innerHTML = ''</b></div><div><b><br></b></div><div><b>&nbsp; // 真正的挂载,调用createAppApi里的mount</b></div><div><b>&nbsp; return <font color="#cc0066">mount</font>(container)</b></div><div><b><br></b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="510" y="-430" width="490" height="390" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-112" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;entryX=0.551;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="761" y="30" as="sourcePoint" />
<mxPoint x="760.99" y="-40" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-113" value="<b><font color="#cc0000">createAppApi</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#CC0066;" vertex="1" parent="1">
<mxGeometry x="1370" y="130" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-114" value="<b>重写app.mount</b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#CC0000;" vertex="1" parent="1">
<mxGeometry x="760" y="-20" width="70" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-119" value="" style="endArrow=none;dashed=1;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;entryX=-0.006;entryY=0.022;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="p2N06ffcsC0MJF7vxpci-107">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1000" y="-130" as="sourcePoint" />
<mxPoint x="1050" y="-180" as="targetPoint" />
<Array as="points">
<mxPoint x="1260" y="-120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-121" value="<b><font color="#cc0000">mount重写之后再调用最初的</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#CC0066;" vertex="1" parent="1">
<mxGeometry x="1220" y="-140" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-122" value="<div><b><font color="#000000">function </font><font color="#cc0066">createVNode</font><font color="#000000">(type, props = null</font></b><b style="background-color: initial;"><font color="#000000">,children = null) {</font></b></div><div><b><font color="#000000">&nbsp; if (props) {</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; // 处理 props 相关逻辑,标准化 class 和 style</font></b></div><div><b><font color="#000000">&nbsp; }</font></b></div><div><b><font color="#000000">&nbsp; // 对 vnode 类型信息编码</font></b></div><div><b><font color="#000000">&nbsp; const shapeFlag = isString(type)</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; ? 1 /* ELEMENT */&nbsp;</font></b><b style="background-color: initial;"><font color="#000000">: isSuspense(type)</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; ? 128 /* SUSPENSE */&nbsp;</font></b><b style="background-color: initial;"><font color="#000000">: isTeleport(type)</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; ? 64 /* TELEPORT */&nbsp;&nbsp;</font></b><b style="background-color: initial;"><font color="#000000">: isObject(type)</font></b></div><div><b style="background-color: initial;"><font color="#000000">&nbsp; &nbsp; ? 4 /* STATEFUL_COMPONENT */</font></b><b style="background-color: initial;"><font color="#000000">: isFunction(type)</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; ? 2 /* FUNCTIONAL_COMPONENT */&nbsp;</font></b><b style="background-color: initial;"><font color="#000000">: 0</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">&nbsp; const vnode = {</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; type,</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; props,</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; shapeFlag,</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; // 一些其他属性</font></b></div><div><b><font color="#000000">&nbsp; }</font></b></div><div><b><font color="#000000">&nbsp; // 标准化子节点,把不同数据类型的 children 转成数组或者文本类型</font></b></div><div><b><font color="#000000">&nbsp; </font><font color="#cc0066">normalizeChildren</font><font color="#000000">(vnode, children)</font></b></div><div><b><font color="#000000">&nbsp; return vnode</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">}</font></b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;align=left;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="1445" y="380" width="390" height="380" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-126" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#000000;jumpSize=4;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="p2N06ffcsC0MJF7vxpci-107">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1639.99" y="355" as="sourcePoint" />
<mxPoint x="1639.5" y="380" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-127" value="<div><b style="background-color: initial;"><font color="#000000">const render = (vnode, container) =&gt; {</font></b></div><div><b><font color="#000000">&nbsp; if (vnode == null) {</font></b></div><div><b><font color="#000000">&nbsp; &nbsp;</font><font color="#0000ff"> // 销毁组件</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; if (container._vnode) {</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; &nbsp; </font><font color="#cc0066">unmount</font><font color="#000000">(container._vnode, null, null, true)</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; }</font></b></div><div><b><font color="#000000">&nbsp; } else {</font></b></div><div><b><font color="#000000">&nbsp; </font><font color="#0000ff">&nbsp; // 创建或者更新组件</font></b></div><div><b><font color="#000000">&nbsp; &nbsp; </font><font color="#cc0066">patch(container._vnode || null, vnode, container)</font></b></div><div><b><font color="#000000">&nbsp; }</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">&nbsp; // 缓存 vnode 节点,表示已经渲染</font></b></div><div><b><font color="#000000">&nbsp; container._vnode = vnode</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">}</font></b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;align=left;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="1447.5" y="815" width="387.5" height="240" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-128" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#000000;jumpSize=4;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1640" y="762" as="sourcePoint" />
<mxPoint x="1640.3676470588234" y="812" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-129" value="<div><b>const patch = (n1, n2, container, anchor = null, parentComponent = null,...) =&gt; {</b></div><div><b>&nbsp; <font color="#0000ff">// 如果存在新旧节点, 且新旧节点类型不同,则销毁旧节点</font></b></div><div><b>&nbsp; if (n1 &amp;&amp; !isSameVNodeType(n1, n2)) {</b></div><div><b>&nbsp; &nbsp; anchor = getNextHostNode(n1)</b></div><div><b>&nbsp; &nbsp; unmount(n1, parentComponent, parentSuspense, true)</b></div><div><b>&nbsp; &nbsp; n1 = null</b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>&nbsp; const { type, shapeFlag } = n2</b></div><div><b>&nbsp; switch (type) {</b></div><div><b>&nbsp; &nbsp; case Text:</b></div><div><b>&nbsp; &nbsp; &nbsp; break</b></div><div><b>&nbsp; &nbsp; case Comment:</b></div><div><b>&nbsp; &nbsp; &nbsp; break</b></div><div><b>&nbsp; &nbsp; case Static:</b></div><div><b>&nbsp; &nbsp; &nbsp; // 处理静态节点</b></div><div><b>&nbsp; &nbsp; &nbsp; break</b></div><div><b>&nbsp; &nbsp; case Fragment:</b></div><div><b>&nbsp; &nbsp; &nbsp; // 处理 Fragment 元素</b></div><div><b>&nbsp; &nbsp; &nbsp; break</b></div><div><b>&nbsp; &nbsp; default:</b></div><div><b>&nbsp; &nbsp; &nbsp; if (shapeFlag &amp; 1 /* ELEMENT */) {</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; // 处理普通 DOM 元素</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; <font color="#cc0066">processElement</font>(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized)</b></div><div><b>&nbsp; &nbsp; &nbsp; }</b></div><div><b>&nbsp; &nbsp; &nbsp; else if (shapeFlag &amp; 6 /* COMPONENT */) {</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; // 处理组件</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; <font color="#cc0066">processComponent</font>(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized)</b></div><div><b>&nbsp; &nbsp; &nbsp; }</b></div><div><b>&nbsp; &nbsp; &nbsp; else if (shapeFlag &amp; 64 /* TELEPORT */) {</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; // 处理 TELEPORT</b></div><div><b>&nbsp; &nbsp; &nbsp; }</b></div><div><b>&nbsp; &nbsp; &nbsp; else if (shapeFlag &amp; 128 /* SUSPENSE */) {</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; // 处理 SUSPENSE</b></div><div><b>&nbsp; &nbsp; &nbsp; }</b></div><div><b>&nbsp; }</b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;align=left;" vertex="1" parent="1">
<mxGeometry x="710" y="400" width="650" height="570" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-130" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#0000FF;jumpSize=4;exitX=0.779;exitY=0.557;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1445.83" y="865.77" as="sourcePoint" />
<mxPoint x="1360" y="866" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-131" value="<font color="#cc0000"><b>patch</b></font>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#CC0066;" vertex="1" parent="1">
<mxGeometry x="1372" y="836" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-132" value="<div><b>const <font color="#cc0066">processComponent</font> = (n1, n2, container, anchor, parentComponent, ...) =&gt; {</b></div><div><b>&nbsp; if (n1 == null) {</b></div><div><b>&nbsp; &nbsp;// 挂载组件</b></div><div><b>&nbsp; &nbsp;<font color="#cc0066">mountComponent</font>(n2, container, anchor, parentComponent, ...)</b></div><div><b>&nbsp; }</b></div><div><b>&nbsp; else {</b></div><div><b>&nbsp; &nbsp; // 更新组件</b></div><div><b>&nbsp; &nbsp; <font color="#cc0066">updateComponent</font>(n1, n2, parentComponent, optimized)</b></div><div><b>&nbsp; }</b></div><div><b>}</b></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="710" y="1100" width="460" height="200" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-133" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;entryX=0.174;entryY=0.591;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.124;exitY=1.006;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="p2N06ffcsC0MJF7vxpci-129">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="790" y="990" as="sourcePoint" />
<mxPoint x="790.04" y="1100.02" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-134" value="<b style="color: rgb(0, 0, 0); text-align: left;"><font color="#cc0066">processComponent</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#CC0066;" vertex="1" parent="1">
<mxGeometry x="759" y="1021" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-138" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jumpSize=4;orthogonalLoop=1;jettySize=auto;html=1;fontColor=#000000;exitX=0.003;exitY=0.573;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.004;entryY=0.665;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="p2N06ffcsC0MJF7vxpci-135" target="p2N06ffcsC0MJF7vxpci-137">
<mxGeometry relative="1" as="geometry">
<mxPoint x="680" y="1420" as="sourcePoint" />
<mxPoint x="680" y="1460" as="targetPoint" />
<Array as="points">
<mxPoint x="711" y="1445" />
<mxPoint x="690" y="1445" />
<mxPoint x="690" y="1460" />
<mxPoint x="630" y="1460" />
<mxPoint x="630" y="1376" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-135" value="<div><b>const <font color="#cc0066">mountComponent</font> = (initialVNode, container, anchor, parentComponent) =&gt; {</b></div><div><b>&nbsp; // 创建组件实例</b></div><div><b>&nbsp; const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense))</b></div><div><b>&nbsp; // 设置组件实例</b></div><div><b>&nbsp; <font color="#cc0066">setupComponent(instance)</font></b></div><div><b>&nbsp; <font color="#0000ff">// 设置并运行带副作用的渲染函数</font></b></div><div><b>&nbsp; <font color="#cc0066">setupRenderEffect</font>(instance, initialVNode, container, anchor)</b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="710" y="1350" width="460" height="190" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-136" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="790" y="1301" as="sourcePoint" />
<mxPoint x="790" y="1350" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-137" value="<b style="">const <font color="#cc0066">setupRenderEffect</font> = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) =&gt; {<br><br>&nbsp; // 创建响应式的副作用渲染函数<br>&nbsp; instance.update = effect(function componentEffect() {<br>&nbsp; &nbsp; if (!instance.isMounted) {<br>&nbsp; &nbsp; &nbsp; // 渲染组件生成子树 vnode<br>&nbsp; &nbsp; &nbsp; const <font color="#cc0066">subTree</font> = (instance.subTree = renderComponentRoot(instance))<br><br>&nbsp; &nbsp; &nbsp; // 把子树 vnode 挂载到 container 中<br>&nbsp; &nbsp; &nbsp; <font color="#cc0066">patch(null, subTree, container, anchor, instance, parentSuspense, isSVG)</font><br>&nbsp; &nbsp; &nbsp; // 保留渲染生成的子树根 DOM 节点<br>&nbsp; &nbsp; &nbsp; initialVNode.el = subTree.el<br>&nbsp; &nbsp; &nbsp; instance.isMounted = true<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; else {<br>&nbsp; &nbsp; &nbsp; // 更新组件<br>&nbsp; &nbsp; }<br><br>&nbsp; }, prodEffectOptions)<br><br>}</b>" style="rounded=0;whiteSpace=wrap;html=1;align=left;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="160" y="1110" width="460" height="400" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-140" value="<div><b>const <font color="#cc0066">processElement</font> = (n1, n2, container, anchor, parentComponent, parentSuspense, ...) =&gt; {</b></div><div><b><br></b></div><div><b>&nbsp; isSVG = isSVG || n2.type === 'svg'</b></div><div><b><br></b></div><div><b>&nbsp; if (n1 == null) {</b></div><div><b><br></b></div><div><b>&nbsp; &nbsp; <font color="#0000ff">//挂载元素节点</font></b></div><div><b>&nbsp; &nbsp;<font color="#cc0066"> mountElement</font>(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized)</b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>&nbsp; else {</b></div><div><b>&nbsp; &nbsp; <font color="#0000ff">//更新元素节点</font></b></div><div><b>&nbsp; &nbsp; <font color="#cc0066">patchElement</font>(n1, n2, parentComponent, parentSuspense, isSVG, optimized)</b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="1200" y="1100" width="570" height="340" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-141" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#CC0066;jumpSize=4;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1300" y="971" as="sourcePoint" />
<mxPoint x="1300" y="1100" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-142" value="<b style="text-align: left;"><font color="#cc0000">processElement</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#CC0066;" vertex="1" parent="1">
<mxGeometry x="1270" y="1021" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-144" value="" style="curved=1;endArrow=classic;html=1;rounded=0;fontColor=#0000FF;jumpSize=4;entryX=-0.004;entryY=0.629;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.25;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="p2N06ffcsC0MJF7vxpci-137" target="p2N06ffcsC0MJF7vxpci-129">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="391" y="1112" as="sourcePoint" />
<mxPoint x="441" y="1062" as="targetPoint" />
<Array as="points">
<mxPoint x="441" y="1112" />
<mxPoint x="391" y="1062" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-145" value="<b><font color="#cc0000">如果subtree是<span style="font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, Helvetica, &quot;Segoe UI&quot;, Arial, Roboto, &quot;PingFang SC&quot;, miui, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, sans-serif; text-align: justify; background-color: rgb(255, 255, 255);"><font style="font-size: 12px;">普通元素 vnode</font></span></font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#0000FF;" vertex="1" parent="1">
<mxGeometry x="440" y="970" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-148" value="" style="endArrow=classic;html=1;rounded=0;fontSize=12;fontColor=#CC0000;jumpSize=4;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="440" y="1110" as="sourcePoint" />
<mxPoint x="712" y="823" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-149" value="<b style="color: rgb(0, 0, 255); background-color: rgb(248, 249, 250);"><font color="#cc0000">如果subtree是组件<span style="font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, Helvetica, &quot;Segoe UI&quot;, Arial, Roboto, &quot;PingFang SC&quot;, miui, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, sans-serif; text-align: justify; background-color: rgb(255, 255, 255);">vnode</span></font></b>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=12;fontColor=#CC0000;" vertex="1" connectable="0" parent="p2N06ffcsC0MJF7vxpci-148">
<mxGeometry x="0.3405" y="2" relative="1" as="geometry">
<mxPoint x="-1" y="14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-150" value="<div><b>const <font color="#cc0066">mountElement</font> = (vnode, container, anchor, parentComponent, ) =&gt; {</b></div><div><b><br></b></div><div><b>&nbsp; let el</b></div><div><b>&nbsp; const { type, props, shapeFlag } = vnode</b></div><div><b><br></b></div><div><b>&nbsp; // 创建 DOM 元素节点</b></div><div><b>&nbsp; el = <font color="#cc0000">vnode.el</font> = <font color="#cc0066">hostCreateElement</font>(vnode.type, isSVG, props &amp;&amp; props.is)</b></div><div><b>&nbsp; if (props) {</b></div><div><b>&nbsp; &nbsp; // 处理 props,比如 class、style、event 等属性</b></div><div><b>&nbsp; &nbsp; for (const key in props) {</b></div><div><b>&nbsp; &nbsp; &nbsp; if (!isReservedProp(key)) {</b></div><div><b>&nbsp; &nbsp; &nbsp; &nbsp; hostPatchProp(el, key, null, props[key], isSVG)</b></div><div><b>&nbsp; &nbsp; &nbsp; }</b></div><div><b>&nbsp; &nbsp; }</b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>&nbsp; if (shapeFlag &amp; 8 /* TEXT_CHILDREN */) {</b></div><div><b>&nbsp; &nbsp; // 处理子节点是纯文本的情况</b></div><div><b>&nbsp; &nbsp; hostSetElementText(el, vnode.children)</b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>&nbsp; else if (shapeFlag &amp; 16 /* ARRAY_CHILDREN */) {</b></div><div><b>&nbsp; &nbsp; // 处理子节点是数组的情况</b></div><div><b>&nbsp; &nbsp; mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG &amp;&amp; type !== 'foreignObject', optimized || !!<font color="#cc0000">vnode.dynamicChildren</font>)</b></div><div><b>&nbsp; }</b></div><div><b>&nbsp; <font color="#0000ff">// 把创建的 DOM 元素节点挂载到 container 上</font></b></div><div><b>&nbsp; hostInsert(el, container, anchor)</b></div><div><b><br></b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=12;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="1200" y="1568" width="570" height="470" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-151" value="" style="endArrow=classic;html=1;rounded=0;fontSize=12;fontColor=#CC0000;jumpSize=4;entryX=0.439;entryY=0.167;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.439;exitY=-0.003;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1450.23" y="1439.6599999999999" as="sourcePoint" />
<mxPoint x="1450.23" y="1572.2600000000002" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-152" value="<b style="color: rgb(0, 0, 0); text-align: left;"><font color="#cc0066">mountElement</font>&nbsp;</b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#0000FF;" vertex="1" parent="1">
<mxGeometry x="1430" y="1490" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-153" value="<div><b><font color="#000000">function createElement(tag, isSVG, is) {</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">&nbsp; isSVG ? document.createElementNS(svgNS, tag)</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">&nbsp; &nbsp; : document.createElement(tag, is ? { is } : undefined)</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">}</font></b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=12;align=left;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="1890" y="1570" width="290" height="160" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-154" value="" style="endArrow=classic;html=1;rounded=0;fontSize=12;fontColor=#000000;jumpSize=4;entryX=0;entryY=0.438;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1770" y="1643.92" as="sourcePoint" />
<mxPoint x="1890" y="1640" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-157" value="<span style="font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, Helvetica, &quot;Segoe UI&quot;, Arial, Roboto, &quot;PingFang SC&quot;, miui, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, sans-serif; text-align: justify;"><font style="font-size: 12px;"><b>hostCreateElement</b></font></span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontColor=#CC0000;" vertex="1" parent="1">
<mxGeometry x="1800" y="1620" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-158" value="<div><b><font color="#000000">function setElementText(el, text) {</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">&nbsp; el.textContent = text</font></b></div><div><b><font color="#000000"><br></font></b></div><div><b><font color="#000000">}</font></b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontSize=12;align=left;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="1890" y="1780" width="290" height="100" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-159" value="" style="endArrow=classic;html=1;rounded=0;fontSize=12;fontColor=#000000;jumpSize=4;entryX=-0.003;entryY=0.388;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="p2N06ffcsC0MJF7vxpci-158">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1772" y="1819" as="sourcePoint" />
<mxPoint x="1832" y="1819.1" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-160" value="<b style="text-align: left;"><font color="#cc0000">hostSetElementText</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;fontSize=12;fontColor=#000000;" vertex="1" parent="1">
<mxGeometry x="1800" y="1800" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-161" value="<div><b>const mountChildren = (children, container, anchor, parentComponent,) =&gt; {</b></div><div><b>&nbsp; for (let i = start; i &lt; children.length; i++) {</b></div><div><b>&nbsp; &nbsp; // 预处理 child</b></div><div><b>&nbsp; &nbsp; const child = (children[i] = optimized</b></div><div><b>&nbsp; &nbsp; &nbsp; ? cloneIfMounted(children[i])</b></div><div><b>&nbsp; &nbsp; &nbsp; : normalizeVNode(children[i]))</b></div><div><b>&nbsp; &nbsp;<font color="#0000ff"> // 递归 patch 挂载 child</font></b></div><div><b>&nbsp; &nbsp; <font color="#cc0066">patch</font>(null, child, container, anchor, parentComponent)</b></div><div><b>&nbsp; }</b></div><div><b><br></b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontSize=12;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="1890" y="1920" width="440" height="200" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-162" value="" style="endArrow=classic;html=1;rounded=0;fontSize=12;fontColor=#CC0000;jumpSize=4;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1772" y="1960" as="sourcePoint" />
<mxPoint x="1890" y="1960" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-163" value="<span style="font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, Helvetica, &quot;Segoe UI&quot;, Arial, Roboto, &quot;PingFang SC&quot;, miui, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, sans-serif; text-align: justify;"><font style="font-size: 12px;"><b style="">&nbsp;mountChildren</b></font></span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;fontSize=12;fontColor=#CC0000;" vertex="1" parent="1">
<mxGeometry x="1800" y="1930" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-164" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;fontSize=12;fontColor=#0000FF;jumpSize=4;exitX=-0.002;exitY=0.574;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.683;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=#7EA6E0;" edge="1" parent="1" source="p2N06ffcsC0MJF7vxpci-161" target="p2N06ffcsC0MJF7vxpci-129">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1590" y="1970" as="sourcePoint" />
<mxPoint x="1640" y="1920" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-165" value="<div><b>function insert(child, parent, anchor) {</b></div><div><b>&nbsp; if (anchor) {</b></div><div><b>&nbsp; &nbsp; parent.insertBefore(child, anchor)</b></div><div><b>&nbsp; }</b></div><div><b>&nbsp; else {</b></div><div><b>&nbsp; &nbsp; parent.appendChild(child)</b></div><div><b>&nbsp; }</b></div><div><b>}</b></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontSize=12;fillColor=#fff2cc;strokeColor=#d6b656;align=left;" vertex="1" parent="1">
<mxGeometry x="1890" y="2140" width="440" height="170" as="geometry" />
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-166" value="" style="endArrow=classic;html=1;rounded=0;fontSize=12;fontColor=#0000FF;strokeColor=#7EA6E0;jumpSize=4;entryX=-0.005;entryY=0.402;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="p2N06ffcsC0MJF7vxpci-165">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1650" y="2040" as="sourcePoint" />
<mxPoint x="2050" y="2130" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p2N06ffcsC0MJF7vxpci-167" value="<b style="text-align: left;"><font color="#cc0000">hostInsert</font></b>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;fontSize=12;fontColor=#0000FF;" vertex="1" parent="1">
<mxGeometry x="1750" y="2120" width="60" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>