index.js 666 Bytes
Newer Older
李嘉林 committed
1 2 3
import { VantComponent } from '../common/component';
import { GREEN, GRAY_DARK } from '../common/color';
VantComponent({
程默 committed
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 30 31 32
  classes: ['desc-class'],
  props: {
    icon: String,
    steps: Array,
    active: Number,
    direction: {
      type: String,
      value: 'horizontal',
    },
    activeColor: {
      type: String,
      value: GREEN,
    },
    inactiveColor: {
      type: String,
      value: GRAY_DARK,
    },
    activeIcon: {
      type: String,
      value: 'checked',
    },
    inactiveIcon: String,
  },
  methods: {
    onClick(event) {
      const { index } = event.currentTarget.dataset;
      this.$emit('click-step', index);
    },
  },
李嘉林 committed
33
});