mirror of https://github.com/layui/layui
更新 docs 相关静态路径
parent
c1afe5a327
commit
d7df37477c
|
@ -14,7 +14,7 @@ layui.use(function(){
|
|||
// dropdown 在表格中的应用
|
||||
table.render({
|
||||
elem: '#ID-dropdown-demo-table',
|
||||
url: '/static/2.8/json/table/demo5.json',
|
||||
url: '/static/json/2/table/demo5.json',
|
||||
title: '用户数据表',
|
||||
cols: [[
|
||||
{type: 'checkbox', fixed: 'left'},
|
||||
|
@ -74,4 +74,4 @@ layui.use(function(){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<table class="layui-table" lay-data="{height:315, url:'/static/2.8/json/table/user.json', page:true}" id="ID-table-demo-init">
|
||||
<table class="layui-table" lay-data="{height:315, url:'/static/json/2/table/user.json', page:true}" id="ID-table-demo-init">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{field:'id', width:80, sort: true}">ID</th>
|
||||
|
@ -13,4 +13,4 @@
|
|||
</thead>
|
||||
</table>
|
||||
|
||||
<!-- import layui -->
|
||||
<!-- import layui -->
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
// 创建渲染实例
|
||||
table.render({
|
||||
elem: '#ID-table-demo-css',
|
||||
url:'/static/2.8/json/table/demo1.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url:'/static/json/2/table/demo1.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: true,
|
||||
height: 'full-35',
|
||||
lineStyle: 'height: 151px;', // 定义表格的多行样式
|
||||
|
|
|
@ -55,7 +55,7 @@ layui.use(['table', 'dropdown'], function(){
|
|||
// 创建渲染实例
|
||||
table.render({
|
||||
elem: '#test',
|
||||
url: '/static/2.8/json/table/demo1.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/table/demo1.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
toolbar: '#toolbarDemo',
|
||||
defaultToolbar: ['filter', 'exports', 'print', {
|
||||
title: '提示',
|
||||
|
|
|
@ -49,7 +49,7 @@ layui.use(function(){
|
|||
// 渲染
|
||||
table.render({
|
||||
elem: '#ID-table-demo-editmodes',
|
||||
url: '/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: true,
|
||||
css: [ // 设置单元格样式
|
||||
// 取消默认的溢出隐藏,并设置适当高度
|
||||
|
@ -178,4 +178,4 @@ layui.use(function(){
|
|||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -14,7 +14,7 @@ layui.use(function(){
|
|||
// 创建表格实例
|
||||
table.render({
|
||||
elem: '#ID-table-demo-editable',
|
||||
url: '/static/2.8/json/table/edit.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/table/edit.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: true,
|
||||
//,editTrigger: 'dblclick' // 触发编辑的事件类型(默认 click )。 v2.7.0 新增,之前版本固定为单击触发
|
||||
css: [
|
||||
|
@ -55,4 +55,4 @@ layui.use(function(){
|
|||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -9,7 +9,7 @@ layui.use(function(){
|
|||
// 渲染
|
||||
table.render({
|
||||
elem: '#ID-table-demo-filter',
|
||||
url:'/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url:'/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
toolbar: 'default',
|
||||
height: 315,
|
||||
cols: [function(){
|
||||
|
@ -45,4 +45,4 @@ layui.use(function(){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -11,7 +11,7 @@ layui.use(['table', 'dropdown', 'util'], function(){
|
|||
table.render({
|
||||
elem: '#ID-table-onrowContextmenu',
|
||||
defaultContextmenu: false, // 是否在 table 行中允许默认的右键菜单
|
||||
url: '/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: true,
|
||||
cols: [[
|
||||
{field:'id', title:'ID', width:80, fixed: 'left', unresize: true},
|
||||
|
@ -53,4 +53,4 @@ layui.use(['table', 'dropdown', 'util'], function(){
|
|||
obj.setRowChecked({selectedStyle: true}); // 标注行选中状态样式
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -14,7 +14,7 @@ layui.use('table', function(){
|
|||
// 创建渲染实例
|
||||
table.render({
|
||||
elem: '#ID-table-demo-page',
|
||||
url:'/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url:'/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: { // 支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'], //自定义分页布局
|
||||
//curr: 5, //设定初始在第 5 页
|
||||
|
@ -39,4 +39,4 @@ layui.use('table', function(){
|
|||
layer.msg(eventValue);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
> 假设这是一段数据源:<a href="/static/2.8/json/table/demo3.json" target="_blank">/static/2.8/json/table/demo3.json</a><br>
|
||||
> 假设这是一段数据源:<a href="/static/json/2/table/demo3.json" target="_blank">/static/json/2/table/demo3.json</a><br>
|
||||
尽管它并不符合 table 组件默认规定的数据格式([#详见](#options-async-data)),但可以通过 parseData 回调将其进行转换。
|
||||
|
||||
<table class="layui-hide" id="ID-table-demo-parse"></table>
|
||||
|
@ -11,7 +11,7 @@ layui.use('table', function(){
|
|||
// 渲染
|
||||
table.render({
|
||||
elem: '#ID-table-demo-parse',
|
||||
url:'/static/2.8/json/table/demo3.json',
|
||||
url:'/static/json/2/table/demo3.json',
|
||||
page: true,
|
||||
response: {
|
||||
statusCode: 200 // 重新规定成功的状态码为 200,table 组件默认为 0
|
||||
|
|
|
@ -38,7 +38,7 @@ layui.use(function(){
|
|||
// 创建表格实例
|
||||
table.render({
|
||||
elem: '#ID-table-demo-search',
|
||||
url: '/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
cols: [[
|
||||
{type: 'radio', title: '😊', fixed: true}, // 单选框
|
||||
{field:'id', title: 'ID', width:80, sort: true, fixed: true},
|
||||
|
@ -74,4 +74,4 @@ layui.use(function(){
|
|||
return false; // 阻止默认 form 跳转
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -13,7 +13,7 @@ layui.use('table', function(){
|
|||
// 渲染
|
||||
table.render({
|
||||
elem: '#ID-table-demo-setRowChecked',
|
||||
url: '/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: true,
|
||||
cols: [[
|
||||
// {type: 'radio', fixed: 'left'},
|
||||
|
@ -58,4 +58,4 @@ layui.use('table', function(){
|
|||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -27,7 +27,7 @@ layui.use(['table'], function(){
|
|||
// 创建渲染实例
|
||||
table.render({
|
||||
elem: '#ID-table-demo-templet',
|
||||
url:'/static/2.8/json/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url:'/static/json/2/table/user.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
page: true,
|
||||
height: '315px',
|
||||
cols: [[
|
||||
|
@ -60,4 +60,4 @@ layui.use(['table'], function(){
|
|||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
常用两级表头:
|
||||
|
||||
<table class="layui-table" lay-data="{url:'/static/2.8/json/table/demo2.json?v=2', page: true, limit: 6, limits:[6]}" id="ID-table-demo-theads-1">
|
||||
<table class="layui-table" lay-data="{url:'/static/json/2/table/demo2.json?v=2', page: true, limit: 6, limits:[6]}" id="ID-table-demo-theads-1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true}" rowspan="2"></th>
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
更多级表头(支持无限极):
|
||||
|
||||
<table class="layui-table" lay-data="{url:'/static/2.8/json/table/demo2.json?v=3', cellMinWidth: 80, page: true}" id="ID-table-demo-theads-2">
|
||||
<table class="layui-table" lay-data="{url:'/static/json/2/table/demo2.json?v=3', cellMinWidth: 80, page: true}" id="ID-table-demo-theads-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{field:'username', fixed:'left', width:80}" rowspan="3">联系人</th>
|
||||
|
@ -50,4 +50,4 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<!-- import layui -->
|
||||
<!-- import layui -->
|
||||
|
|
|
@ -24,13 +24,13 @@ layui.use(function(){
|
|||
// 渲染
|
||||
var inst = treeTable.render({
|
||||
elem: '#ID-treeTable-demo',
|
||||
url: '/static/2.8/json/treeTable/demo-1.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/treeTable/demo-1.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
tree: {
|
||||
/*
|
||||
// 异步加载子节点
|
||||
async: {
|
||||
enable: true,
|
||||
url: '/static/2.8/json/treeTable/demo-async.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
url: '/static/json/2/treeTable/demo-async.json', // 此处为静态模拟数据,实际使用时需换成真实接口
|
||||
autoParam: ["parentId=id"]
|
||||
}
|
||||
*/
|
||||
|
@ -117,4 +117,4 @@ layui.use(function(){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@ toc: true
|
|||
|
||||
# 更新日志
|
||||
|
||||
<h2 class="layui-hide" lay-toc="{href: '/docs/2.8/versions.html', title: '2.8.x', hot: true}">
|
||||
<h2 class="layui-hide" lay-toc="{href: '/docs/2/versions.html', title: '2.8.x', hot: true}">
|
||||
2.8.x
|
||||
</h2>
|
||||
|
||||
|
@ -488,7 +488,7 @@ toc: true
|
|||
</h2>
|
||||
|
||||
从 `2.8.0-beta.1` 到 `rc.16`,经二十个预览版的持续迭代,Layui 终于迎来了:`2.8.0` 正式版。
|
||||
<br>同时,新域名下的 [新文档站](https://layui.dev) 也正式上线(导读:[Layui 新版文档站上线初衷](./@note/2.8/news.html)),新版文档亦开源在 [Github](https://github.com/layui/layui/tree/main/docs) 以供协同维护。
|
||||
<br>同时,新域名下的 [新文档站](https://layui.dev) 也正式上线(导读:[Layui 新版文档站上线初衷](/notes/2.8/news.html)),新版文档亦开源在 [Github](https://github.com/layui/layui/tree/main/docs) 以供协同维护。
|
||||
|
||||
正是开发者们依然坚持的热爱,促使了 `Layui` 这一朴实的归来。
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<button class="layui-btn" lay-on="test9">Photo</button>
|
||||
<button class="layui-btn" lay-on="test10">Drawer</button>
|
||||
<button class="layui-btn" lay-on="testTime">自动关闭</button>
|
||||
<a href="https://layui.dev/docs/2.8/layer/" target="_blank" class="layui-btn">更多例子</a>
|
||||
<a href="https://layui.dev/docs/2/layer/" target="_blank" class="layui-btn">更多例子</a>
|
||||
</div>
|
||||
|
||||
<div id="test11111" style="display: none; padding: 16px;">
|
||||
|
|
Loading…
Reference in New Issue