Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
3f05ed6f
Commit
3f05ed6f
authored
Jun 17, 2021
by
RuoYi
Browse files
封装iframe组件
parent
090ad532
Changes
3
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/components/iFrame/index.vue
0 → 100644
View file @
3f05ed6f
<
template
>
<div
v-loading=
"loading"
:style=
"'height:' + height"
>
<iframe
:src=
"src"
frameborder=
"no"
style=
"width: 100%; height: 100%"
scrolling=
"auto"
/>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
src
:
{
type
:
String
,
required
:
true
},
},
data
()
{
return
{
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
,
loading
:
true
,
url
:
this
.
src
};
},
mounted
:
function
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
300
);
const
that
=
this
;
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
;
};
}
};
</
script
>
ruoyi-ui/src/views/monitor/druid/index.vue
View file @
3f05ed6f
<
template
>
<div
v-loading=
"loading"
:style=
"'height:'+ height"
>
<iframe
:src=
"src"
frameborder=
"no"
style=
"width: 100%;height: 100%"
scrolling=
"auto"
/>
</div>
<i-frame
:src=
"url"
/>
</
template
>
<
script
>
import
iFrame
from
"
@/components/iFrame/index
"
;
export
default
{
name
:
"
Druid
"
,
components
:
{
iFrame
},
data
()
{
return
{
src
:
process
.
env
.
VUE_APP_BASE_API
+
"
/druid/login.html
"
,
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
,
loading
:
true
url
:
process
.
env
.
VUE_APP_BASE_API
+
"
/druid/login.html
"
};
},
mounted
:
function
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
230
);
const
that
=
this
;
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
;
};
}
};
</
script
>
ruoyi-ui/src/views/tool/swagger/index.vue
View file @
3f05ed6f
<
template
>
<div
v-loading=
"loading"
:style=
"'height:'+ height"
>
<iframe
:src=
"src"
frameborder=
"no"
style=
"width: 100%;height: 100%"
scrolling=
"auto"
/>
</div>
<i-frame
:src=
"url"
/>
</
template
>
<
script
>
import
iFrame
from
"
@/components/iFrame/index
"
;
export
default
{
name
:
"
Swagger
"
,
components
:
{
iFrame
},
data
()
{
return
{
src
:
process
.
env
.
VUE_APP_BASE_API
+
"
/swagger-ui/index.html
"
,
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
,
loading
:
true
url
:
process
.
env
.
VUE_APP_BASE_API
+
"
/swagger-ui/index.html
"
};
},
mounted
:
function
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
230
);
const
that
=
this
;
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
;
};
}
};
</
script
>
Write
Preview
Supports
Markdown
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