-
Notifications
You must be signed in to change notification settings - Fork 1
/
wanmao.html
134 lines (133 loc) · 34.3 KB
/
wanmao.html
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>wanmao | Learning Notes</title>
<meta name="description" content="Feel Free To What You Learning">
<meta name="generator" content="VuePress 1.3.0">
<link rel="icon" href="/tech-blog/favicon.ico">
<script src="https://cdn.jsdelivr.net/npm/react/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/react-dom/umd/react-dom.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js"></script>
<link rel="preload" href="/tech-blog/assets/css/0.styles.d7bf5d7f.css" as="style"><link rel="preload" href="/tech-blog/assets/js/app.ea88b3e9.js" as="script"><link rel="preload" href="/tech-blog/assets/js/2.c195cd5a.js" as="script"><link rel="preload" href="/tech-blog/assets/js/117.40eaa194.js" as="script"><link rel="prefetch" href="/tech-blog/assets/js/10.7b2e4127.js"><link rel="prefetch" href="/tech-blog/assets/js/100.a46674a8.js"><link rel="prefetch" href="/tech-blog/assets/js/101.3c7c6be6.js"><link rel="prefetch" href="/tech-blog/assets/js/102.682415d1.js"><link rel="prefetch" href="/tech-blog/assets/js/103.19fe08c4.js"><link rel="prefetch" href="/tech-blog/assets/js/104.fb994315.js"><link rel="prefetch" href="/tech-blog/assets/js/105.1188e52b.js"><link rel="prefetch" href="/tech-blog/assets/js/106.a8d3b931.js"><link rel="prefetch" href="/tech-blog/assets/js/107.b0723031.js"><link rel="prefetch" href="/tech-blog/assets/js/108.b2367889.js"><link rel="prefetch" href="/tech-blog/assets/js/109.72ac55b1.js"><link rel="prefetch" href="/tech-blog/assets/js/11.9c1960ca.js"><link rel="prefetch" href="/tech-blog/assets/js/110.b2de94fb.js"><link rel="prefetch" href="/tech-blog/assets/js/111.e5efd1ce.js"><link rel="prefetch" href="/tech-blog/assets/js/112.a7c8ede8.js"><link rel="prefetch" href="/tech-blog/assets/js/113.4923c701.js"><link rel="prefetch" href="/tech-blog/assets/js/114.c5136c63.js"><link rel="prefetch" href="/tech-blog/assets/js/115.90daca38.js"><link rel="prefetch" href="/tech-blog/assets/js/116.f22dbd65.js"><link rel="prefetch" href="/tech-blog/assets/js/118.7e8a39d7.js"><link rel="prefetch" href="/tech-blog/assets/js/12.11672ccf.js"><link rel="prefetch" href="/tech-blog/assets/js/13.16f90767.js"><link rel="prefetch" href="/tech-blog/assets/js/14.b21f9762.js"><link rel="prefetch" href="/tech-blog/assets/js/15.3d2cfac0.js"><link rel="prefetch" href="/tech-blog/assets/js/16.3e3fbd7c.js"><link rel="prefetch" href="/tech-blog/assets/js/17.6ba20fc8.js"><link rel="prefetch" href="/tech-blog/assets/js/18.6b41aedd.js"><link rel="prefetch" href="/tech-blog/assets/js/19.096b5d19.js"><link rel="prefetch" href="/tech-blog/assets/js/20.ff9d07ee.js"><link rel="prefetch" href="/tech-blog/assets/js/21.ac9bbfbe.js"><link rel="prefetch" href="/tech-blog/assets/js/22.08e49d62.js"><link rel="prefetch" href="/tech-blog/assets/js/23.ad2885ca.js"><link rel="prefetch" href="/tech-blog/assets/js/24.9f1c2283.js"><link rel="prefetch" href="/tech-blog/assets/js/25.95035a9d.js"><link rel="prefetch" href="/tech-blog/assets/js/26.3d5e4b4a.js"><link rel="prefetch" href="/tech-blog/assets/js/27.28654d40.js"><link rel="prefetch" href="/tech-blog/assets/js/28.c07c17e0.js"><link rel="prefetch" href="/tech-blog/assets/js/29.ad3f9bf4.js"><link rel="prefetch" href="/tech-blog/assets/js/3.df9a082b.js"><link rel="prefetch" href="/tech-blog/assets/js/30.4331b6a7.js"><link rel="prefetch" href="/tech-blog/assets/js/31.cb1f5923.js"><link rel="prefetch" href="/tech-blog/assets/js/32.29ef3fe8.js"><link rel="prefetch" href="/tech-blog/assets/js/33.9cdf7a9e.js"><link rel="prefetch" href="/tech-blog/assets/js/34.beae79dc.js"><link rel="prefetch" href="/tech-blog/assets/js/35.770d71d9.js"><link rel="prefetch" href="/tech-blog/assets/js/36.f16200e3.js"><link rel="prefetch" href="/tech-blog/assets/js/37.053d68ba.js"><link rel="prefetch" href="/tech-blog/assets/js/38.f464da25.js"><link rel="prefetch" href="/tech-blog/assets/js/39.0c203164.js"><link rel="prefetch" href="/tech-blog/assets/js/4.faeab3ec.js"><link rel="prefetch" href="/tech-blog/assets/js/40.4099fae4.js"><link rel="prefetch" href="/tech-blog/assets/js/41.3907e3c9.js"><link rel="prefetch" href="/tech-blog/assets/js/42.78a6c425.js"><link rel="prefetch" href="/tech-blog/assets/js/43.f32c7508.js"><link rel="prefetch" href="/tech-blog/assets/js/44.364527e0.js"><link rel="prefetch" href="/tech-blog/assets/js/45.6e7453b2.js"><link rel="prefetch" href="/tech-blog/assets/js/46.13b16225.js"><link rel="prefetch" href="/tech-blog/assets/js/47.1796d8a0.js"><link rel="prefetch" href="/tech-blog/assets/js/48.c2be3de8.js"><link rel="prefetch" href="/tech-blog/assets/js/49.f2490f33.js"><link rel="prefetch" href="/tech-blog/assets/js/5.f4603c57.js"><link rel="prefetch" href="/tech-blog/assets/js/50.954c65f4.js"><link rel="prefetch" href="/tech-blog/assets/js/51.ba31feb6.js"><link rel="prefetch" href="/tech-blog/assets/js/52.1d306877.js"><link rel="prefetch" href="/tech-blog/assets/js/53.11c219c7.js"><link rel="prefetch" href="/tech-blog/assets/js/54.e97005bc.js"><link rel="prefetch" href="/tech-blog/assets/js/55.e0b4fd8a.js"><link rel="prefetch" href="/tech-blog/assets/js/56.dd7e9185.js"><link rel="prefetch" href="/tech-blog/assets/js/57.ba8572a4.js"><link rel="prefetch" href="/tech-blog/assets/js/58.c907b169.js"><link rel="prefetch" href="/tech-blog/assets/js/59.2d08abfb.js"><link rel="prefetch" href="/tech-blog/assets/js/6.a7f375af.js"><link rel="prefetch" href="/tech-blog/assets/js/60.1f432869.js"><link rel="prefetch" href="/tech-blog/assets/js/61.72647e99.js"><link rel="prefetch" href="/tech-blog/assets/js/62.2b0c9020.js"><link rel="prefetch" href="/tech-blog/assets/js/63.70297b0d.js"><link rel="prefetch" href="/tech-blog/assets/js/64.46b1e030.js"><link rel="prefetch" href="/tech-blog/assets/js/65.68a5bc18.js"><link rel="prefetch" href="/tech-blog/assets/js/66.02162ab5.js"><link rel="prefetch" href="/tech-blog/assets/js/67.c6b66d06.js"><link rel="prefetch" href="/tech-blog/assets/js/68.0091acc4.js"><link rel="prefetch" href="/tech-blog/assets/js/69.858765c9.js"><link rel="prefetch" href="/tech-blog/assets/js/7.61d583af.js"><link rel="prefetch" href="/tech-blog/assets/js/70.4376fc99.js"><link rel="prefetch" href="/tech-blog/assets/js/71.f651620d.js"><link rel="prefetch" href="/tech-blog/assets/js/72.6924aec8.js"><link rel="prefetch" href="/tech-blog/assets/js/73.4c594d21.js"><link rel="prefetch" href="/tech-blog/assets/js/74.3e7f0bc4.js"><link rel="prefetch" href="/tech-blog/assets/js/75.8f69fb24.js"><link rel="prefetch" href="/tech-blog/assets/js/76.4fa55544.js"><link rel="prefetch" href="/tech-blog/assets/js/77.57a36ce4.js"><link rel="prefetch" href="/tech-blog/assets/js/78.aac976eb.js"><link rel="prefetch" href="/tech-blog/assets/js/79.91a59cf4.js"><link rel="prefetch" href="/tech-blog/assets/js/8.dbc9bd1b.js"><link rel="prefetch" href="/tech-blog/assets/js/80.3d857095.js"><link rel="prefetch" href="/tech-blog/assets/js/81.1797db54.js"><link rel="prefetch" href="/tech-blog/assets/js/82.34420fed.js"><link rel="prefetch" href="/tech-blog/assets/js/83.26f10240.js"><link rel="prefetch" href="/tech-blog/assets/js/84.c6334baf.js"><link rel="prefetch" href="/tech-blog/assets/js/85.2a9ab0bb.js"><link rel="prefetch" href="/tech-blog/assets/js/86.e7acdfe0.js"><link rel="prefetch" href="/tech-blog/assets/js/87.39b8a580.js"><link rel="prefetch" href="/tech-blog/assets/js/88.20456892.js"><link rel="prefetch" href="/tech-blog/assets/js/89.2e8dce68.js"><link rel="prefetch" href="/tech-blog/assets/js/9.6cfc071f.js"><link rel="prefetch" href="/tech-blog/assets/js/90.022488be.js"><link rel="prefetch" href="/tech-blog/assets/js/91.0bc867ae.js"><link rel="prefetch" href="/tech-blog/assets/js/92.e7ca93e0.js"><link rel="prefetch" href="/tech-blog/assets/js/93.04c8e7a6.js"><link rel="prefetch" href="/tech-blog/assets/js/94.551d7d78.js"><link rel="prefetch" href="/tech-blog/assets/js/95.3caf43ea.js"><link rel="prefetch" href="/tech-blog/assets/js/96.2d4ad476.js"><link rel="prefetch" href="/tech-blog/assets/js/97.5bfe7c13.js"><link rel="prefetch" href="/tech-blog/assets/js/98.7970e122.js"><link rel="prefetch" href="/tech-blog/assets/js/99.c391cfdc.js">
<link rel="stylesheet" href="/tech-blog/assets/css/0.styles.d7bf5d7f.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/tech-blog/" class="home-link router-link-active"><!----> <span class="site-name">Learning Notes</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/tech-blog/" class="nav-link">
🏠Home
</a></div><div class="nav-item"><a href="/tech-blog/venus/" class="nav-link">
🎯VenusUI
</a></div><div class="nav-item"><a href="/tech-blog/account/" class="nav-link">
💰守财奴
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="🚀FrontEnd" class="dropdown-title"><span class="title">🚀FrontEnd</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tech-blog/hc/" class="nav-link">
💻HTML&CSS
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/js/" class="nav-link">
🧿JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/node/" class="nav-link">
🥩Node
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/ts/" class="nav-link">
🧸TypeScript
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/react/" class="nav-link">
⚛️React
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/vue/" class="nav-link">
📯Vue
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/browser/" class="nav-link">
🖥Browser
</a></li></ul></div></div><div class="nav-item"><a href="/tech-blog/other/" class="nav-link">
⌛️Other
</a></div><div class="nav-item"><a href="/tech-blog/eng/" class="nav-link">
🧐English
</a></div><div class="nav-item"><a href="https://github.com/wanmaoor" target="_blank" rel="noopener noreferrer" class="nav-link external">
😂Github
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/tech-blog/" class="nav-link">
🏠Home
</a></div><div class="nav-item"><a href="/tech-blog/venus/" class="nav-link">
🎯VenusUI
</a></div><div class="nav-item"><a href="/tech-blog/account/" class="nav-link">
💰守财奴
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="🚀FrontEnd" class="dropdown-title"><span class="title">🚀FrontEnd</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tech-blog/hc/" class="nav-link">
💻HTML&CSS
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/js/" class="nav-link">
🧿JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/node/" class="nav-link">
🥩Node
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/ts/" class="nav-link">
🧸TypeScript
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/react/" class="nav-link">
⚛️React
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/vue/" class="nav-link">
📯Vue
</a></li><li class="dropdown-item"><!----> <a href="/tech-blog/browser/" class="nav-link">
🖥Browser
</a></li></ul></div></div><div class="nav-item"><a href="/tech-blog/other/" class="nav-link">
⌛️Other
</a></div><div class="nav-item"><a href="/tech-blog/eng/" class="nav-link">
🧐English
</a></div><div class="nav-item"><a href="https://github.com/wanmaoor" target="_blank" rel="noopener noreferrer" class="nav-link external">
😂Github
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Home</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/tech-blog/" class="sidebar-link">Home</a></li><li><a href="/tech-blog/wanmao.html" class="active sidebar-link">wanmao</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>FrontEnd</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading open"><span>JavaScript</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/tech-blog/js/" class="sidebar-link">Introduction</a></li><li><a href="/tech-blog/js/let&const&var.html" class="sidebar-link">let, const, var</a></li><li><a href="/tech-blog/js/1.html" class="sidebar-link">Execution Sequence</a></li><li><a href="/tech-blog/js/2.html" class="sidebar-link">Encapsulation</a></li><li><a href="/tech-blog/js/3.html" class="sidebar-link">Methods Of Array</a></li><li><a href="/tech-blog/js/4.html" class="sidebar-link">Iterator</a></li><li><a href="/tech-blog/js/5.html" class="sidebar-link">Call Stack, Heap, Queue</a></li><li><a href="/tech-blog/js/6.html" class="sidebar-link">Implicit Coercion</a></li><li><a href="/tech-blog/js/7.html" class="sidebar-link">Checking Types</a></li><li><a href="/tech-blog/js/8.html" class="sidebar-link">Object.is()</a></li><li><a href="/tech-blog/js/9.html" class="sidebar-link">Numbers</a></li><li><a href="/tech-blog/js/10.html" class="sidebar-link">push() is faster than concat()</a></li><li><a href="/tech-blog/js/11.html" class="sidebar-link">Tricks in JavaScript</a></li><li><a href="/tech-blog/js/12.html" class="sidebar-link">Immutable Object</a></li><li><a href="/tech-blog/js/13.html" class="sidebar-link">Cons of Callback</a></li><li><a href="/tech-blog/js/14.html" class="sidebar-link">JavaScript的前生今世</a></li><li><a href="/tech-blog/js/15.html" class="sidebar-link">JavaScript语法(一)</a></li><li><a href="/tech-blog/js/16.html" class="sidebar-link">对象的增删查改</a></li><li><a href="/tech-blog/js/17.html" class="sidebar-link">DOM编程</a></li><li><a href="/tech-blog/js/18.html" class="sidebar-link">手写函数柯里化</a></li><li><a href="/tech-blog/js/19.html" class="sidebar-link">手写jQuery</a></li><li><a href="/tech-blog/js/20.html" class="sidebar-link">同步, 异步与回调</a></li><li><a href="/tech-blog/js/21.html" class="sidebar-link">走近MVC</a></li><li><a href="/tech-blog/js/22.html" class="sidebar-link">事件</a></li><li><a href="/tech-blog/js/23.html" class="sidebar-link">Promise</a></li><li><a href="/tech-blog/js/24.html" class="sidebar-link">script 标签中 defer 和 async 的区别</a></li></ul></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>HTML & CSS</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>Node</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>TypeScript</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>React</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>Vue</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>venusUI</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>Browser</span> <span class="arrow right"></span></p> <!----></section></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Other</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>English</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>守财奴项目笔记</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="wanmao"><a href="#wanmao" class="header-anchor">#</a> wanmao</h1> <div data-config="" data-type="vue" data-code="%3Ctemplate%3E%0A%20%20%3Cdiv%20class%3D%22box-vue%22%3EVue%20%7B%7B%20message%20%7D%7D%3C%2Fdiv%3E%0A%3C%2Ftemplate%3E%0A%3Cscript%3E%0A%20%20export%20default%20%7B%0A%20%20%20%20data%3A%20()%20%3D%3E%20(%7B%20message%3A%20%22Hello%20World%22%20%7D)%0A%20%20%7D%3B%0A%3C%2Fscript%3E%0A%3Cstyle%3E%0A%20%20.box-vue%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A" class="vuepress-plugin-demo-block__wrapper" style="display:none;"><div class="vuepress-plugin-demo-block__display"><div class="vuepress-plugin-demo-block__app"></div></div> <div class="vuepress-plugin-demo-block__code"><div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>template</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>box-vue<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Vue {{ message }}<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>template</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
<span class="token function-variable function">data</span><span class="token punctuation">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span><span class="token punctuation">{</span> message<span class="token punctuation">:</span> <span class="token string">"Hello World"</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css">
<span class="token selector">.box-vue</span> <span class="token punctuation">{</span>
<span class="token property">color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>style</span><span class="token punctuation">></span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div></div> <div class="vuepress-plugin-demo-block__footer"></div></div> <div data-config="" data-type="react" data-code="export%20default%20class%20App%20extends%20React.Component%20%7B%0A%20%20constructor(props)%20%7B%0A%20%20%20%20super(props)%3B%0A%20%20%20%20this.state%20%3D%20%7B%20message%3A%20%22Hello%20World%22%20%7D%3B%0A%20%20%7D%0A%20%20render()%20%7B%0A%20%20%20%20return%20%3Cdiv%20className%3D%22box-react%22%3EReact%20%7Bthis.state.message%7D%3C%2Fdiv%3E%3B%0A%20%20%7D%0A%7D%0AApp.__style__%20%3D%20%60%0A%20%20.box-react%20%7B%20color%3A%20red%3B%20%7D%0A%60%3B%0A" class="vuepress-plugin-demo-block__wrapper" style="display:none;"><div class="vuepress-plugin-demo-block__display"><div class="vuepress-plugin-demo-block__app"></div></div> <div class="vuepress-plugin-demo-block__code"><div class="language-jsx line-numbers-mode"><pre class="language-jsx"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">class</span> <span class="token class-name">App</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token parameter">props</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">super</span><span class="token punctuation">(</span>props<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">this</span><span class="token punctuation">.</span>state <span class="token operator">=</span> <span class="token punctuation">{</span> message<span class="token punctuation">:</span> <span class="token string">"Hello World"</span> <span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>box-react<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token plain-text">React </span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span>state<span class="token punctuation">.</span>message<span class="token punctuation">}</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
App<span class="token punctuation">.</span>__style__ <span class="token operator">=</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">
.box-react { color: red; }
</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div></div> <div class="vuepress-plugin-demo-block__footer"></div></div> <div data-config="" data-type="vanilla" data-code="%3Chtml%3E%0A%20%20%3Cdiv%20id%3D%22vanilla-box%22%3E%3C%2Fdiv%3E%0A%3C%2Fhtml%3E%0A%3Cscript%3E%0A%20%20var%20box%20%3D%20document.getElementById(%22vanilla-box%22)%3B%0A%20%20box.innerHTML%20%3D%20%22Hello%20World!%22%3B%0A%3C%2Fscript%3E%0A%3Cstyle%3E%0A%20%20%23vanilla-box%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A" class="vuepress-plugin-demo-block__wrapper" style="display:none;"><div class="vuepress-plugin-demo-block__display"><div class="vuepress-plugin-demo-block__app"></div></div> <div class="vuepress-plugin-demo-block__code"><div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>html</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>vanilla-box<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>html</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
<span class="token keyword">var</span> box <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"vanilla-box"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
box<span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> <span class="token string">"Hello World!"</span><span class="token punctuation">;</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css">
<span class="token selector">#vanilla-box</span> <span class="token punctuation">{</span>
<span class="token property">color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>style</span><span class="token punctuation">></span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div></div> <div class="vuepress-plugin-demo-block__footer"></div></div> <div data-config="%7B%0A%20%20%22horizontal%22%3A%20true%0A%7D%0A" data-type="react" data-code="export%20default%20class%20App%20extends%20React.Component%20%7B%0A%20%20constructor(props)%20%7B%0A%20%20%20%20super(props)%3B%0A%20%20%20%20this.state%20%3D%20%7B%20message%3A%20%22Hello%20World%22%20%7D%3B%0A%20%20%7D%0A%20%20render()%20%7B%0A%20%20%20%20return%20%3Cdiv%20className%3D%22box-react%22%3EReact%20%7Bthis.state.message%7D%3C%2Fdiv%3E%3B%0A%20%20%7D%0A%7D%0AApp.__style__%20%3D%20%60%0A%20%20.box-react%20%7B%20color%3A%20red%3B%20%7D%0A%60%3B%0A" class="vuepress-plugin-demo-block__wrapper" style="display:none;"><div class="vuepress-plugin-demo-block__display"><div class="vuepress-plugin-demo-block__app"></div></div> <div class="vuepress-plugin-demo-block__code"><div class="language-jsx line-numbers-mode"><pre class="language-jsx"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">class</span> <span class="token class-name">App</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token parameter">props</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">super</span><span class="token punctuation">(</span>props<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">this</span><span class="token punctuation">.</span>state <span class="token operator">=</span> <span class="token punctuation">{</span> message<span class="token punctuation">:</span> <span class="token string">"Hello World"</span> <span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>box-react<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token plain-text">React </span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span>state<span class="token punctuation">.</span>message<span class="token punctuation">}</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
App<span class="token punctuation">.</span>__style__ <span class="token operator">=</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">
.box-react { color: red; }
</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"horizontal"</span><span class="token operator">:</span> <span class="token boolean">true</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div></div> <div class="vuepress-plugin-demo-block__footer"></div></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
←
<a href="/tech-blog/" class="prev router-link-active">
Home
</a></span> <span class="next"><a href="/tech-blog/js/">
Introduction
</a>
→
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
<script src="/tech-blog/assets/js/app.ea88b3e9.js" defer></script><script src="/tech-blog/assets/js/2.c195cd5a.js" defer></script><script src="/tech-blog/assets/js/117.40eaa194.js" defer></script>
</body>
</html>