1 Star 0 Fork 1

null/layui-admx

forked from 手里有个码/layui-admx 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cascader.html 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
手里有个码 提交于 2020-11-22 10:33 . 第一版
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>异步下级</title>
<link rel="stylesheet" href="static/layui-v2.5.6/layui/css/layui.css" media="all">
<link rel="stylesheet" href="static/exts/cascader/cascader.css" media="all">
<style></style>
</head>
<body>
<div class="layui-form-item">
<label class="layui-form-label">选择框</label>
<div class="layui-input-block">
<input type="text" id="cascader" class="layui-input" readonly="readonly">
</div>
</div>
<script src="static/layui-v2.5.6/layui/layui.js"></script>
<script>
layui.config({
base: 'static/exts/cascader'
}).extend({
cascader: '/cascader'
}).use(['form',"jquery","cascader"], function(){
var $ = layui.jquery;
var cascader = layui.cascader;
var cas = cascader({
elem: "#cascader",
url: "http://192.168.26.7/api/cascader",
type: "get",
triggerType: "change",
showLastLevels: true,
where: {
a: "aaa"
},
value: ["A", "AA1"],
success: function (data) {
console.log(data);
}
});
cas.reload({}) // 重载
});
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/it0662/layui-admx.git
git@gitee.com:it0662/layui-admx.git
it0662
layui-admx
layui-admx
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385