• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16{
17  "@app-component/expression": {
18    "_descriptor": {},
19    "data": {},
20    "template": {
21      "type": "div",
22        "attr": {
23          "debugLine": "pages/expression/expression:1"
24        },
25      "children": [
26        {
27          "type": "text",
28          "attr": {
29            "debugLine": "pages/expression/expression:3",
30            "value": "function () {return this.ti||this.subTitle}"
31          }
32        },
33        {
34          "type": "text",
35          "attr": {
36            "debugLine": "pages/expression/expression:8",
37            "value": "function () {return this.ti&&this.subTitle}"
38          }
39        },
40        {
41          "type": "div",
42          "attr": {
43            "debugLine": "pages/expression/expression:13",
44            "value": "function () {return this.isArrived==='arrived'&&this.isTravel===false}"
45          }
46        },
47        {
48          "type": "div",
49          "attr": {
50            "debugLine": "pages/expression/expression:18",
51            "value": "function () {return this.isArrived==='arrived'||this.isTravel===false}"
52          }
53        },
54        {
55          "type": "div",
56          "attr": {
57            "debugLine": "pages/expression/expression:23",
58            "value": "function () {return !this.flag}"
59          }
60        },
61        {
62          "type": "div",
63          "attr": {
64            "debugLine": "pages/expression/expression:28",
65            "value": "function () {return !!this.flag}"
66          }
67        },
68        {
69          "type": "div",
70          "attr": {
71            "debugLine": "pages/expression/expression:33",
72            "className": "container"
73          },
74          "classList": [
75            "container"
76          ],
77          "children": [
78            {
79              "type": "text",
80              "attr": {
81                "debugLine": "pages/expression/expression:34",
82                "className": "text-text",
83                "value": "function () {return  false?0:4}"
84              },
85              "classList": [
86                "text-text"
87              ]
88            },
89            {
90              "type": "text",
91              "attr": {
92                "debugLine": "pages/expression/expression:35",
93                "className": "text-text",
94                "value": "function () {return this.a}"
95              },
96              "classList": [
97                "text-text"
98              ]
99            },
100            {
101              "type": "text",
102              "attr": {
103                "debugLine": "pages/expression/expression:36",
104                "className": "text-text",
105                "value": "function () {return  false?0:this.b}"
106              },
107              "classList": [
108                "text-text"
109              ]
110            },
111            {
112              "type": "text",
113              "attr": {
114                "debugLine": "pages/expression/expression:37",
115                "className": "text-text",
116                "value": "function () {return  false?0:null}"
117              },
118              "classList": [
119                "text-text"
120              ]
121            },
122            {
123              "type": "text",
124              "attr": {
125                "debugLine": "pages/expression/expression:38",
126                "className": "{{this.a}}{{Math.PI}}"
127              },
128              "classList": "function () {return [this.a+Math.PI]}"
129            },
130            {
131              "type": "text",
132              "attr": {
133                "debugLine": "pages/expression/expression:39",
134                "className": "text-text",
135                "value": "function () {return 1>this.b?this.v>4?this.a:6:7}"
136              },
137              "classList": [
138                "text-text"
139              ]
140            },
141            {
142              "type": "text",
143              "attr": {
144                "className": "text-text",
145                "debugLine": "pages/expression/expression:40",
146                "value": "function () {return  false?0:7}"
147              },
148              "classList": [
149                "text-text"
150              ]
151            },
152            {
153              "type": "text",
154              "attr": {
155                "className": "text-text",
156                "debugLine": "pages/expression/expression:41",
157                "value": "function () {return  false?0:7}"
158              },
159              "classList": [
160                "text-text"
161              ]
162            },
163            {
164              "type": "text",
165              "attr": {
166                "className": "text-text",
167                "debugLine": "pages/expression/expression:42",
168                "value": "function () {return typeof 1}"
169              },
170              "classList": [
171                "text-text"
172              ]
173            },
174            {
175              "type": "text",
176              "attr": {
177                "className": "text-text",
178                "debugLine": "pages/expression/expression:43",
179                "value": "function () {return new RegExp('123')}"
180              },
181              "classList": [
182                "text-text"
183              ]
184            },
185            {
186              "type": "input",
187              "attr": {
188                "debugLine": "pages/expression/expression:44",
189                "value": "function () {return 'ABCDEFG'.toLowerCase()}"
190              }
191            },
192            {
193              "type": "input",
194              "attr": {
195                "debugLine": "pages/expression/expression:45",
196                "value": "function () {return this.ns[1]}"
197              }
198            },
199            {
200              "type": "input",
201              "attr": {
202                "debugLine": "pages/expression/expression:46",
203                "value": "function () {return this.a.b.c.d}"
204              }
205            },
206            {
207              "type": "input",
208              "attr": {
209                "debugLine": "pages/expression/expression:47",
210                "value": "function () {return this.a.b.c[1]}"
211              }
212            },
213            {
214              "type": "input",
215              "attr": {
216                "debugLine": "pages/expression/expression:48",
217                "value": "function () {return this.a.b.c[1]}"
218              }
219            },
220            {
221              "type": "text",
222              "attr": {
223                "className": "tab-text",
224                "debugLine": "pages/expression/expression:49",
225                "value": "function () {return this.$t('strings.home.tabsData')[this.$item].name}"
226              },
227              "classList": [
228                "tab-text"
229              ],
230              "repeat": "function () {return this.tabsContent}"
231            },
232            {
233              "type": "text",
234              "attr": {
235                "debugLine": "pages/expression/expression:50",
236                "value": "a"
237              },
238              "shown": "function () {return this.showauto}"
239            },
240            {
241              "type": "text",
242              "attr": {
243                "debugLine": "pages/expression/expression:51",
244                "value": "b"
245              },
246              "shown": "function () {return !this.showauto}"
247            },
248            {
249              "type": "button",
250              "attr": {
251                "className": "button_menu",
252                "debugLine": "pages/expression/expression:52",
253                "value": "go to demo ability"
254              },
255              "classList": [
256                "button_menu"
257              ],
258              "events": {
259                "click": "function (evt) {this.startAbility('com.example.showcases','ShowcasesAbility',{origin:'showcases'},evt)}"
260              }
261            },
262            {
263              "type": "div",
264              "attr": {
265                "className": "item-content",
266                "debugLine": "pages/expression/expression:53"
267              },
268              "classList": [
269                "item-content"
270              ],
271              "children": [
272                {
273                  "type": "picker",
274                  "attr": {
275                    "className": "picker",
276                    "debugLine": "pages/expression/expression:54",
277                    "type": "multi-text",
278                    "range": "function () {return this.range1.arr}",
279                    "value": "function () {return this.curDate}",
280                    "selected": "function () {return this.lastSelected}",
281                    "id": "picker1"
282                  },
283                  "classList": [
284                    "picker"
285                  ],
286                  "events": {
287                    "change": "getDate",
288                    "cancel": "cancel"
289                  },
290                  "id": "picker1"
291                }
292              ]
293            },
294            {
295              "type": "div",
296              "attr": {
297                "className": "content_for",
298                "debugLine": "pages/expression/expression:57"
299              },
300              "classList": [
301                "content_for"
302              ],
303              "children": [
304                {
305                  "type": "text",
306                  "attr": {
307                    "className": "topic",
308                    "debugLine": "pages/expression/expression:58",
309                    "value": "测试show,if,for渲染属性"
310                  },
311                  "classList": [
312                    "topic"
313                  ]
314                },
315                {
316                  "type": "text",
317                  "attr": {
318                    "className": "text_large",
319                    "debugLine": "pages/expression/expression:59",
320                    "tid": "id",
321                    "value": "function () {return (this.$idx)+ decodeURI('') +decodeURI('+')+ decodeURI('') +(this.$item.id)}"
322                  },
323                  "classList": [
324                    "text_large"
325                  ],
326                  "repeat": "function () {return this.list}"
327                },
328                {
329                  "type": "text",
330                  "attr": {
331                    "className": "text_large",
332                    "debugLine": "pages/expression/expression:60",
333                    "value": "点击显示的文本,点击此处显示show文本"
334                  },
335                  "classList": [
336                    "text_large"
337                  ],
338                  "shown": "function () {return this.click}",
339                  "events": {
340                    "click": "change_showon"
341                  }
342                },
343                {
344                  "type": "text",
345                  "attr": {
346                    "className": "text_large",
347                    "debugLine": "pages/expression/expression:61",
348                    "value": "长按显示的文本,点击此处隐藏show文本"
349                  },
350                  "classList": [
351                    "text_large"
352                  ],
353                  "shown": "function () {return this.longpress&&!this.click}",
354                  "events": {
355                    "longpress": "change_showoff"
356                  }
357                },
358                {
359                  "type": "text",
360                  "attr": {
361                    "debugLine": "pages/expression/expression:62",
362                    "value": "默认显示的文本"
363                  },
364                  "shown": "function () {return !this.longpress&&!this.click}"
365                },
366                {
367                  "type": "text",
368                  "attr": {
369                    "className": "text",
370                    "debugLine": "pages/expression/expression:63",
371                    "show": "function () {return this.showTest}",
372                    "value": "show显示的文本"
373                  },
374                  "classList": [
375                    "text"
376                  ]
377                }
378              ]
379            },
380            {
381              "type": "text",
382              "attr": {
383                "className": "remain_day_number",
384                "debugLine": "pages/expression/expression:65",
385                "value": "function () {return this.$t('strings.remain_days',{year:this.currentYear,day:this.countDownDays})}"
386              },
387              "classList": [
388                "remain_day_number"
389              ]
390            }
391          ]
392        }
393      ]
394    }
395  }
396}