GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sprialmint9/jQuery.multiCascader: Jquery 多选级联下拉

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
tool
tool
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
demo.html
demo.html
 
 
index.js
index.js
 
 
index.scss
index.scss
 
 

Repository files navigation

jQuery.multiCascader

Jquery 多选级联下拉(esmodule版)

**注意:**基于es6实现,目前只在webpack打包后才能正常使用。

调用

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <link rel="stylesheet" href="./index.scss" />
    <script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script>
    <script src="./index.js"></script>
  </head>
  <body>
    <div id="areaSelected"></div>
    <script>
      $(function () {
        var data = [
          {
            name: "全国",
            id: 2703,
            children: [],
          },
          {
            name: "宁夏",
            id: 19,
            children: [
              {
                name: "固原",
                id: 1662,
              },
              {
                name: "石嘴山",
                id: 1663,
              },
            ],
          },
        ];
        $("#areaSelected").multiCascader({
          data,
          placeholder: "请选择地区",
          inputName: "areaId",
          isTwoDimensionValue: true,
          callBack() {
            // console.log(val);
          },
        });
      });
    </script>
  </body>
</html>

参数

参数 类型 默认值 注释
data Array [] 元数据
value Array [] 已选项
inputName String "mucaser" input 名称
valueKey String "id" value的key名字
labelKey String "name" label的key名字
showLeafLabel Boolean true 是否展示children
childrenKey String "children" children的key名字
placeholder String "请输入" placeholder
isTwoDimensionValue Boolean false 返回值方式,true返回[<父节点value>, <子节点value>],false返回[<子节点value>]
show Boolean false 初始化后是否展示
list Object {
height:300,
width: 200
}
下拉菜单的高度和宽度
callBack Function 回调,返回已选值

About

Jquery 多选级联下拉

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.