Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f3622d42
authored
Jun 21, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 使 Table 组件支持列宽和固定列配置
parent
5064845d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/hooks/web/useCrudSchemas.ts
+5
-2
src/types/table.d.ts
+2
-0
No files found.
src/hooks/web/useCrudSchemas.ts
View file @
f3622d42
import
{
reactive
}
from
'vue'
import
{
AxiosPromise
}
from
'axios'
import
{
findIndex
}
from
'@/utils'
import
{
eachTree
,
treeMap
,
filter
}
from
'@/utils/tree'
import
{
eachTree
,
filter
,
treeMap
}
from
'@/utils/tree'
import
{
getBoolDictOptions
,
getDictOptions
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
FormSchema
}
from
'@/types/form'
...
...
@@ -36,8 +36,11 @@ type CrudSearchParams = {
type
CrudTableParams
=
{
// 是否显示表头
show
?:
boolean
// 列宽配置
width
?:
number
|
string
// 列是否固定在左侧或者右侧
fixed
?:
'left'
|
'right'
}
&
Omit
<
FormSchema
,
'field'
>
type
CrudFormParams
=
{
// 是否显示表单项
show
?:
boolean
...
...
src/types/table.d.ts
View file @
f3622d42
export
type
TableColumn
=
{
field
:
string
label
?:
string
width
?:
number
|
string
fixed
?:
'left'
|
'right'
children
?:
TableColumn
[]
}
&
Recordable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment