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
b5046f07
Commit
b5046f07
authored
Jul 01, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(form): fix some prop declaration
修复`submitButtonOptions`、'resetButtonOptions'的类型定义
parent
ddf116da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
24 deletions
+28
-24
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
index.ts
src/components/Button/index.ts
+3
-0
BasicButton.vue
src/components/Button/src/BasicButton.vue
+2
-21
props.ts
src/components/Button/src/props.ts
+19
-0
FormAction.vue
src/components/Form/src/components/FormAction.vue
+2
-2
form.ts
src/components/Form/src/types/form.ts
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
b5046f07
...
...
@@ -18,6 +18,7 @@
-
修复
`ROLE`
权限模式下
`hasPermission`
不工作的问题
-
**Table**
修复启用
`clickToRowSelect`
时,点击行不会触发
`selection-change`
事件的问题
-
**Table**
修复全局配置
`fetchSetting`
可能会被局部配置意外修改的问题
-
**Form**
修复
`submitButtonOptions`
和
`resetButtonOptions`
的类型定义
## 2.5.2(2021-06-27)
...
...
src/components/Button/index.ts
View file @
b5046f07
import
{
withInstall
}
from
'
/@/utils
'
;
import
type
{
ExtractPropTypes
}
from
'
vue
'
;
import
button
from
'
./src/BasicButton.vue
'
;
import
popConfirmButton
from
'
./src/PopConfirmButton.vue
'
;
import
{
buttonProps
}
from
'
./src/props
'
;
export
const
Button
=
withInstall
(
button
);
export
const
PopConfirmButton
=
withInstall
(
popConfirmButton
);
export
declare
type
ButtonProps
=
Partial
<
ExtractPropTypes
<
typeof
buttonProps
>>
;
src/components/Button/src/BasicButton.vue
View file @
b5046f07
...
...
@@ -11,32 +11,13 @@
import
{
defineComponent
,
computed
}
from
'
vue
'
;
import
{
Button
}
from
'
ant-design-vue
'
;
import
{
Icon
}
from
'
/@/components/Icon
'
;
const
props
=
{
color
:
{
type
:
String
,
validator
:
(
v
)
=>
[
'
error
'
,
'
warning
'
,
'
success
'
,
''
].
includes
(
v
)
},
loading
:
{
type
:
Boolean
},
disabled
:
{
type
:
Boolean
},
/**
* Text before icon.
*/
preIcon
:
{
type
:
String
},
/**
* Text after icon.
*/
postIcon
:
{
type
:
String
},
/**
* preIcon and postIcon icon size.
* @default: 14
*/
iconSize
:
{
type
:
Number
,
default
:
14
},
onClick
:
{
type
:
Function
as
PropType
<
(...
args
)
=>
any
>
,
default
:
null
},
};
import
{
buttonProps
}
from
'
./props
'
;
export
default
defineComponent
({
name
:
'
AButton
'
,
components
:
{
Button
,
Icon
},
inheritAttrs
:
false
,
props
,
props
:
buttonProps
,
setup
(
props
,
{
attrs
})
{
// get component class
const
getButtonClass
=
computed
(()
=>
{
...
...
src/components/Button/src/props.ts
0 → 100644
View file @
b5046f07
export
const
buttonProps
=
{
color
:
{
type
:
String
,
validator
:
(
v
)
=>
[
'
error
'
,
'
warning
'
,
'
success
'
,
''
].
includes
(
v
)
},
loading
:
{
type
:
Boolean
},
disabled
:
{
type
:
Boolean
},
/**
* Text before icon.
*/
preIcon
:
{
type
:
String
},
/**
* Text after icon.
*/
postIcon
:
{
type
:
String
},
/**
* preIcon and postIcon icon size.
* @default: 14
*/
iconSize
:
{
type
:
Number
,
default
:
14
},
onClick
:
{
type
:
Function
as
PropType
<
(...
args
)
=>
any
>
,
default
:
null
},
};
src/components/Form/src/components/FormAction.vue
View file @
b5046f07
...
...
@@ -39,10 +39,10 @@
</
template
>
<
script
lang=
"ts"
>
import
type
{
ColEx
}
from
'
../types/index
'
;
import
type
{
ButtonProps
}
from
'
ant-design-vue/es/button/buttonTypes
'
;
//
import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes';
import
{
defineComponent
,
computed
,
PropType
}
from
'
vue
'
;
import
{
Form
,
Col
}
from
'
ant-design-vue
'
;
import
{
Button
}
from
'
/@/components/Button
'
;
import
{
Button
,
ButtonProps
}
from
'
/@/components/Button
'
;
import
{
BasicArrow
}
from
'
/@/components/Basic/index
'
;
import
{
useFormContext
}
from
'
../hooks/useFormContext
'
;
import
{
useI18n
}
from
'
/@/hooks/web/useI18n
'
;
...
...
src/components/Form/src/types/form.ts
View file @
b5046f07
import
type
{
NamePath
,
RuleObject
}
from
'
ant-design-vue/lib/form/interface
'
;
import
type
{
VNode
}
from
'
vue
'
;
import
type
{
ButtonProps
as
AntdButtonProps
}
from
'
ant-design-vue/es/button/buttonTypes
'
;
import
type
{
ButtonProps
as
AntdButtonProps
}
from
'
/@/components/Button
'
;
import
type
{
FormItem
}
from
'
./formItem
'
;
import
type
{
ColEx
,
ComponentType
}
from
'
./index
'
;
import
type
{
TableActionType
}
from
'
/@/components/Table/src/types/table
'
;
...
...
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