npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ar-cascader

v1.0.10

Published

administrative region cascader base on view-design

Downloads

142

Readme

ar-cascader

基于view-design的行政区域级联组件

administrative region cascader base on view-design

vue2

install 安装

  npm install ar-cascader
  
  or
  
  pnpm add ar-cascader

use 使用

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

    import arCascader from 'ar-cascader'
    import Vue from 'vue'
    Vue.use(arCascader)

接下来,你就可以在页面中使用ar-cascader了

  <template>
      <ar-cascader v-model="value"/>
  </template>
  <script>
      export default {
          data () {
              return {
                  value: []
              }
          }
      }
  </script>

示例

1.拉取git项目ar-cascader

  git clone https://github.com/RickyHeaven/ar-cascader.git

(也可以直接下载zip文件)

2.安装依赖

  pnpm i

3.运行项目

  pnpm serve

然后你就能在浏览器看到跑起来的示例了~

vue3

install 安装

  npm install ar-cascader@vue3
  
  or
  
  pnpm add ar-cascader@vue3

use 使用

  //vue SFC
  
  import {ref} from 'vue'
  import ArCascader from 'ar-cascader';
  const value = ref([])

  <ArCascader v-model="value"/>

示例

1.拉取git项目ar-cascader

  git clone https://github.com/RickyHeaven/ar-cascader-core.git

(也可以直接下载zip文件)

2.安装依赖

  pnpm i

3.运行项目

  pnpm dev

然后你就能在浏览器看到跑起来的示例了~

config 配置

属性 | 说明 |  类型 |  默认值 :-------: | ------- | :-------: | :-------: value|用于存放结果的数组,建议使用v-model来做双向绑定|无|无 v-model|用于存放结果的数组,选择了数据后会自动更新|无|无 level|要显示的级别,如设为2则显示省、市和县,即3级,级别可设为0、1、2三级(area-data到2.0版本以后不再包含街道数据)|String | Number|2 data-type|返回数据的类型,'all':城市编码和名称,'code':只返回编码,'name':只返回名称,数据格式同al-selector补充说明|String|all size|选择器尺寸,该属性同iview组件cascader的size属性,可选值为small,large|String|无 placeholder|选择器未选择时显示的占位字符|String|'请选择'] disabled|是否禁用选择器|Boolean|false render-format|选择后展示的函数,用于自定义显示格式|Function|label => label.join(' / ') change-on-select|当此项为 true 时,点选每级菜单选项值都会发生变化|Boolean|false

事件

事件 | 说明 | 返回值 :-------: | ------- | :-------: on-change|选择完成后的回调,返回值此时已选的数据数组|data