Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
沐夕花开
n-table示例
提交
95846241
N
n-table示例
项目概览
沐夕花开
/
n-table示例
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
n-table示例
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
95846241
编写于
4月 07, 2022
作者:
1
18820034114
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove console
上级
e4caf126
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
27 deletion
+8
-27
pages/index/index.vue
pages/index/index.vue
+2
-2
uni_modules/n-table/components/n-table/n-table.vue
uni_modules/n-table/components/n-table/n-table.vue
+5
-25
uni_modules/n-table/components/n-table/utils.js
uni_modules/n-table/components/n-table/utils.js
+1
-0
未找到文件。
pages/index/index.vue
浏览文件 @
95846241
...
...
@@ -18,7 +18,7 @@
:headerOpt=
"headerOpt"
:nameOpt=
"
{isShow:true, title: '基础表格+固定高度+不固定左侧', needMenu: false, bg: 'green'}"
:tableOpt="{stickSide:false}"
:tableHeight="
40
0"
:tableHeight="0"
:tableData="tableData"
:columns="columns"
colKey="dataIndex"
...
...
@@ -30,7 +30,7 @@
:headerOpt=
"headerOpt"
:nameOpt=
"
{isShow:true, title: '树形表格+固定高度'}"
:tableOpt="{}"
:tableHeight="
40
0"
:tableHeight="0"
:tableData="tableDataTree"
:columns="columns"
colKey="dataIndex"
...
...
uni_modules/n-table/components/n-table/n-table.vue
浏览文件 @
95846241
...
...
@@ -36,7 +36,6 @@
@
onClick=
"onColClick"
:dataList=
"dataList"
>
</table-body>
</view>
</view>
<view
v-if=
"dataList && dataList.length == 0 && !tableLoaded"
class=
"table-empty"
>
...
...
@@ -73,29 +72,13 @@
},
props
:
{
// table-name 配置
nameOpt
:
{
type
:
Object
,
default
:
()
=>
{}
},
nameOpt
:
{
type
:
Object
,
default
:
()
=>
{}},
// 表头配置
headerOpt
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
headerOpt
:
{
type
:
Object
,
default
:
()
=>
{
return
{}}},
// 整体配置
tableOpt
:
{
type
:
Object
,
default
:
()
=>
{}
},
tableOpt
:
{
type
:
Object
,
default
:
()
=>
{}},
// 分页配置
pagerOpt
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
pagerOpt
:
{
type
:
Object
,
default
:
()
=>
{
return
{}}},
// 数据源唯一key字段名
idKey
:
{
type
:
String
,
default
:
'
id
'
},
// columns中对应列表数据的 字段名
...
...
@@ -103,10 +86,7 @@
// 数据源
tableData
:
{
type
:
[
Array
,
Boolean
],
default
()
{
return
false
}
},
columns
:
{
type
:
[
Array
,
Boolean
],
required
:
true
},
columns
:
{
type
:
[
Array
,
Boolean
],
required
:
true
},
showLoading
:
{
type
:
Boolean
,
default
:
true
},
tableHeight
:
{
type
:
[
Number
,
Boolean
],
default
:
0
},
// 是否需要组件内部排序
...
...
uni_modules/n-table/components/n-table/utils.js
浏览文件 @
95846241
...
...
@@ -44,6 +44,7 @@ const sortList = function({ list, sortBy, sortOrder, child = "children" }) {
});
return
[...
list
];
};
export
{
sortList
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录