Vant TreeSelect 分類選擇


參考地址

父組件

<template>
  <div>
  <van-tree-select
  height="155vw"
  :items="items"
  :main-active-index.sync="active"
>
  <template slot="content">
    <test />
       
   
  </template>
</van-tree-select>

  </div>
</template>
<script>
import { Notify } from 'vant';
import test from './test'
export default {
  name: "index",
  components:{test},
  data() {
    return {
        active: 0,
      items: [{ text: '分組 1' }, { text: '分組 2' }]
    };
  },
 
};
</script>

子組件

<template>
   <div>
   <van-card
  num="2"
  price="2.00"
  desc="描述信息"
  title="商品標題"
  thumb="https://img.yzcdn.cn/vant/ipad.jpeg"
>
  <div slot="tags">
    <van-tag plain type="danger">標簽</van-tag>
    <van-tag plain type="danger">標簽</van-tag>
  </div>
  <div slot="footer">
    <van-button size="mini">按鈕</van-button>
    <van-button size="mini">按鈕</van-button>
  </div>
</van-card>
    </div>
</template>
<script>
    export default {
        name: "test",
        // props:{
        //     id:String,
        //     name:String
        // }
       
    }
</script>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM