mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]增加PCAS省市区插件案例
This commit is contained in:
parent
d62e858af3
commit
441c660cf0
@ -36,4 +36,15 @@ class Plugs extends BasicAdmin
|
|||||||
$this->title = '省市区插件';
|
$this->title = '省市区插件';
|
||||||
return view('', ['title' => $this->title]);
|
return view('', ['title' => $this->title]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省市区插件
|
||||||
|
* @return \think\response\View
|
||||||
|
*/
|
||||||
|
public function pcasunzip()
|
||||||
|
{
|
||||||
|
$this->title = '省市区插件';
|
||||||
|
return view('', ['title' => $this->title]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
66
application/demo/view/plugs.pcasunzip.html
Normal file
66
application/demo/view/plugs.pcasunzip.html
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{extend name='extra@admin/content'}
|
||||||
|
|
||||||
|
{block name="content"}
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
<blockquote class="site-text layui-elem-quote">
|
||||||
|
PCAS 单文件JS省市区插件
|
||||||
|
</blockquote>
|
||||||
|
<div id="demo" class="citys">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" name="province"></select>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" name="city"></select>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" name="area"></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<pre class="layui-code" lay-title="HTML代码">
|
||||||
|
|
||||||
|
<div class="citys">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" name="province"></select>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" name="city"></select>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" name="area"></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</pre>
|
||||||
|
<pre class="layui-code" lay-title="javascript代码">
|
||||||
|
|
||||||
|
require(['pcasunzips'], function () {
|
||||||
|
/** // 省市联动
|
||||||
|
* new PCAS("Province","City")
|
||||||
|
* new PCAS("Province","City","吉林省")
|
||||||
|
* new PCAS("Province","City","吉林省","吉林市")
|
||||||
|
* // 省市地区联动
|
||||||
|
* new PCAS("Province","City","Area")
|
||||||
|
* new PCAS("Province","City","Area","吉林省")
|
||||||
|
* new PCAS("Province","City","Area","吉林省","松原市")
|
||||||
|
* new PCAS("Province","City","Area","吉林省","松原市","宁江区")
|
||||||
|
* // 省、市、地区对象取得的值均为实际值。
|
||||||
|
* // 注:省、市、地区提示信息选项的值为""(空字符串)
|
||||||
|
*/
|
||||||
|
new PCAS('province', 'city', 'area', '广东省', '广州市', '海珠区');
|
||||||
|
});
|
||||||
|
</pre>
|
||||||
|
<script>
|
||||||
|
require(['pcasunzips'], function () {
|
||||||
|
new PCAS('province', 'city', 'area', '广东省', '广州市', '海珠区');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
layui.use('code', function () {
|
||||||
|
layui.code({
|
||||||
|
encode: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/block}
|
Loading…
x
Reference in New Issue
Block a user