• This project
    • Loading...
  • Sign in

Administrator / xcx-take · Files

Go to a project

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • xcx-take
  • components
  • classlist
  • classlist.js
  • no message
    1c6c84f3
    by liuxuqing
    2021-02-04 13:41:48 +0800  
    Browse Files
classlist.js 641 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Component({
    properties:{
        typelist:Array,
        topHeight:{
            type:Number,
            value:0
        }
    },
    data:{
    },
    methods:{
        selectclass:function(e){
            var id=e.currentTarget.dataset.id;
            var typelist=this.data.typelist;
            typelist.forEach(function(v,i){
                v.isactive=false
                if(id==v.id){
                    v.isactive=true;
                }
            })
            this.setData({
                typelist:typelist,
                classid:id

            })
            this.triggerEvent('getcooklist',id)
        },
    }
})