Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
球球不吃虾
vue-vben-admin
提交
84b8302c
V
vue-vben-admin
项目概览
球球不吃虾
/
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,体验更适合开发者的 AI 搜索 >>
提交
84b8302c
编写于
11月 01, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(table): fix table search criteria collapse failure
上级
da4aea13
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
57 addition
and
51 deletion
+57
-51
src/components/Form/src/BasicForm.vue
src/components/Form/src/BasicForm.vue
+4
-3
src/components/Form/src/FormAction.tsx
src/components/Form/src/FormAction.tsx
+6
-8
src/components/Form/src/FormItem.tsx
src/components/Form/src/FormItem.tsx
+22
-22
src/components/Form/src/hooks/useAdvanced.ts
src/components/Form/src/hooks/useAdvanced.ts
+3
-1
src/components/Menu/src/BasicMenu.tsx
src/components/Menu/src/BasicMenu.tsx
+3
-3
src/components/Table/src/BasicTable.vue
src/components/Table/src/BasicTable.vue
+6
-6
src/layouts/default/LayoutHeader.tsx
src/layouts/default/LayoutHeader.tsx
+1
-0
src/layouts/default/actions/notice/NoticeActionItem.vue
src/layouts/default/actions/notice/NoticeActionItem.vue
+2
-2
src/views/sys/login/Login.vue
src/views/sys/login/Login.vue
+10
-6
未找到文件。
src/components/Form/src/BasicForm.vue
浏览文件 @
84b8302c
...
...
@@ -24,9 +24,9 @@
</template>
<
script
lang=
"ts"
>
import
type
{
FormActionType
,
FormProps
,
FormSchema
}
from
'
./types/form
'
;
import
type
{
Form
as
FormType
,
ValidateFields
}
from
'
ant-design-vue/types/form/form
'
;
import
type
{
AdvanceState
}
from
'
./types/hooks
'
;
import
type
{
Ref
}
from
'
vue
'
;
import
type
{
ValidateFields
}
from
'
ant-design-vue/lib/form/interface
'
;
import
{
defineComponent
,
...
...
@@ -41,12 +41,13 @@
import
{
Form
,
Row
}
from
'
ant-design-vue
'
;
import
FormItem
from
'
./FormItem
'
;
import
{
basicProps
}
from
'
./props
'
;
import
{
deepMerge
}
from
'
/@/utils
'
;
import
FormAction
from
'
./FormAction
'
;
import
{
dateItemType
}
from
'
./helper
'
;
import
moment
from
'
moment
'
;
import
{
cloneDeep
}
from
'
lodash-es
'
;
import
{
deepMerge
}
from
'
/@/utils
'
;
import
{
useFormValues
}
from
'
./hooks/useFormValues
'
;
import
useAdvanced
from
'
./hooks/useAdvanced
'
;
import
{
useFormAction
}
from
'
./hooks/useFormAction
'
;
...
...
@@ -75,7 +76,7 @@
const
defaultValueRef
=
ref
<
any
>
({});
const
propsRef
=
ref
<
Partial
<
FormProps
>>
({});
const
schemaRef
=
ref
<
FormSchema
[]
|
null
>
(
null
);
const
formElRef
=
ref
<
Nullable
<
FormType
>>
(
null
);
const
formElRef
=
ref
<
Nullable
<
Form
Action
Type
>>
(
null
);
const
getMergePropsRef
=
computed
(
():
FormProps
=>
{
...
...
src/components/Form/src/FormAction.tsx
浏览文件 @
84b8302c
import
type
{
ColEx
}
from
'
./types/index
'
;
import
{
defineComponent
,
unref
,
computed
,
PropType
}
from
'
vue
'
;
import
{
Form
,
Col
}
from
'
ant-design-vue
'
;
import
type
{
ColEx
}
from
'
./types/index
'
;
import
{
getSlot
}
from
'
/@/utils/helper/tsxHelper
'
;
import
Button
from
'
/@/components/Button/index.vue
'
;
import
{
UpOutlined
,
DownOutlined
}
from
'
@ant-design/icons-vue
'
;
import
{
BasicArrow
}
from
'
/@/components/Basic/index
'
;
import
{
getSlot
}
from
'
/@/utils/helper/tsxHelper
'
;
export
default
defineComponent
({
name
:
'
BasicFormAction
'
,
...
...
@@ -107,11 +109,7 @@ export default defineComponent({
{
()
=>
(
<>
{
isAdvanced
?
'
收起
'
:
'
展开
'
}
{
isAdvanced
?
(
<
UpOutlined
class
=
"advanced-icon"
/>
)
:
(
<
DownOutlined
class
=
"advanced-icon"
/>
)
}
<
BasicArrow
expand
=
{
!
isAdvanced
}
/>
</>
)
}
</
Button
>
...
...
src/components/Form/src/FormItem.tsx
浏览文件 @
84b8302c
import
type
{
ValidationRule
}
from
'
ant-design-vue/types/form/form
'
;
import
type
{
PropType
}
from
'
vue
'
;
import
type
{
FormProps
}
from
'
./types/form
'
;
import
type
{
FormSchema
}
from
'
./types/form
'
;
import
type
{
ValidationRule
}
from
'
ant-design-vue/lib/form/Form
'
;
import
{
defineComponent
,
computed
,
unref
,
toRef
}
from
'
vue
'
;
import
{
Form
,
Col
}
from
'
ant-design-vue
'
;
...
...
@@ -54,10 +54,25 @@ export default defineComponent({
};
});
const
getShowRef
=
computed
(()
=>
{
const
{
show
,
ifShow
,
isAdvanced
}
=
props
.
schema
;
const
getDisableRef
=
computed
(()
=>
{
const
{
disabled
:
globDisabled
}
=
props
.
formProps
;
const
{
dynamicDisabled
}
=
props
.
schema
;
let
disabled
=
!!
globDisabled
;
if
(
isBoolean
(
dynamicDisabled
))
{
disabled
=
dynamicDisabled
;
}
if
(
isFunction
(
dynamicDisabled
))
{
disabled
=
dynamicDisabled
(
unref
(
getValuesRef
));
}
return
disabled
;
});
function
getShow
()
{
const
{
show
,
ifShow
}
=
props
.
schema
;
const
{
showAdvancedButton
}
=
props
.
formProps
;
const
itemIsAdvanced
=
showAdvancedButton
?
!!
isAdvanced
:
true
;
const
itemIsAdvanced
=
showAdvancedButton
?
!!
props
.
schema
.
isAdvanced
:
true
;
let
isShow
=
true
;
let
isIfShow
=
true
;
...
...
@@ -75,22 +90,7 @@ export default defineComponent({
}
isShow
=
isShow
&&
itemIsAdvanced
;
return
{
isShow
,
isIfShow
};
});
const
getDisableRef
=
computed
(()
=>
{
const
{
disabled
:
globDisabled
}
=
props
.
formProps
;
const
{
dynamicDisabled
}
=
props
.
schema
;
let
disabled
=
!!
globDisabled
;
if
(
isBoolean
(
dynamicDisabled
))
{
disabled
=
dynamicDisabled
;
}
if
(
isFunction
(
dynamicDisabled
))
{
disabled
=
dynamicDisabled
(
unref
(
getValuesRef
));
}
return
disabled
;
});
}
function
handleRules
():
ValidationRule
[]
{
const
{
...
...
@@ -246,7 +246,7 @@ export default defineComponent({
<
Form
.
Item
name
=
{
field
}
colon
=
{
colon
}
{
...
itemProps
}
{
...
(
itemProps
as
any
)
}
label
=
{
renderLabelHelpMessage
()
}
rules
=
{
handleRules
()
}
labelCol
=
{
labelCol
}
...
...
@@ -261,7 +261,7 @@ export default defineComponent({
if
(
!
componentMap
.
has
(
component
))
return
null
;
const
{
baseColProps
=
{}
}
=
props
.
formProps
;
const
realColProps
=
{
...
baseColProps
,
...
colProps
};
const
{
isIfShow
,
isShow
}
=
unref
(
getShowRef
);
const
{
isIfShow
,
isShow
}
=
getShow
(
);
const
getContent
=
()
=>
{
return
colSlot
?
getSlot
(
slots
,
colSlot
)
...
...
src/components/Form/src/hooks/useAdvanced.ts
浏览文件 @
84b8302c
import
type
{
ColEx
}
from
'
../types
'
;
import
type
{
AdvanceState
}
from
'
../types/hooks
'
;
import
type
{
ComputedRef
,
Ref
}
from
'
vue
'
;
import
{
ComputedRef
,
Ref
}
from
'
vue
'
;
import
type
{
FormProps
,
FormSchema
}
from
'
../types/form
'
;
import
{
computed
,
unref
,
watch
}
from
'
vue
'
;
...
...
@@ -69,6 +69,7 @@ export default function ({
actionColOptions
,
};
});
watch
(
[()
=>
unref
(
getSchema
),
()
=>
advanceState
.
isAdvanced
,
()
=>
unref
(
realWidthRef
)],
()
=>
{
...
...
@@ -169,6 +170,7 @@ export default function ({
itemColSum
,
true
);
emit
(
'
advanced-change
'
);
}
...
...
src/components/Menu/src/BasicMenu.tsx
浏览文件 @
84b8302c
...
...
@@ -60,13 +60,13 @@ export default defineComponent({
const
{
showLogo
,
search
}
=
props
;
let
offset
=
0
;
if
(
search
)
{
offset
+=
60
;
offset
+=
54
;
}
if
(
showLogo
)
{
offset
+=
54
;
offset
+=
46
;
}
return
{
height
:
`calc(100% -
${
offset
-
38
}
px)`
,
height
:
`calc(100% -
${
offset
-
10
}
px)`
,
position
:
'
relative
'
,
overflow
:
'
auto
'
,
};
...
...
src/components/Table/src/BasicTable.vue
浏览文件 @
84b8302c
...
...
@@ -21,11 +21,9 @@
</BasicForm>
<Table
ref=
"tableElRef"
v-bind=
"getBindValues"
:rowClassName=
"getRowClassName"
:class=
"{
hidden: !getEmptyDataIsShowTable,
}"
v-bind=
"getBindValues"
v-show=
"getEmptyDataIsShowTable"
@
change=
"handleTableChange"
>
<
template
#[item]=
"data"
v-for=
"item in Object.keys($slots)"
>
...
...
@@ -44,6 +42,8 @@
GetColumnsParams
,
TableActionType
,
SizeType
,
SorterResult
,
TableCustomRecord
,
}
from
'
./types/table
'
;
import
{
isFunction
,
isString
}
from
'
/@/utils/is
'
;
...
...
@@ -64,7 +64,6 @@
import
{
ROW_KEY
}
from
'
./const
'
;
import
{
PaginationProps
}
from
'
./types/pagination
'
;
import
{
deepMerge
}
from
'
/@/utils
'
;
import
{
SorterResult
,
TableCustomRecord
}
from
'
ant-design-vue/types/table/table
'
;
import
{
useEvent
}
from
'
/@/hooks/event/useEvent
'
;
import
'
./style/index.less
'
;
...
...
@@ -199,7 +198,7 @@
{
immediate
:
true
}
);
function
getRowClassName
(
record
:
TableCustomRecord
<
any
>
,
index
:
number
)
{
function
getRowClassName
(
record
:
TableCustomRecord
,
index
:
number
)
{
const
{
striped
,
rowClassName
}
=
unref
(
getMergeProps
);
if
(
!
striped
)
return
;
if
(
rowClassName
&&
isFunction
(
rowClassName
))
{
...
...
@@ -218,6 +217,7 @@
function
handleTableChange
(
pagination
:
PaginationProps
,
// @ts-ignore
filters
:
Partial
<
Record
<
string
,
string
[]
>>
,
sorter
:
SorterResult
<
any
>
)
{
...
...
src/layouts/default/LayoutHeader.tsx
浏览文件 @
84b8302c
...
...
@@ -145,6 +145,7 @@ export default defineComponent({
<
Badge
count
=
{
errorStore
.
getErrorListCountState
}
offset
=
{
[
0
,
10
]
}
dot
overflowCount
=
{
99
}
>
{
()
=>
(
...
...
src/layouts/default/actions/notice/NoticeActionItem.vue
浏览文件 @
84b8302c
<
template
>
<div
class=
"layout-header__action-item notify-action"
>
<Popover
title=
""
trigger=
"click"
>
<Badge
:count=
"count"
:numberStyle=
"numberStyle"
>
<Badge
:count=
"count"
dot
:numberStyle=
"numberStyle"
>
<BellOutlined
class=
"layout-header__action-icon"
/>
</Badge>
<template
#content
>
...
...
@@ -56,7 +56,7 @@
.ant-badge-multiple-words {
padding: 0 4px;
transform: translate(26%, -40%);
//
transform: translate(26%, -40%);
}
svg {
...
...
src/views/sys/login/Login.vue
浏览文件 @
84b8302c
...
...
@@ -134,16 +134,17 @@
display: none;
height: 100%;
background: url(../../../assets/images/login/login-in.png) no-repeat;
background-size: 100% 100%;
background-position: 50% 30%;
background-size: 80% 80%;
.respond-to(large, { display: block;});
.respond-to(
x
large, { display: block;});
}
&-form {
width: 100%;
background: @white;
border: 10px solid rgba(255, 255, 255, 0.5);
border-width:
10
px;
border-width:
8
px;
border-radius: 4px;
background-clip: padding-box;
.respond-to(xlarge, { margin: 0 56px});
...
...
@@ -157,8 +158,11 @@
height: 100%;
justify-content: center;
align-items: center;
.respond-to(large, { width: 40%;});
.respond-to(xlarge, { width: 33.3%;});
.respond-to(large, {
width: 520px;
right: calc(50% - 260px);
});
.respond-to(xlarge, { width: 520px; right:0});
}
&__content {
...
...
@@ -174,7 +178,7 @@
img {
display: inline-block;
width:
80
px;
width:
64
px;
}
h1 {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录