How to use the vant.Tabs.name function in vant

To help you get started, we’ve selected a few vant examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github czero1995 / fancy-store / src / views / category / Category.vue View on Github external
};
    },
    data() {
        return {
            menuList: [],
            categoryList: [],
            categoryContent: [],
            pageNum: 0,
            type: ""
        };
    },
    mixins: [dataMixin],
    components: {
        [NavBar.name]: NavBar,
        [Tab.name]: Tab,
        [Tabs.name]: Tabs,
        [Toast.name]: Toast,
        [Icon.name]: Icon
    },
    computed: {},

    mounted() {
        this.getMenuList();
        // this.getCategoryList();
    },
    methods: {
        async getMenuList() {
            let res = await apiGetCategoryMenu();
            this.menuList = res.data.data.slice(1);
            console.log("menuList: ", this.menuList);
            this.type = this.menuList[0].title;
            this.getCategoryList();
github linlinjava / litemall / litemall-vue / src / views / user / coupon-list / index.vue View on Github external
}).then(res => {
        this.couponList.push(...res.data.data.list);

        this.loading = false;
        this.finished = res.data.data.page >= res.data.data.pages;
      });
    },
    handleTabClick() {
      this.page = 0;
      this.couponList = [];
      this.getCouponList();
    }
  },
  components: {
    [Tab.name]: Tab,
    [Tabs.name]: Tabs,
    [Panel.name]: Panel,
    [Card.name]: Card,
    [List.name]: List,
    CouponCell,
    CouponList
  }
};
github dabaoRain / vueFruitShop / src / components / detail / Detail.vue View on Github external
} from 'vant';
import { Toast } from 'vant';
import { Stepper } from 'vant';
import DetailHeader from '../../common/header';
 export default{
   data(){
     return{
		    active:0,
				currentFruit:[],
				cartLen:0,
				isCollected:false
	   }
   },
   components:{
		 [Tab.name]:Tab,
		 [Tabs.name]:Tabs,
		 [Swipe.name]:Swipe,
		 [SwipeItem.name]:SwipeItem,
		 [GoodsAction.name]:GoodsAction,
		 [GoodsActionBigBtn.name]:GoodsActionBigBtn,
		 [GoodsActionMiniBtn.name]:GoodsActionMiniBtn,
		 [Stepper.name]:Stepper,
		 DetailHeader
   },
	 methods:{
	   addGoodsCar(goodObj){
			var idExist = this.carts.find(item => {
				return item.id == goodObj.id;
			});
			if(!idExist){
				goodObj.danxuan=true;
			  this.$store.dispatch('addCar', goodObj);
github linlinjava / litemall / litemall-vue / src / views / items / category / index.vue View on Github external
}).then(res => {
        this.goodsList.push(...res.data.data.list);
        this.loading = false;
        this.finished = res.data.data.page >= res.data.data.pages;
      });
    },
    itemClick(id) {
      this.$router.push(`/items/detail/${id}`);
    }
  },

  components: {
    [List.name]: List,
    [Card.name]: Card,
    [Tab.name]: Tab,
    [Tabs.name]: Tabs
  }
};
github linlinjava / litemall / litemall-vue / src / views / user / refund-list / index.vue View on Github external
},
    handleTabClick(index) {
      if (this.activeIndex != index) {
        this.activeIndex = index;
      }
    },
    getStatusText(status) {
      return STATUS_TEXT[status] || '';
    },
    getRefundList(){

    }
  },
  components: {
    [Tab.name]: Tab,
    [Tabs.name]: Tabs,
    [Panel.name]: Panel,
    [Card.name]: Card,
    [List.name]: List
  }
};
github czero1995 / fancy-store / src / views / order / Order.vue View on Github external
data() {
        return {
            havePage: false,
            orderData: [],
            type: "paying",
            active: 0,
            orderTab: [{ name: this.$t("m.order.paying") }, { name: this.$t("m.order.waitPack") }, { name: this.$t("m.order.done") }, { name: this.$t("m.order.all") }],
            title: "",
            showEdit: false
        };
    },
    mixins: [dataMixin],
    components: {
        [NavBar.name]: NavBar,
        [Tab.name]: Tab,
        [Tabs.name]: Tabs,
        [Toast.name]: Toast,
        [Icon.name]: Icon,
        [Tag.name]: Tag,
        [Dialog.name]: Dialog
    },
    computed: {
        ...mapGetters(["this.$store.state.orderStatus"])
    },
    created() {
        switch (this.$store.state.orderStatus) {
            case "paying":
                this.active = 0;
                this.type = "paying";
                break;
            case "payed":
                this.active = 1;
github linlinjava / litemall / litemall-vue / src / views / user / order-list / index.vue View on Github external
},
    handleTabClick() {
      this.page = 0;
      this.orderList = [];
      this.getOrderList();
    },
    toOrderDetail(id) {
      this.$router.push({
        path: '/order/order-detail',
        query: { orderId: id }
      });
    }
  },
  components: {
    [Tab.name]: Tab,
    [Tabs.name]: Tabs,
    [Panel.name]: Panel,
    [Card.name]: Card,
    [List.name]: List,
    [Tag.name]: Tag
  }
};
github dabaoRain / vueFruitShop / src / components / pay / Pay.vue View on Github external
import { SubmitBar } from 'vant';
export default{
  data(){
	  return{
		  currentAddressList:[],
			invoiceTitle:"",
			"pay_active":0,
			"orderTotal":0,
			"payStyle":"在线支付",
			"orderMessage":"",
			tabNum:0
		}
	},
	components:{
	  [Tab.name]:Tab,
		[Tabs.name]:Tabs,
		[SubmitBar.name]:SubmitBar,
		PayHeader
	},
	methods:{
		orderTotalNum(){
			var totalSum = 0;
			this.orders.forEach((item)=>{
				totalSum+=item.proPrice*item.homeValue*100	
			})
			return totalSum;
		},
		paySuccess(){
			var orderObj={};
			orderObj.orders = this.orders;
			orderObj.orderMessage = this.orderMessage;
			orderObj.invoiceTitle = this.invoiceTitle;