Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
啊嘞嘞EC
vue-vben-admin
提交
5d51d487
V
vue-vben-admin
项目概览
啊嘞嘞EC
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5d51d487
编写于
1月 19, 2021
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(api-select): added numberToString prop #200
上级
b45f8c50
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
16 addition
and
2 deletion
+16
-2
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+12
-0
src/components/Form/src/components/ApiSelect.vue
src/components/Form/src/components/ApiSelect.vue
+4
-2
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
5d51d487
## Wip
### ✨ Features
-
`ApiSelect`
新增
`numberToString`
属性,用于将 value 为
`number`
的值全部转化为
`string`
### 🐛 Bug Fixes
-
修复 modal 高度计算错误
-
修复菜单折叠状态下点击标签页弹出菜单
-
修复 form 表单初始化值为 0 问题
## 2.0.0-rc.17 (2020-01-18)
### ✨ Refactor
...
...
src/components/Form/src/components/ApiSelect.vue
浏览文件 @
5d51d487
...
...
@@ -36,6 +36,7 @@
},
props
:
{
value
:
propTypes
.
string
,
numberToString
:
propTypes
.
bool
,
api
:
{
type
:
Function
as
PropType
<
(
arg
?:
Recordable
)
=>
Promise
<
OptionsItem
[]
>>
,
default
:
null
,
...
...
@@ -61,13 +62,14 @@
const
[
state
]
=
useRuleFormItem
(
props
);
const
getOptions
=
computed
(()
=>
{
const
{
labelField
,
valueField
}
=
props
;
const
{
labelField
,
valueField
,
numberToString
}
=
props
;
return
unref
(
options
).
reduce
((
prev
,
next
:
Recordable
)
=>
{
if
(
next
)
{
const
value
=
next
[
valueField
];
prev
.
push
({
label
:
next
[
labelField
],
value
:
n
ext
[
valueField
]
,
value
:
n
umberToString
?
`
${
value
}
`
:
value
,
});
}
return
prev
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录