• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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
16import prompt from '@system.prompt';
17
18export default {
19    data:{
20        array: [
21            {id: 1, name: 'jack', age: 18},
22            {id: 2, name: 'tony', age: 18},
23        ],
24        listOne:[{}],
25        listThree:[{},{},{}],
26        idProp : null,
27        classProp : null,
28        classPropNone : null,
29        styleProp : null,
30        refProp : null,
31        refPropNone : null,
32        disabledPropTrue : null,
33        disabledPropFalse : null,
34        disabledPropNone : null,
35        focusablePropTrue : null,
36        focusablePropFalse : null,
37        focusablePropNone : null,
38        dataProp : null,
39        dataPropNone : null,
40        clickEffectPropSmall : null,
41        clickEffectPropMedium : null,
42        clickEffectPropLarge : null,
43        clickEffectPropNone : null,
44        dirPropRtl : null,
45        dirPropAuto : null,
46        dirPropLtr : null,
47        dirPropNone : null,
48        forPropNull : null,
49        forPropOne : null,
50        forPropThree : null,
51        ifPropTrue : null,
52        showPropTrue : null,
53        showPropFalse : null,
54        showPropNone : null,
55
56        typeText : null,
57        typeEmail : null,
58        typeDate : null,
59        typeTime : null,
60        typeNumber : null,
61        typePassword : null,
62        typeButton : null,
63        typeCheckbox : null,
64        typeRadio : null,
65        typeNone : null,
66
67        checkboxFalse : null,
68        checkboxTrue : null,
69        checkboxNone : null,
70        radioFalse : null,
71        radioTrue : null,
72        radioNone : null,
73
74        inputName : null,
75        inputNameNone : null,
76        inputValue : null,
77        inputValueNone : null,
78        textPlaceholder : null,
79        textPlaceholderNone : null,
80        emailPlaceholder : null,
81        emailPlaceholderNone : null,
82        datePlaceholder : null,
83        datePlaceholderNone : null,
84        timePlaceholder : null,
85        timePlaceholderNone : null,
86        numberPlaceholder : null,
87        numberPlaceholderNone : null,
88        passwordPlaceholder : null,
89        passwordPlaceholderNone : null,
90        maxlength : null,
91        enterkeytypeDefault : null,
92        enterkeytypeNext : null,
93        enterkeytypeGo : null,
94        enterkeytypeDone : null,
95        enterkeytypeSend : null,
96        enterkeytypeSearch : null,
97        headericon : null,
98        headericonNone : null,
99        showcounterTrue : null,
100        showcounterFalse : null,
101        showcounterNone : null,
102        menuoptions : null,
103        menuoptionsNone : null,
104        autofocusTrue : null,
105        autofocusFalse : null,
106        autofocusNone : null,
107        selectedstart : null,
108        selectedstartNone : null,
109        selectedendTrue : null,
110        selectedendNone : null,
111        softkeyboardenabledTrue : null,
112        softkeyboardenabledFalse : null,
113        softkeyboardenabledNone : null,
114        showpasswordiconTrue : null,
115        showpasswordiconFalse : null,
116        showpasswordiconNone : null
117    },
118
119    onShow(){
120        this.getCommonPropValues();
121        this.getSpecificPropValuesOne();
122        this.getSpecificPropValuesTwo();
123        globalThis.value = {
124            idProp : this.idProp, classProp : this.classProp, classPropNone : this.classPropNone,
125            styleProp : this.styleProp, refProp : this.refProp, refPropNone : this.refPropNone,
126            disabledPropTrue : this.disabledPropTrue, disabledPropFalse : this.disabledPropFalse,
127            disabledPropNone : this.disabledPropNone, focusablePropTrue : this.focusablePropTrue,
128            focusablePropFalse : this.focusablePropFalse, focusablePropNone : this.focusablePropNone,
129            dataProp : this.dataProp, dataPropNone : this.dataPropNone,
130            clickEffectPropSmall : this.clickEffectPropSmall, clickEffectPropMedium : this.clickEffectPropMedium,
131            clickEffectPropLarge : this.clickEffectPropLarge, clickEffectPropNone : this.clickEffectPropNone,
132            dirPropRtl : this.dirPropRtl, dirPropAuto : this.dirPropAuto, dirPropLtr : this.dirPropLtr,
133            dirPropNone : this.dirPropNone, forPropNull : this.forPropNull, forPropOne : this.forPropOne,
134            forPropThree : this.forPropThree, ifPropTrue : this.ifPropTrue, showPropTrue : this.showPropTrue,
135            showPropFalse : this.showPropFalse, showPropNone : this.showPropNone,
136
137            typeText : this.typeText, typeEmail : this.typeEmail, typeDate : this.typeDate,
138            typeTime : this.typeTime, typeNumber : this.typeNumber, typePassword : this.typePassword,
139            typeButton : this.typeButton, typeCheckbox : this.typeCheckbox,
140            typeRadio : this.typeRadio, typeNone : this.typeNone,
141            checkboxFalse : this.checkboxFalse, checkboxTrue : this.checkboxTrue,
142            checkboxNone : this.checkboxNone, radioFalse : this.radioFalse,
143            radioTrue : this.radioTrue, radioNone : this.radioNone, inputName : this.inputName,
144            inputNameNone : this.inputNameNone, inputValue : this.inputValue,
145            inputValueNone : this.inputValueNone, textPlaceholder : this.textPlaceholder,
146            textPlaceholderNone : this.textPlaceholderNone, emailPlaceholder : this.emailPlaceholder,
147            emailPlaceholderNone : this.emailPlaceholderNone, datePlaceholder : this.datePlaceholder,
148            datePlaceholderNone : this.datePlaceholderNone, timePlaceholder : this.timePlaceholder,
149            timePlaceholderNone : this.timePlaceholderNone, numberPlaceholder : this.numberPlaceholder,
150            numberPlaceholderNone : this.numberPlaceholderNone, passwordPlaceholder : this.passwordPlaceholder,
151            passwordPlaceholderNone : this.passwordPlaceholderNone, maxlength : this.maxlength,
152            enterkeytypeDefault : this.enterkeytypeDefault, enterkeytypeNext : this.enterkeytypeNext,
153            enterkeytypeGo : this.enterkeytypeGo, enterkeytypeDone : this.enterkeytypeDone,
154            enterkeytypeSend : this.enterkeytypeSend, enterkeytypeSearch : this.enterkeytypeSearch,
155            headericon : this.headericon, headericonNone : this.headericonNone,
156            showcounterTrue : this.showcounterTrue, showcounterFalse : this.showcounterFalse,
157            showcounterNone : this.showcounterNone, menuoptions : this.menuoptions,
158            menuoptionsNone : this.menuoptionsNone, autofocusTrue : this.autofocusTrue,
159            autofocusFalse : this.autofocusFalse, autofocusNone : this.autofocusNone,
160            selectedstart : this.selectedstart, selectedstartNone : this.selectedstartNone,
161            selectedendTrue : this.selectedendTrue, selectedendNone : this.selectedendNone,
162            softkeyboardenabledTrue : this.softkeyboardenabledTrue,
163            softkeyboardenabledFalse : this.softkeyboardenabledFalse,
164            softkeyboardenabledNone : this.softkeyboardenabledNone, showpasswordiconTrue : this.showpasswordiconTrue,
165            showpasswordiconFalse : this.showpasswordiconFalse, showpasswordiconNone : this.showpasswordiconNone
166        }
167    },
168
169    getCommonPropValues(){
170        this.idProp = this.$element("idProp").getInspector()
171        this.classProp = this.$element("classProp").getInspector()
172        this.classPropNone = this.$element("classPropNone").getInspector()
173        this.styleProp = this.$element("styleProp").getInspector()
174        this.refProp = this.$element("refProp").getInspector()
175        this.refPropNone = this.$element("refPropNone").getInspector()
176        this.disabledPropTrue = this.$element("disabledPropTrue").getInspector()
177        this.disabledPropFalse = this.$element("disabledPropFalse").getInspector()
178        this.disabledPropNone = this.$element("disabledPropNone").getInspector()
179        this.focusablePropTrue = this.$element("focusablePropTrue").getInspector()
180        this.focusablePropFalse = this.$element("focusablePropFalse").getInspector()
181        this.focusablePropNone = this.$element("focusablePropNone").getInspector()
182        this.dataProp = this.$element("dataProp").getInspector()
183        this.dataPropNone = this.$element("dataPropNone").getInspector()
184        this.clickEffectPropSmall = this.$element("clickEffectPropSmall").getInspector()
185        this.clickEffectPropMedium = this.$element("clickEffectPropMedium").getInspector()
186        this.clickEffectPropLarge = this.$element("clickEffectPropLarge").getInspector()
187        this.clickEffectPropNone = this.$element("clickEffectPropNone").getInspector()
188        this.dirPropRtl = this.$element("dirPropRtl").getInspector()
189        this.dirPropAuto = this.$element("dirPropAuto").getInspector()
190        this.dirPropLtr = this.$element("dirPropLtr").getInspector()
191        this.dirPropNone = this.$element("dirPropNone").getInspector()
192        this.forPropNull = this.$element("forPropNull").getInspector()
193        this.forPropOne = this.$element("forPropOne").getInspector()
194        this.forPropThree = this.$element("forPropThree").getInspector()
195        this.ifPropTrue = this.$element("ifPropTrue").getInspector()
196        this.showPropTrue = this.$element("showPropTrue").getInspector()
197        this.showPropFalse = this.$element("showPropFalse").getInspector()
198        this.showPropNone = this.$element("showPropNone").getInspector()
199    },
200
201    getSpecificPropValuesOne(){
202        this.typeText = this.$element("typeText").getInspector()
203        this.typeEmail = this.$element("typeEmail").getInspector()
204        this.typeDate = this.$element("typeDate").getInspector()
205        this.typeTime = this.$element("typeTime").getInspector()
206        this.typeNumber = this.$element("typeNumber").getInspector()
207        this.typePassword = this.$element("typePassword").getInspector()
208        this.typeButton = this.$element("typeButton").getInspector()
209        this.typeCheckbox = this.$element("typeCheckbox").getInspector()
210        this.typeRadio = this.$element("typeRadio").getInspector()
211        this.typeNone = this.$element("typeNone").getInspector()
212        this.checkboxFalse = this.$element("checkboxFalse").getInspector()
213        this.checkboxTrue = this.$element("checkboxTrue").getInspector()
214        this.checkboxNone = this.$element("checkboxNone").getInspector()
215        this.radioFalse = this.$element("radioFalse").getInspector()
216        this.radioTrue = this.$element("radioTrue").getInspector()
217        this.radioNone = this.$element("radioNone").getInspector()
218        this.inputName = this.$element("inputName").getInspector()
219        this.inputNameNone = this.$element("inputNameNone").getInspector()
220        this.inputValue = this.$element("inputValue").getInspector()
221        this.inputValueNone = this.$element("inputValueNone").getInspector()
222        this.textPlaceholder = this.$element("textPlaceholder").getInspector()
223        this.textPlaceholderNone = this.$element("textPlaceholderNone").getInspector()
224        this.emailPlaceholder = this.$element("emailPlaceholder").getInspector()
225        this.emailPlaceholderNone = this.$element("emailPlaceholderNone").getInspector()
226        this.datePlaceholder = this.$element("datePlaceholder").getInspector()
227        this.datePlaceholderNone = this.$element("datePlaceholderNone").getInspector()
228        this.timePlaceholder = this.$element("timePlaceholder").getInspector()
229        this.timePlaceholderNone = this.$element("timePlaceholderNone").getInspector()
230        this.numberPlaceholder = this.$element("numberPlaceholder").getInspector()
231        this.numberPlaceholderNone = this.$element("numberPlaceholderNone").getInspector()
232        this.passwordPlaceholder = this.$element("passwordPlaceholder").getInspector()
233        this.passwordPlaceholderNone = this.$element("passwordPlaceholderNone").getInspector()
234        this.maxlength = this.$element("maxlength").getInspector()
235
236    },
237    getSpecificPropValuesTwo(){
238        this.enterkeytypeDefault = this.$element("enterkeytypeDefault").getInspector()
239        this.enterkeytypeNext = this.$element("enterkeytypeNext").getInspector()
240        this.enterkeytypeGo = this.$element("enterkeytypeGo").getInspector()
241        this.enterkeytypeDone = this.$element("enterkeytypeDone").getInspector()
242        this.enterkeytypeSend = this.$element("enterkeytypeSend").getInspector()
243        this.enterkeytypeSearch = this.$element("enterkeytypeSearch").getInspector()
244        this.headericon = this.$element("headericon").getInspector()
245        this.headericonNone = this.$element("headericonNone").getInspector()
246        this.showcounterTrue = this.$element("showcounterTrue").getInspector()
247        this.showcounterFalse = this.$element("showcounterFalse").getInspector()
248        this.showcounterNone = this.$element("showcounterNone").getInspector()
249        this.menuoptions = this.$element("menuoptions").getInspector()
250        this.menuoptionsNone = this.$element("menuoptionsNone").getInspector()
251        this.autofocusTrue = this.$element("autofocusTrue").getInspector()
252        this.autofocusFalse = this.$element("autofocusFalse").getInspector()
253        this.autofocusNone = this.$element("autofocusNone").getInspector()
254        this.selectedstart = this.$element("selectedstart").getInspector()
255        this.selectedstartNone = this.$element("selectedstartNone").getInspector()
256        this.selectedendTrue = this.$element("selectedendTrue").getInspector()
257        this.selectedendNone = this.$element("selectedendNone").getInspector()
258        this.softkeyboardenabledTrue = this.$element("softkeyboardenabledTrue").getInspector()
259        this.softkeyboardenabledFalse = this.$element("softkeyboardenabledFalse").getInspector()
260        this.softkeyboardenabledNone = this.$element("softkeyboardenabledNone").getInspector()
261        this.showpasswordiconTrue = this.$element("showpasswordiconTrue").getInspector()
262        this.showpasswordiconFalse = this.$element("showpasswordiconFalse").getInspector()
263        this.showpasswordiconNone = this.$element("showpasswordiconNone").getInspector()
264    }
265}
266