赞
踩
以下为JS代码、xml和CSS代码,具体如下所示:
JS代码:
- import prompt from '@system.prompt';
-
- var timeoutID;
-
- const DURATION = 600;
-
- export default {
- data: {
- topList: [{
- title: 'title3_1',
- desc: 'description3_1',
- cls: 'todo_item_top',
- iconColor: '#99FF0000',
- txtColor: 'white',
- indexTxt: 'R'
- }, {
- title: 'title3_2',
- desc: 'description3_2',
- cls: 'todo_item_mid',
- iconColor: '#99FF7D00',
- txtColor: 'white',
- indexTxt: 'T'
- }, {
- title: 'title3_3',
- desc: 'description3_3',
- cls: 'todo_item_bottom',
- iconColor: '#99FF00FF',
- txtColor: 'white',
- indexTxt: 'Y'
- }
- ],
- middleList: [{
- title: 'title2_1',
- desc: 'description2_1',
- cls: 'todo_item_top',
- iconColor: '#9900FF00',
- txtColor: 'white',
- indexTxt: 'U'
- }, {
- title: 'title2_2',
- desc: 'description2_2',
- cls: 'todo_item_bottom',
- iconColor: '#9900FFFF',
- txtColor: 'white',
- indexTxt: 'I'
- }
- ],
- bottomList: [{
- title: 'title1_1',
- desc: 'description1_1',
- cls: 'todo_item_round',
- iconColor: '#990000FF',
- txtColor: 'white',
- indexTxt: 'O'
- }
- ]
- },
- onTopListItemClick($idx) {
- console.info("id = " + $idx);
- let index = $idx;
- let size = this.topList.length;
- if (index == -1) {
- for (let i = 0; i < size; i++) {
- if (i == 0) {
- this.topList[i].cls = "todo_item_top"
- } else if (i == size - 1) {
- this.topList[i].cls = "todo_item_bottom"
- } else {
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。