6565 </ head >
6666
6767 < body id ="app " class ="dom-temp ">
68- < h1 :id ="title " :if ="heading == 1 "> {{ title }} 1</ h1 >
69- < h2 :else-if ="isH2 "> {{ title }} 2</ h2 >
70- < h3 :else-if ="heading == 3 "> {{ title }} 3</ h3 >
71- < h4 :else > {{ title }} 4</ h4 >
68+ < h1 :id ="title " :if ="heading == 1 "> {{ title }} 1
69+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}</ h1 >
70+ < h2 :else-if ="isH2 "> {{ title }} 2
71+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}</ h2 >
72+ < h3 :else-if ="heading == 3 "> {{ title }} 3
73+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}</ h3 >
74+ < h4 :else > {{ title }} 4
75+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}</ h4 >
7276 < br >
7377 <!-- <p :html="html" :bg-color="#000" :color="#ff0000">adfasdf</p> -->
7478 <!-- <input type="text" :model="title"> -->
@@ -78,22 +82,25 @@ <h4 :else>{{ title }} 4</h4>
7882 < ul >
7983 < li :for ="(key, val) in obj " :@click ="val.click ">
8084 {{ key }}: {{ val.name }}
85+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}
8186 < ul >
8287 < li :for ="item in val.ary ">
8388 {{ item.name }}
89+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}
8490 < ul >
8591 < li :for ="(item1, index1) in item.ary1 ">
8692 {{ CALC(index1 + 1) }}. {{ item1.name }} - ${{ item1.price }}
93+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}
8794 </ li >
8895 </ ul >
8996 </ li >
9097 </ ul >
9198 </ li >
9299 </ ul >
93- < br >
94- {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}
95100 < ul >
96- < li :for ="(item, index) in ary " :id ="item " :index ="index "> {{ item }} {{ CALC(index + 1) }}</ li >
101+ < li :for ="(item, index) in ary " :id ="item " :index ="index "> {{ item }} {{ CALC(index + 1) }}
102+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}</ li >
103+ {{ string }} {{ CALC(num * 10) }} {{ DATE(now, YYYY-MM-DD hh:mm:ss) }}
97104 </ ul >
98105 < img :lazyload ="src " alt ="">
99106 < p @click ="click "> Total: {{ LENGTH(array) }}</ p >
@@ -175,30 +182,32 @@ <h4 :else>{{ title }} 4</h4>
175182 console . log ( app . data )
176183 }
177184 } ,
178- before_render : _ => {
179- console . log ( "準備渲染" )
180- // return false;
181- } ,
182- rendered : _ => {
183- // setTimeout(_ => {
185+ lifecycle : {
186+ before_render : _ => {
187+ console . log ( "準備渲染" )
188+ // return false;
189+ } ,
190+ rendered : _ => {
191+ // setTimeout(_ => {
184192
185- // app.data.heading = 3
186- // }, 1000)
187- // setTimeout(_ => {
193+ // app.data.heading = 3
194+ // }, 1000)
195+ // setTimeout(_ => {
188196
189- // app.data.isH2 = true
190- // app.data.obj.home.ary[0].name = "Test"
197+ // app.data.isH2 = true
198+ // app.data.obj.home.ary[0].name = "Test"
191199
192- // }, 2000)
193- console . log ( "已渲染" )
194- } ,
195- before_update : _ => {
196- console . log ( "準備更新" )
197- // alert(true)
198- // return false;
199- } ,
200- updated : _ => {
201- console . log ( "已更新" )
200+ // }, 2000)
201+ console . log ( "已渲染" )
202+ } ,
203+ before_update : _ => {
204+ console . log ( "準備更新" )
205+ // alert(true)
206+ // return false;
207+ } ,
208+ updated : _ => {
209+ console . log ( "已更新" )
210+ }
202211 }
203212 } ) ;
204213 </ script >
0 commit comments