Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
53a9f3da
authored
Feb 11, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 XModel 高度无法自适应的问题
parent
d985ef19
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
src/components/XModal/src/XModal.vue
+1
-1
src/views/system/post/form.vue
+4
-4
src/views/system/post/index.vue
+2
-2
No files found.
src/components/XModal/src/XModal.vue
View file @
53a9f3da
...
...
@@ -9,7 +9,7 @@ const props = defineProps({
loading
:
propTypes
.
bool
.
def
(
false
),
title
:
propTypes
.
string
.
def
(
'弹窗'
),
width
:
propTypes
.
string
.
def
(
'40%'
),
height
:
propTypes
.
string
.
def
(
'60%'
)
,
height
:
propTypes
.
string
,
minWidth
:
propTypes
.
string
.
def
(
'460'
),
minHeight
:
propTypes
.
string
.
def
(
'320'
),
showFooter
:
propTypes
.
bool
.
def
(
true
)
...
...
src/views/system/post/form.vue
View file @
53a9f3da
<
template
>
<!-- 弹窗 -->
<XModal
:title=
"modelTitle"
:loading=
"modelLoading"
v-model=
"modelVisible"
height=
"270px"
>
<XModal
:title=
"modelTitle"
:loading=
"modelLoading"
v-model=
"modelVisible"
>
<!-- 表单:添加/修改 -->
<Form
ref=
"formRef"
...
...
@@ -45,14 +45,14 @@ const formRef = ref<FormExpose>() // 表单 Ref
const
detailData
=
ref
()
// 详情 Ref
// 打开弹窗
const
openModal
=
async
(
type
:
string
,
rowI
d
?:
number
)
=>
{
const
openModal
=
async
(
type
:
string
,
i
d
?:
number
)
=>
{
modelVisible
.
value
=
true
modelLoading
.
value
=
true
modelTitle
.
value
=
t
(
'action.'
+
type
)
actionType
.
value
=
type
// 设置数据
if
(
rowI
d
)
{
const
res
=
await
PostApi
.
getPostApi
(
rowI
d
)
if
(
i
d
)
{
const
res
=
await
PostApi
.
getPostApi
(
i
d
)
if
(
type
===
'update'
)
{
unref
(
formRef
)?.
setValues
(
res
)
}
else
if
(
type
===
'detail'
)
{
...
...
src/views/system/post/index.vue
View file @
53a9f3da
...
...
@@ -66,7 +66,7 @@ const [registerTable, { reload, deleteData, exportList }] = useXTable({
// 表单相关的变量
const
modalRef
=
ref
()
const
openModal
=
(
actionT
ype
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
actionT
ype
,
id
)
const
openModal
=
(
t
ype
:
string
,
id
?:
number
)
=>
{
modalRef
.
value
.
openModal
(
t
ype
,
id
)
}
</
script
>
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