GithubHelp home page GithubHelp logo

elementui / region-picker Goto Github PK

View Code? Open in Web Editor NEW
61.0 5.0 25.0 1.17 MB

A region picker based on Vue and ElementUI.

Home Page: https://elementui.github.io/region-picker/

License: MIT License

JavaScript 69.86% CSS 26.14% Vue 4.00%
element-ui vue2 component

region-picker's Introduction

region-picker

Build Status npm NPM downloads LICENSE

A region picker based on Vue and ElementUI.

Demo

Region Picker

Installation

yarn add region-picker
# npm i region-picker -S

Usage

import RegionPicker from 'region-picker'
import 'region-picker/dist/region-picker.css'
import data from 'region-picker/dist/data.json'

Vue.use(RegionPicker)
// or
Vue.component(RegionPicker.name, RegionPicker)
<!-- Single -->
<region-picker :data="data"></region-picker>

<!-- Multiple -->
<region-picker multiple :data="data"></region-picker>

<!-- Two Level -->
<region-picker :max-level="2" :data="data"></region-picker>

<!-- Disabled -->
<region-picker disabled :data="data"></region-picker>

<!-- Default Value -->
<region-picker v-model="place" :data="data"></region-picker>

License

MIT

region-picker's People

Contributors

liril-net 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

Watchers

 avatar  avatar  avatar  avatar  avatar

region-picker's Issues

两个BUG反馈

  1. 在form表单下,region-picker(prop:muliple=true),点击确认、取消按钮会Submit Form,需要设置button的type=button
    h( 'button', { class: { 'region-picker__button': true, default: true }, attrs: { type: 'button' }, on: { click: () => this.blur() } }, this.cancelText ),
  2. region-picker(prop:muliple=true),点击取消按钮,没有Reset Value
    blur() { this.panelVisible = false this.searchValue = '' if (this.multiple && !this.confirmed) { this.selected = this._selected this.$emit('change', this.modelValue) this.$emit('input', this.modelValue) this.dispatch('ElFormItem', 'el.form.change', this.modelValue) } if (this.$refs.searchInput) { this.$nextTick(() => { this.$refs.searchInput.blur() this.$emit('blur') this.dispatch('ElFormItem', 'el.form.blur', this.modelValue) this.isFocus = false }) } } },

不能改变样式

我在页面中重写插件的样式,但是毫无反应,在Chrome检查元素,不显示我添加的属性

v-model 默认值不是双向绑定?

您好,拿您的代码试了下,v-model 似乎不是双向绑定的.. 看了下源码,单选模式 single.vue 里提供 了select({}) 可以置空,但是该方法并没有往顶层暴露... 😌 有点尴尬..

有遇到多选清空表单的业务场景,貌似只能通过 v-if 重绘或者去清空掉dom了,心塞..

才疏学浅,或许我姿势不对?

谢谢

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.