Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
liyang
sts网站
Commits
3f05ed6f
Commit
3f05ed6f
authored
Jun 17, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封装iframe组件
parent
090ad532
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
30 deletions
+44
-30
index.vue
ruoyi-ui/src/components/iFrame/index.vue
+36
-0
index.vue
ruoyi-ui/src/views/monitor/druid/index.vue
+4
-15
index.vue
ruoyi-ui/src/views/tool/swagger/index.vue
+4
-15
No files found.
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
>
<
template
>
<div
v-loading=
"loading"
:style=
"'height:'+ height"
>
<i-frame
:src=
"url"
/>
<iframe
:src=
"src"
frameborder=
"no"
style=
"width: 100%;height: 100%"
scrolling=
"auto"
/>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
iFrame
from
"@/components/iFrame/index"
;
export
default
{
export
default
{
name
:
"Druid"
,
name
:
"Druid"
,
components
:
{
iFrame
},
data
()
{
data
()
{
return
{
return
{
src
:
process
.
env
.
VUE_APP_BASE_API
+
"/druid/login.html"
,
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/druid/login.html"
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"px;"
,
loading
:
true
};
};
},
},
mounted
:
function
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
230
);
const
that
=
this
;
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
94.5
+
"px;"
;
};
}
};
};
</
script
>
</
script
>
ruoyi-ui/src/views/tool/swagger/index.vue
View file @
3f05ed6f
<
template
>
<
template
>
<div
v-loading=
"loading"
:style=
"'height:'+ height"
>
<i-frame
:src=
"url"
/>
<iframe
:src=
"src"
frameborder=
"no"
style=
"width: 100%;height: 100%"
scrolling=
"auto"
/>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
iFrame
from
"@/components/iFrame/index"
;
export
default
{
export
default
{
name
:
"Swagger"
,
name
:
"Swagger"
,
components
:
{
iFrame
},
data
()
{
data
()
{
return
{
return
{
src
:
process
.
env
.
VUE_APP_BASE_API
+
"/swagger-ui/index.html"
,
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/swagger-ui/index.html"
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"px;"
,
loading
:
true
};
};
},
},
mounted
:
function
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
230
);
const
that
=
this
;
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
94.5
+
"px;"
;
};
}
};
};
</
script
>
</
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