Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vueblocks/elp-cascader

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueblocks/elp-cascader

A vue component based on 'element-ui' and 'vue-virtual-scroller'

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-76.47%
Maintainers
3
Weekly downloads
 
Created
Source

elp-cascader


Cascader based on 'element-ui' and 'vue-virtual-scroller'

@vueblocks/elp-cascader

基于element-uivue-virtual-scroller的级联选择器,用虚拟列表的方式逐级渲染列表。适用于数据量较大的场景。

Demo

效果预览

elp-cascader

install 安装

npm i @vueblocks/elp-cascader --save
# or
yarn add @vueblocks/elp-cascader

全局调用

在main.js中写入下面的代码

import '@vueblocks/elp-cascader/lib/elp-cascader.css'
import ElpCascader from '@vueblocks/cascader'
Vue.use(ElpCascader)

页面中直接使用

<template>
  <div id="app">
    <elp-cascader v-model="value" :options="options" />
    <elp-cascader-panel v-model="value" :options="options" />
  </div>
</template>

<script>
export default {
  data () {
    return {
      value: '',
      options: [
        {
          value: 'test',
          label: '测试',
          children: []
        }]
    }
  }
}
</script>

Attributes、Events、Methods、Props

详见ElementUI-Cascader

💡 与Element cascader的区别项

  1. el-cascader当option重复时,会出一个空白节点

    解决逻辑:重复时保留老节点,舍去新节点

  2. el-cascader多选状态下,第一个搜索词选中内容后,搜索词被清空

    解决逻辑:保留第一个搜索词

  3. props中新增属性

参数说明类型可选值默认值
selectWithExpand单选且checkStrictly为true时是否展开下一级boolean-false
lazyMultiCheck多选且懒加载时取值boolean-false
panelLabels面板标题Array-[]
checkAll多选且checkStrictly为true时全选boolean-false
panelSearch面板搜索boolean-false
panelLabels面板搜索标题Array-[]
panelPlaceholder面板搜索placeholderArray-[]
expandPanels默认展开面板数number-0
emptyText无匹配数据时展示文案string-'暂无数据'
  1. Cascader、CascaderPanel 新增事件
参数说明回调参数
lazy-loaded惰性加载完毕后触发选中节点的值

CHANGELOG

Keywords

FAQs

Package last updated on 13 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc