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 lineData: [ 21 { 22 strokeColor: '#0081ff', 23 fillColor: '#cce5ff', 24 data: [763, 550, 551, 554, 731, 654, 525, 696, 25 595, 628, 791, 505, 613, 575, 475, 553, 491, 680, 657, 716], 26 gradient: true, 27 } 28 ], 29 lineOps: { 30 xAxis: { 31 min: 0, 32 max: 20, 33 display: false, 34 }, 35 yAxis: { 36 min: 0, 37 max: 1000, 38 display: false, 39 }, 40 series: { 41 lineStyle: { 42 width: "5px", 43 smooth: true, 44 }, 45 headPoint: { 46 shape: "circle", 47 size: 20, 48 strokeWidth: 5, 49 fillColor: '#ffffff', 50 strokeColor: '#007aff', 51 display: true, 52 }, 53 loop: { 54 margin: 2, 55 gradient: true, 56 } 57 } 58 }, 59 lineSeg:{ 60 startColor:'#f7ce00', 61 endColor:'#d9542b', 62 value:50, 63 name:'蔬菜' 64 }, 65 lineRain:[ 66 { 67 startColor:'#f7ce00', 68 endColor:'#d9542b', 69 value:50, 70 name:'蔬菜' 71 }, 72 { 73 startColor:'#f7ce00', 74 endColor:'#d9542b', 75 value:50, 76 name:'水果' 77 } 78 ], 79 listOne:[{}], 80 listThree:[{},{},{}], 81 idProp : null, 82 classProp : null, 83 classPropNone : null, 84 styleProp : null, 85 refProp : null, 86 refPropNone : null, 87 disabledPropTrue : null, 88 disabledPropFalse : null, 89 disabledPropNone : null, 90 focusablePropTrue : null, 91 focusablePropFalse : null, 92 focusablePropNone : null, 93 dataProp : null, 94 dataPropNone : null, 95 clickEffectPropSmall : null, 96 clickEffectPropMedium : null, 97 clickEffectPropLarge : null, 98 clickEffectPropNone : null, 99 dirPropRtl : null, 100 dirPropAuto : null, 101 dirPropLtr : null, 102 dirPropNone : null, 103 104 flashOn:null, 105 flashOff:null, 106 flashTorch:null, 107 flashNone:null, 108 devicePositionFront:null, 109 devicePositionBack:null, 110 devicePositionNone:null, 111 }, 112 onShow(){ 113 this.getCommonPropValues(); 114 this.getSpecificPropValues(); 115 globalThis.value = { 116 idProp : this.idProp, classProp : this.classProp, classPropNone : this.classPropNone, 117 styleProp : this.styleProp, refProp : this.refProp, refPropNone : this.refPropNone, 118 disabledPropTrue : this.disabledPropTrue, disabledPropFalse : this.disabledPropFalse, 119 disabledPropNone : this.disabledPropNone, focusablePropTrue : this.focusablePropTrue, 120 focusablePropFalse : this.focusablePropFalse, focusablePropNone : this.focusablePropNone, 121 dataProp : this.dataProp, dataPropNone : this.dataPropNone, 122 clickEffectPropSmall : this.clickEffectPropSmall, 123 clickEffectPropMedium : this.clickEffectPropMedium, 124 clickEffectPropLarge : this.clickEffectPropLarge, 125 clickEffectPropNone : this.clickEffectPropNone, dirPropRtl : this.dirPropRtl, 126 dirPropAuto : this.dirPropAuto, 127 dirPropLtr : this.dirPropLtr, dirPropNone : this.dirPropNone, 128 129 flashOn:this.flashOn, 130 flashOff:this.flashOff, 131 flashTorch:this.flashTorch, 132 flashNone:this.flashNone, 133 devicePositionFront:this.devicePositionFront, 134 devicePositionBack:this.devicePositionBack, 135 devicePositionNone:this.devicePositionNone, 136 137 } 138 }, 139 getCommonPropValues(){ 140 this.idProp = this.$element("idProp").getInspector() 141 this.classProp = this.$element("classProp").getInspector() 142 this.classPropNone = this.$element("classPropNone").getInspector() 143 this.styleProp = this.$element("styleProp").getInspector() 144 this.refProp = this.$element("refProp").getInspector() 145 this.refPropNone = this.$element("refPropNone").getInspector() 146 this.disabledPropTrue = this.$element("disabledPropTrue").getInspector() 147 this.disabledPropFalse = this.$element("disabledPropFalse").getInspector() 148 this.disabledPropNone = this.$element("disabledPropNone").getInspector() 149 this.focusablePropTrue = this.$element("focusablePropTrue").getInspector() 150 this.focusablePropFalse = this.$element("focusablePropFalse").getInspector() 151 this.focusablePropNone = this.$element("focusablePropNone").getInspector() 152 this.dataProp = this.$element("dataProp").getInspector() 153 this.dataPropNone = this.$element("dataPropNone").getInspector() 154 this.clickEffectPropSmall = this.$element("clickEffectPropSmall").getInspector() 155 this.clickEffectPropMedium = this.$element("clickEffectPropMedium").getInspector() 156 this.clickEffectPropLarge = this.$element("clickEffectPropLarge").getInspector() 157 this.clickEffectPropNone = this.$element("clickEffectPropNone").getInspector() 158 this.dirPropRtl = this.$element("dirPropRtl").getInspector() 159 this.dirPropAuto = this.$element("dirPropAuto").getInspector() 160 this.dirPropLtr = this.$element("dirPropLtr").getInspector() 161 this.dirPropNone = this.$element("dirPropNone").getInspector() 162 }, 163 getSpecificPropValues(){ 164 this.flashOn = this.$element("flashOn").getInspector() 165 this.flashOff = this.$element("flashOff").getInspector() 166 this.flashTorch = this.$element("flashTorch").getInspector() 167 this.flashNone = this.$element("flashNone").getInspector() 168 this.devicePositionFront = this.$element("devicePositionFront").getInspector() 169 this.devicePositionBack = this.$element("devicePositionBack").getInspector() 170 this.devicePositionNone = this.$element("devicePositionNone").getInspector() 171 } 172} 173