Skip to content

Latest commit

 

History

History
111 lines (94 loc) · 1.39 KB

README.md

File metadata and controls

111 lines (94 loc) · 1.39 KB

一个灵活的级联选择器


 生命不息,轮子不止
哇塞悲哀的博客

https://www.npmjs.com/package/d_cascader # d_cascader

这里是文档

Installation

npm install d_cascader --save

Usage

Register component

Registe global component:

import d_cascader from 'd_cascader'

Vue.component('d_cascader', d_cascader)

Registe component:

import d_cascader from 'd_cascader'

export default {
  components: { d_cascader }
}

How to use

Basic:

<d_cascader :cdate="citylist" > 
</d_cascader>
var     citylist=[
  {
    id:"0",
    name:"名字-0"
    unid:"0"
  },{
    id:"1",
    name:"名字-1"
    unid:"0"
  },
  {
    id:"2",
    name:"名字-2"
    unid:"1"
  }
  ,
  {
    id:"3",
    name:"名字-3"
    unid:"1"
  }
];

Default Value:

<v-distpicker :cdate="citylist" :de_value="devalue">
</v-distpicker>
var     citylist=[
  {
    id:"0",
    name:"名字-0"
    unid:"0"
  },{
    id:"1",
    name:"名字-1"
    unid:"0"
  },
  {
    id:"2",
    name:"名字-2"
    unid:"1"
  }
  ,
  {
    id:"3",
    name:"名字-3"
    unid:"1"
  }
];

var de_value=[
  0,3
];