Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
38f50726
提交
38f50726
authored
4月 19, 2021
作者:
Vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(form): remove field binding when deleting schema #471
上级
b92b8a3c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
8 行增加
和
12 行删除
+8
-12
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
index.ts
build/vite/plugin/index.ts
+2
-2
useForm.ts
src/components/Form/src/hooks/useForm.ts
+1
-2
useFormEvents.ts
src/components/Form/src/hooks/useFormEvents.ts
+4
-1
README.md
src/components/Icon/README.md
+0
-7
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
38f50726
...
...
@@ -14,6 +14,7 @@
-
修复黑暗主题刷新闪烁的白屏
-
修复标签页关闭其他功能失效问题
-
修复表单已知问题
## 2.3.0 (2021-04-10)
...
...
build/vite/plugin/index.ts
浏览文件 @
38f50726
...
...
@@ -16,7 +16,7 @@ import { configThemePlugin } from './theme';
import
{
configImageminPlugin
}
from
'./imagemin'
;
import
{
configWindiCssPlugin
}
from
'./windicss'
;
import
{
configSvgIconsPlugin
}
from
'./svgSprite'
;
//
import { configHmrPlugin } from './hmr';
import
{
configHmrPlugin
}
from
'./hmr'
;
export
function
createVitePlugins
(
viteEnv
:
ViteEnv
,
isBuild
:
boolean
)
{
const
{
...
...
@@ -35,7 +35,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
];
// TODO
//
!isBuild && vitePlugins.push(configHmrPlugin());
!
isBuild
&&
vitePlugins
.
push
(
configHmrPlugin
());
// @vitejs/plugin-legacy
VITE_LEGACY
&&
isBuild
&&
vitePlugins
.
push
(
legacy
());
...
...
src/components/Form/src/hooks/useForm.ts
浏览文件 @
38f50726
...
...
@@ -77,8 +77,7 @@ export function useForm(props?: Props): UseFormReturnType {
},
removeSchemaByFiled
:
async
(
field
:
string
|
string
[])
=>
{
const
form
=
await
getForm
();
form
.
removeSchemaByFiled
(
field
);
unref
(
formRef
)?.
removeSchemaByFiled
(
field
);
},
// TODO promisify
...
...
src/components/Form/src/hooks/useFormEvents.ts
浏览文件 @
38f50726
...
...
@@ -88,7 +88,9 @@ export function useFormEvents({
*/
async
function
removeSchemaByFiled
(
fields
:
string
|
string
[]):
Promise
<
void
>
{
const
schemaList
:
FormSchema
[]
=
cloneDeep
(
unref
(
getSchema
));
if
(
!
fields
)
return
;
if
(
!
fields
)
{
return
;
}
let
fieldList
:
string
[]
=
isString
(
fields
)
?
[
fields
]
:
fields
;
if
(
isString
(
fields
))
{
...
...
@@ -107,6 +109,7 @@ export function useFormEvents({
if
(
isString
(
field
))
{
const
index
=
schemaList
.
findIndex
((
schema
)
=>
schema
.
field
===
field
);
if
(
index
!==
-
1
)
{
delete
formModel
[
field
];
schemaList
.
splice
(
index
,
1
);
}
}
...
...
src/components/Icon/README.md
deleted
100644 → 0
浏览文件 @
b92b8a3c
### `Icon.vue`
```
html
<Icon
icon=
"mdi:account"
/>
```
The icon id follows the rules in
[
Iconify
](
https://iconify.design/
)
which you can use any icons from the supported icon sets.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论