How to use the vant.Search.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 YunaiV / onemall / mobile-web / src / page / page / index.vue View on Github external
import {Search} from "vant";

  export default {
    name:"page",
    components:{
        whitespace,
        pageLine,
        pageText,
        notice,
        // search,
        pageTitle,
        cube,
        [imageAd.name]:imageAd,
        imageText,
        product,
      [Search.name]: Search
    },
    data:function(){
        return{
          topheight:0,
          page:{},

          keyword: '', // 搜索关键词

          banners: [], // Banner 列表
          productRecommends: [], // 推荐商品列表
        }
    },
    created:function(){
        // GetPage().then(response=>{
        //     this.page=response;
        // });
github linlinjava / litemall / litemall-vue / src / views / home / tabbar-home.vue View on Github external
},
    initViews() {
      getHome().then(res => {
        this.shopInfos = res.data.data;
      });
    }
  },

  components: {
    [Row.name]: Row,
    [Col.name]: Col,
    [Card.name]: Card,
    [Toast.name]: Toast,
    [CouponCell.name]: CouponCell,
    [CouponList.name]: CouponList,
    [Search.name]: Search,
    [Panel.name]: Panel,
    [List.name]: List,
    [Swipe.name]: Swipe,
    [SwipeItem.name]: SwipeItem,
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
    [Tag.name]: Tag,
    [Grid.name]: Grid,
    [GridItem.name]: GridItem
  }
};
github linlinjava / litemall / litemall-vue / src / views / user / module-collect / index.vue View on Github external
});
    },
    cancelCollect(event, i, item) {
      this.$dialog.confirm({ message: '是否取消收藏该商品' }).then(() => {
        collectAddOrDelete({ valueId: item.valueId, type: 0 }).then(res => {
          this.list.splice(i, 1);
        });
      });
    },
    itemClick(id) {
      this.$router.push(`/items/detail/${id}`);
    }
  },

  components: {
    [Search.name]: Search,
    [IsEmpty.name]: IsEmpty,
    [List.name]: List,
    [Card.name]: Card
  }
};
github linlinjava / litemall / litemall-vue / src / views / items / search-result / index.vue View on Github external
},
    scrollShowArrow() {
      this.showArrow = document.getElementById('app').scrollTop > 120;
    },
    backTop() {
      document.getElementById('app').scrollTop = 0;
    },
    itemClick(i) {
      this.$router.push({ name: 'detail', params: { itemId: i } });
    }
  },

  components: {
    [ItemGroup.name]: ItemGroup,
    [ItemCardHori.name]: ItemCardHori,
    [Search.name]: Search,
    [List.name]: List,
    [IsEmpty.name]: IsEmpty
  }
};
github linlinjava / litemall / litemall-vue / src / views / items / search / index.vue View on Github external
this.page += 1;
      await this.searchGoods();
      this.loading = false;
      if (this.pages <= this.page) {
        this.finished = true;
      }
    },
    itemClick(id) {
      this.$router.push(`/items/detail/${id}`);
    }
  },
  activated() {
    this.wordHistory = this.getKeyWordHistory();
  },
  components: {
    [Search.name]: Search,
    [Card.name]: Card,
    [Tag.name]: Tag,
    [List.name]: List,
    [IsEmpty.name]: IsEmpty
  }
};
github linlinjava / litemall / litemall-vue / src / views / items / tabbar-class.vue View on Github external
catalogList({ id: id}).then(res => {
        let index = getIndex(this.list, res.data.data.currentCategory.id);
        this.$refs.classTree.changeList(res.data.data);
        this.subCategory = res.data.data.currentSubCategory;
        if (this.subCategory.length === 0) this.isEmpty = true;
      });
    },
    toItemList(id) {
      this.$router.push({
        name: 'list',
        query: { keyword: '', itemClass: id }
      });
    }
  },
  components: {
    [Search.name]: Search,
    [classTree.name]: classTree,
    [IsEmpty.name]: IsEmpty
  }
};
github linlinjava / litemall / litemall-vue / src / views / items / tabbar-catalog.vue View on Github external
changeCatalog(id) {
      catalogCurrent({ id: id}).then(res => {
        let data = res.data.data;
        this.currentCategory = data.currentCategory;        
        this.currentSubCategoryList = data.currentSubCategory;
      });
    },
    toItemList(id) {
      this.$router.push({
        name: 'category',
        query: { keyword: '', itemClass: id }
      });
    }
  },
  components: {
    [Search.name]: Search
  }
};