Giter Site home page Giter Site logo

femessage / el-select-area Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 14.0 5.81 MB

🇨🇳Chinese area select component(including Taiwan、Hongkong、Macao)

Home Page: https://femessage.github.io/el-select-area/

License: MIT License

JavaScript 91.85% Vue 7.26% Shell 0.89%
select area chinese-area

el-select-area's People

Contributors

colmugx avatar dependabot-preview[bot] avatar donaldshen avatar eviiit avatar gd4ark avatar levy9527 avatar lianghx-319 avatar linrunzheng avatar ouzuyu avatar

Stargazers

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

Watchers

 avatar  avatar

el-select-area's Issues

默认尺寸`size`应该和element保持一致,能支持全局尺寸定义

Describe the bug

默认尺寸size应该和element保持一致,这样便于全局设置尺寸。

全局设置尺寸

Vue.prototype.$ELEMENT = {size: 'mini'}

原el-select 组件默认尺寸,可支持全局size

el-select 源代码

selectSize() {
      return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
}

el-select-area 问题点

el-select-area 源代码

    size: {
      type: String,
      default: 'medium', #不应该设置
      validator: val => ['small', 'medium', 'mini'].includes(val)
    },

可修改为:

# 1.
    size: {
      type: String,
      validator: val => ['small', 'medium', 'mini'].includes(val)
    },

# 2.
    size: {
      type: String,
      default(){
        return (this.$ELEMENT || {}).size || 'medium' 
      },
      validator: val => ['small', 'medium', 'mini'].includes(val)
    },

Expected behavior

能支持全局size设置

environment information

  • Version: 2.1.0
  • OS: Ubuntu
  • Browser: chrome

Reset Value but the options still exist

Describe the bug
When reset value, the deep level select options is maintained

Screenshots
201903128

To Reproduce
Steps to reproduce the behavior:

  1. Select some value with the component
  2. Then reset it

Expected behavior
Once reset value, the options should clear also

environment information:

  • Version [latest]

`auto-fill=false`时,结果未重置区域联级数据!!!

Describe the bug

auto-fill=false时,未重置区域联级数据:
省-市-县,更改省级选择时,未重置县级数据

Screenshots

第一次状态:
image
image

变更后:
image
image

To Reproduce

Steps to reproduce the behavior:

  1. 先选择到县级,如:北京市-北京市-东城区
  2. 更改省级数据:四川省
  3. 就可以看到错误了

Expected behavior

每次update时,正常重置下级联级数据

environment information

  • Version [2.1.0]
  • OS: [Ubuntu]
  • Browser [Chrome]

[select-area]: 传入的默认值参数有误

问题
该组件第一次默认值,必须符合下拉列表中的一个。当传入值不存在的情况下,无论如何设置default属性,console总会提示该错误。

需求
当default=[]时,能否不报错? default属性是否可以更改为不必须字段?

与 el-data-table 一起使用出现奇怪的问题

Describe the bug

Q1

使用如下配置el-data-table导致页面时正常时报错(刷新后规律地一次正常一次报错)

searchForm: [
          {
            $id: 'area',
            $type: 'select-area',
            label: '加盟区域',
            $default: [],
          },
        ]

加入inputFormat或outputFormat任一个就正常了

Q2

el-data-table 执行查询刷新页面后 URL query 保存了搜索参数,但相应的省市区没有选中

Screenshots

error-screenshot

To Reproduce

仓库 的DEMO - el-data-table

environment information

  • Version [e.g. 22]
    "@femessage/el-data-table": "^1.15.1",
    "@femessage/el-select-area": "^2.1.2",

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.