Demo entry 6331224

test

   

Submitted by anonymous on Dec 01, 2016 at 12:59
Language: HTML. Code size: 1.1 kB.

<template>
    <button class="btn btn-primary" @click="show=true">选择门店</button><span>已选{ {num} }家门店,id为{ {ids} }</span>
    <poipicker :datas="datas" :limit="3" tip="提示文案。" :show="show" @toggle="show = arguments[0]" @change="handleChange"></poipicker>
</template>

<script>
  import poipicker from '../components/PoiPicker.vue'

  export default {
    components: {
      poipicker
    },
    data() {
      return {
        datas: [],
        num: 0,
        ids: [],
        show: false
      }
    },
    methods: {
      handleChange(num, ids) {
        this.num = num;
        this.ids = ids;
      }
    },
    mounted() {
      setTimeout(() => {
        this.datas = [{
          cityId: 111,
          cityName: '北京',
          wmPois: [{
            id: 111111,
            name: "北京XX店"
          }, {
            id: 111222,
            name: "北京YY店"
          }]
        }, {
          cityId: 222,
          cityName: '上海',
          wmPois: [{
            id: 222111,
            name: "上海XX店"
          }, {
            id: 222222,
            name: "上海YY店"
          }]
        }]
      }, 2000)
    }
  }
</script>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).