GithubHelp home page GithubHelp logo

limingziqiang / vue-mobile-picker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huangche007/vue-mobile-picker

0.0 2.0 0.0 8 KB

A picker for PC and Mobile in Vue

Home Page: https://www.npmjs.com/package/vue-mobile-picker

HTML 2.98% Vue 62.23% CSS 16.06% JavaScript 18.72%

vue-mobile-picker's Introduction

vue-mobile-picker

vue-mobile-picker is a picker for picker in vue,You can easily use this component.

Usage

npm install vue-mobile-picker -S
npm install better-picker --save-dev

How to use?

You can import the whole package or each module individual.

import VueMobilePicker from 'vue-mobile-picker'
Vue.use(VueMobilePicker)

create one you component

<picker :datas="datas" :title="title" @child-info="get"></picker>

this data of datas and title just like this:

Name Type Necessary Desc
datas Array Yes It's a two dimensional
title String No this picker's title
datas:[
        [
            {
                text: '小美',
                value: 1
            },
            {
              text: '猪猪',
              value: 2
            }
        ],
        [
            {
                text: '张三',
                value: 1
            },
            {
                text: '李四',
                value: 2
            },
            {
                text: '王五',
                value: 3
            },
            {
                text: '赵六',
                value: 4
            },
            {
                text: '吴七',
                value: 5
            },
            {
                text: '陈八',
                value: 6
            },
            {
                text: '杜九',
                value: 7
            },
            {
                text: '黄十',
                value: 8
            },
            {
                text: '呵呵',
                value: 9
            },
            {
                text: '哈哈',
                value: 10
            },
            {
                text: '嘿嘿',
                value: 11
            },
            {
                text: '啦啦',
                value: 12
            }
        ],
        [
            {
                text: '开心',
                value: 1
            }, {
                text: '生气',
                value: 2
            },
            {
                text: '搞笑',
                value: 3
            }, {
                text: '难过',
                value: 4
            }
        ]

    ],

How get the choice result

  • just call this method named get:

      get(choiceData){
      	console.log(choiceData)
      }	
    

Single row selection

单选

Multi row selection

多选

Run Demo

  • npm install
  • npm run dev

vue-mobile-picker's People

Watchers

James Cloos avatar ²¹带你去旅行♬ ♫♬ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.