Git Product home page Git Product logo

vue-picker's Introduction

Overview

The picker component based on vue.js

DEMO

vue-picker

Install

npm install vue-3d-picker --save
import picker from 'vue-3d-picker';

Register component:

Vue.component(picker.name, picker);

Base Usage

<picker v-model="visible" :data-items="items" @change="onValuesChange">
	<div class="top-content" slot="top-content">Top of the content.</div>
	<div class="bottom-content" slot="bottom-content">Bottom of the content.</div>
</picker>
export default {
  methods: {
    onValuesChange(result1, result2, ... ) {
      console.log(result1, result2)
    }
  },
  data() {
    return {
      visible: true,
      items: [
        {
          values: ['2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007'],
        }, {
          values: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
        }
      ]
    }
  }
}

Options

Picker Options:

Option Description
v-model Boolean(default: false) Picker show and hide.
:data-items Array(default: []) The configuration on the items.
@change Function() Listening when data changes.

Picker Items Options:

Option Description Type Default
index item default index position. Number 0
values values of this item. Array []
width The width of the item. The unit is %. String 'flex'
name If values is an object. set the displayed key. String 'value'
maxScrollValue The maximum value for scrolling. Number values.length

example

npm install

npm run dev

prompt

Need postcss-salad support

中文

Picker

vue-picker's People

Contributors

xiecg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue-picker's Issues

建议追加编译配置

依赖外部工具

"postcss-loader": "^1.2.1",
"postcss-salad": "^1.0.6",

webpack 配置

  vue: {
    postcss: function () {
            return [require('postcss-salad')];
        }
 }

touch组件从哪里来的

我在自己项目照片那个import picker from 'vue-3d-picker';参考你的代码写的,但是最后报出
image

在安卓下不显示界面

我用的vue-cli,加入vue-3d-picker后,在安卓机的浏览器下不显示界面,在苹果机和pc上都可以

我不想喷的真的

但是做的真的是太垃圾了啊。。
安卓直接卡死。
ios滑动的快的一批。
虽然开源精神我很支持,但是能写写好再发出来么。。

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.