Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
84473311
Unverified
提交
84473311
authored
10月 20, 2021
作者:
Joyboo
提交者:
GitHub
10月 20, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: table size放到settings (#1294)
上级
787bc462
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
3 行删除
+19
-3
BasicTable.vue
src/components/Table/src/BasicTable.vue
+0
-1
const.ts
src/components/Table/src/const.ts
+11
-1
props.ts
src/components/Table/src/props.ts
+6
-1
componentSetting.ts
src/settings/componentSetting.ts
+2
-0
没有找到文件。
src/components/Table/src/BasicTable.vue
浏览文件 @
84473311
...
@@ -222,7 +222,6 @@
...
@@ -222,7 +222,6 @@
const
getBindValues
=
computed
(()
=>
{
const
getBindValues
=
computed
(()
=>
{
const
dataSource
=
unref
(
getDataSourceRef
);
const
dataSource
=
unref
(
getDataSourceRef
);
let
propsData
:
Recordable
=
{
let
propsData
:
Recordable
=
{
size
:
'middle'
,
// ...(dataSource.length === 0 ? { getPopupContainer: () => document.body } : {}),
// ...(dataSource.length === 0 ? { getPopupContainer: () => document.body } : {}),
...
attrs
,
...
attrs
,
customRow
,
customRow
,
...
...
src/components/Table/src/const.ts
浏览文件 @
84473311
...
@@ -2,7 +2,14 @@ import componentSetting from '/@/settings/componentSetting';
...
@@ -2,7 +2,14 @@ import componentSetting from '/@/settings/componentSetting';
const
{
table
}
=
componentSetting
;
const
{
table
}
=
componentSetting
;
const
{
pageSizeOptions
,
defaultPageSize
,
fetchSetting
,
defaultSortFn
,
defaultFilterFn
}
=
table
;
const
{
pageSizeOptions
,
defaultPageSize
,
fetchSetting
,
defaultSize
,
defaultSortFn
,
defaultFilterFn
,
}
=
table
;
export
const
ROW_KEY
=
'key'
;
export
const
ROW_KEY
=
'key'
;
...
@@ -15,6 +22,9 @@ export const PAGE_SIZE = defaultPageSize;
...
@@ -15,6 +22,9 @@ export const PAGE_SIZE = defaultPageSize;
// Common interface field settings
// Common interface field settings
export
const
FETCH_SETTING
=
fetchSetting
;
export
const
FETCH_SETTING
=
fetchSetting
;
// Default Size
export
const
DEFAULT_SIZE
=
defaultSize
;
// Configure general sort function
// Configure general sort function
export
const
DEFAULT_SORT_FN
=
defaultSortFn
;
export
const
DEFAULT_SORT_FN
=
defaultSortFn
;
...
...
src/components/Table/src/props.ts
浏览文件 @
84473311
...
@@ -7,9 +7,10 @@ import type {
...
@@ -7,9 +7,10 @@ import type {
SorterResult
,
SorterResult
,
TableCustomRecord
,
TableCustomRecord
,
TableRowSelection
,
TableRowSelection
,
SizeType
,
}
from
'./types/table'
;
}
from
'./types/table'
;
import
type
{
FormProps
}
from
'/@/components/Form'
;
import
type
{
FormProps
}
from
'/@/components/Form'
;
import
{
DEFAULT_FILTER_FN
,
DEFAULT_SORT_FN
,
FETCH_SETTING
}
from
'./const'
;
import
{
DEFAULT_FILTER_FN
,
DEFAULT_SORT_FN
,
FETCH_SETTING
,
DEFAULT_SIZE
}
from
'./const'
;
import
{
propTypes
}
from
'/@/utils/propTypes'
;
import
{
propTypes
}
from
'/@/utils/propTypes'
;
export
const
basicProps
=
{
export
const
basicProps
=
{
...
@@ -141,4 +142,8 @@ export const basicProps = {
...
@@ -141,4 +142,8 @@ export const basicProps = {
})
=>
Promise
<
any
>
})
=>
Promise
<
any
>
>
,
>
,
},
},
size
:
{
type
:
String
as
PropType
<
SizeType
>
,
default
:
DEFAULT_SIZE
,
},
};
};
src/settings/componentSetting.ts
浏览文件 @
84473311
...
@@ -21,6 +21,8 @@ export default {
...
@@ -21,6 +21,8 @@ export default {
pageSizeOptions
:
[
'10'
,
'50'
,
'80'
,
'100'
],
pageSizeOptions
:
[
'10'
,
'50'
,
'80'
,
'100'
],
// Default display quantity on one page
// Default display quantity on one page
defaultPageSize
:
10
,
defaultPageSize
:
10
,
// Default Size
defaultSize
:
'middle'
,
// Custom general sort function
// Custom general sort function
defaultSortFn
:
(
sortInfo
:
SorterResult
)
=>
{
defaultSortFn
:
(
sortInfo
:
SorterResult
)
=>
{
const
{
field
,
order
}
=
sortInfo
;
const
{
field
,
order
}
=
sortInfo
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论