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
88de82c4
Commit
88de82c4
authored
Oct 22, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix drawer autoHeight
parent
c0e4c9e5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
26 deletions
+36
-26
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+7
-0
BasicDrawer.tsx
src/components/Drawer/src/BasicDrawer.tsx
+3
-3
index.less
src/components/Drawer/src/index.less
+3
-0
Logo.vue
src/layouts/Logo.vue
+2
-2
Axios.ts
src/utils/http/axios/Axios.ts
+20
-20
Drawer3.vue
src/views/demo/comp/drawer/Drawer3.vue
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
88de82c4
## Wip
### 🐛 Bug Fixes
-
修复抽屉组件自动高度及显示 footer 显示问题
# 2.0.0-rc.4 (2020-10-21)
### ✨ Features
...
...
@@ -24,6 +30,7 @@
-
修复预览命令不打包问题
-
修复表格 actionColOptions 参数不生效问题
-
修复表格刷新表单 loading 不生效问题
-
修复带参界面刷新参数丢失问题
# 2.0.0-rc.3 (2020-10-19)
...
...
src/components/Drawer/src/BasicDrawer.tsx
View file @
88de82c4
...
...
@@ -109,7 +109,7 @@ export default defineComponent({
if
(
showFooter
&&
footerHeight
)
{
return
isNumber
(
footerHeight
)
?
`
${
footerHeight
}
px`
:
`
${
footerHeight
.
replace
(
'
px
'
,
''
)}
px`
;
}
return
0
;
return
`0px`
;
});
function
renderFooter
()
{
const
{
...
...
@@ -195,7 +195,6 @@ export default defineComponent({
return
()
=>
{
const
footerHeight
=
unref
(
getFooterHeight
);
return
(
<
Drawer
class=
{
prefixCls
}
...
...
@@ -217,8 +216,9 @@ export default defineComponent({
<
div
ref=
{
scrollRef
}
{
...
attrs
}
data
-
id=
"123"
style=
{
{
height
:
`calc(100% - ${footerHeight}
px
)`
,
height
:
`calc(100% - ${footerHeight})`
,
overflow
:
'
auto
'
,
padding
:
'
16px
'
,
paddingBottom
:
'
30px
'
,
...
...
src/components/Drawer/src/index.less
View file @
88de82c4
...
...
@@ -53,6 +53,9 @@
}
&__footer {
position: absolute;
bottom: 0;
width: 100%;
height: @footer-height;
padding: 0 26px;
line-height: @footer-height;
...
...
src/layouts/Logo.vue
View file @
88de82c4
<
template
>
<div
class=
"app-logo"
@
click=
"handleGoHome"
>
<img
:src=
"logo"
/>
<div
v-if=
"show"
class=
"logo-title ml-1 ellipsis"
>
{{
globSetting
.
title
}}
</div>
<div
v-if=
"show"
class=
"logo-title ml-1
mt-1
ellipsis"
>
{{
globSetting
.
title
}}
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -55,7 +55,7 @@
.app-logo {
display: flex;
justify-content: center;
//
justify-content: center;
align-items: center;
cursor: pointer;
...
...
src/utils/http/axios/Axios.ts
View file @
88de82c4
...
...
@@ -6,7 +6,7 @@ import { isFunction } from '/@/utils/is';
import
{
cloneDeep
}
from
'
lodash-es
'
;
import
type
{
RequestOptions
,
CreateAxiosOptions
,
Result
}
from
'
./types
'
;
import
{
ContentTypeEnum
}
from
'
/@/enums/httpEnum
'
;
//
import { ContentTypeEnum } from '/@/enums/httpEnum';
import
{
errorResult
}
from
'
./const
'
;
export
*
from
'
./axiosTransform
'
;
...
...
@@ -107,25 +107,25 @@ export class VAxios {
this
.
axiosInstance
.
interceptors
.
response
.
use
(
undefined
,
responseInterceptorsCatch
);
}
/**
* @description: 文件上传
*/
uploadFiles
(
config
:
AxiosRequestConfig
,
params
:
File
[])
{
const
formData
=
new
FormData
();
Object
.
keys
(
params
).
forEach
((
key
)
=>
{
formData
.
append
(
key
,
params
[
key
as
any
]);
});
return
this
.
request
({
...
config
,
method
:
'
POST
'
,
data
:
formData
,
headers
:
{
'
Content-type
'
:
ContentTypeEnum
.
FORM_DATA
,
},
});
}
/
/ /
**
//
* @description: 文件上传
//
*/
//
uploadFiles(config: AxiosRequestConfig, params: File[]) {
//
const formData = new FormData();
//
Object.keys(params).forEach((key) => {
//
formData.append(key, params[key as any]);
//
});
//
return this.request({
//
...config,
//
method: 'POST',
//
data: formData,
//
headers: {
//
'Content-type': ContentTypeEnum.FORM_DATA,
//
},
//
});
//
}
/**
* @description: 请求方法
...
...
src/views/demo/comp/drawer/Drawer3.vue
View file @
88de82c4
<
template
>
<BasicDrawer
v-bind=
"$attrs"
title=
"Modal Title"
width=
"50%"
showFooter
>
<p
class=
"h-20"
v-for=
"index in
2
0"
:key=
"index"
>
根据屏幕高度自适应
</p>
<p
class=
"h-20"
v-for=
"index in
4
0"
:key=
"index"
>
根据屏幕高度自适应
</p>
</BasicDrawer>
</
template
>
<
script
lang=
"ts"
>
...
...
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