Skip to content
  • This project
    • Loading...
  • Sign in

dev / zhiliang-light-mp

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • zhiliang-light-mp
  • src
  • ui
  • vant-weapp
  • badge
  • index.js
  • simon's avatar
    1.版本提交 · 032992c4 ...
    032992c4
    2.加ui
    simon committed 2019-07-25 19:30:04 +0800
index.js 490 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
import { VantComponent } from '../common/component';
VantComponent({
    relation: {
        type: 'ancestor',
        name: 'badge-group'
    },
    props: {
        info: null,
        title: String
    },
    methods: {
        onClick() {
            const group = this.getRelationNodes('../badge-group/index')[0];
            if (group) {
                group.setActive(this);
            }
        },
        setActive(active) {
            this.set({ active });
        }
    }
});