Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
5a6db8c6
Commit
5a6db8c6
authored
Oct 20, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(table): fix table actionColOptions not work
parent
f96d6b22
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
BasicForm.vue
src/components/Form/src/BasicForm.vue
+5
-1
FormAction.tsx
src/components/Form/src/FormAction.tsx
+1
-1
form.ts
src/components/Form/src/types/form.ts
+10
-10
table.ts
src/components/Table/src/types/table.ts
+1
-1
No files found.
src/components/Form/src/BasicForm.vue
View file @
5a6db8c6
...
...
@@ -207,7 +207,11 @@
}
}
advanceState
.
actionSpan
=
(
realItemColSum
%
BASIC_COL_LEN
)
+
unref
(
getEmptySpanRef
);
getAdvanced
(
props
.
actionColOptions
||
{
span
:
BASIC_COL_LEN
},
itemColSum
,
true
);
getAdvanced
(
unref
(
getActionPropsRef
).
actionColOptions
||
{
span
:
BASIC_COL_LEN
},
itemColSum
,
true
);
emit
(
'
advanced-change
'
);
}
function
getAdvanced
(
itemCol
:
Partial
<
ColEx
>
,
itemColSum
=
0
,
isLastAction
=
false
)
{
...
...
src/components/Form/src/FormAction.tsx
View file @
5a6db8c6
...
...
@@ -71,8 +71,8 @@ export default defineComponent({
const
advancedSpanObj
=
showAdvancedButton
?
{
span
:
actionSpan
<
6
?
24
:
actionSpan
}
:
{};
const
actionColOpt
:
Partial
<
ColEx
>
=
{
span
:
showAdvancedButton
?
6
:
4
,
...
actionColOptions
,
...
advancedSpanObj
,
...
actionColOptions
,
};
return
actionColOpt
;
});
...
...
src/components/Form/src/types/form.ts
View file @
5a6db8c6
...
...
@@ -48,7 +48,7 @@ export interface FormProps {
// 空白行span
emptySpan
?:
number
|
Partial
<
ColEx
>
;
// 表单内部组件大小
size
:
'
default
'
|
'
small
'
|
'
large
'
;
size
?
:
'
default
'
|
'
small
'
|
'
large
'
;
// 是否禁用
disabled
?:
boolean
;
// 时间区间字段映射成多个
...
...
@@ -62,25 +62,25 @@ export interface FormProps {
// 超过指定行数自动收起
autoAdvancedLine
?:
number
;
// 是否显示操作按钮
showActionButtonGroup
:
boolean
;
showActionButtonGroup
?
:
boolean
;
// 重置按钮配置
resetButtonOptions
:
Partial
<
BasicButtonProps
>
;
resetButtonOptions
?
:
Partial
<
BasicButtonProps
>
;
// 确认按钮配置
submitButtonOptions
:
Partial
<
BasicButtonProps
>
;
submitButtonOptions
?
:
Partial
<
BasicButtonProps
>
;
// 操作列配置
actionColOptions
:
Partial
<
ColEx
>
;
actionColOptions
?
:
Partial
<
ColEx
>
;
// 显示重置按钮
showResetButton
:
boolean
;
showResetButton
?
:
boolean
;
// 显示确认按钮
showSubmitButton
:
boolean
;
showSubmitButton
?
:
boolean
;
resetFunc
:
()
=>
Promise
<
void
>
;
submitFunc
:
()
=>
Promise
<
void
>
;
transformDateFunc
:
(
date
:
any
)
=>
string
;
resetFunc
?
:
()
=>
Promise
<
void
>
;
submitFunc
?
:
()
=>
Promise
<
void
>
;
transformDateFunc
?
:
(
date
:
any
)
=>
string
;
colon
?:
boolean
;
}
export
interface
FormSchema
{
...
...
src/components/Table/src/types/table.ts
View file @
5a6db8c6
...
...
@@ -94,7 +94,7 @@ export interface BasicTableProps<T = any> {
// 使用搜索表单
useSearchForm
?:
boolean
;
// 表单配置
formConfig
?:
FormProps
;
formConfig
?:
Partial
<
FormProps
>
;
// 列配置
columns
:
BasicColumn
[];
// 是否显示序号列
...
...
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