|
|
|
@ -10,6 +10,10 @@ export default {
|
|
|
|
type:Number,
|
|
|
|
type:Number,
|
|
|
|
default:55
|
|
|
|
default:55
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// isFullScreen:{
|
|
|
|
|
|
|
|
// type:Boolean,
|
|
|
|
|
|
|
|
// default:false
|
|
|
|
|
|
|
|
// },
|
|
|
|
isShow:{
|
|
|
|
isShow:{
|
|
|
|
type:Boolean,
|
|
|
|
type:Boolean,
|
|
|
|
default:false
|
|
|
|
default:false
|
|
|
|
@ -36,10 +40,19 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
isFullScreen:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
headerRender(){
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{this.title}
|
|
|
|
|
|
|
|
<a class="ivu-modal-close" on-click={this.closeshowChange}><i class="ivu-icon ivu-icon-ios-close"></i></a>
|
|
|
|
|
|
|
|
<a class="ivu-modal-screen" on-click={this.fullScreen}><i class={this.isFullScreen?'el-icon-aim':'el-icon-full-screen'}></i></a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
},
|
|
|
|
footerRender(){
|
|
|
|
footerRender(){
|
|
|
|
if(this.type === 'form'){
|
|
|
|
if(this.type === 'form'){
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
@ -58,6 +71,9 @@ export default {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
closeshowChange(){
|
|
|
|
|
|
|
|
this.$emit('update:isShow',false)
|
|
|
|
|
|
|
|
},
|
|
|
|
showChange(e){
|
|
|
|
showChange(e){
|
|
|
|
this.$emit('update:isShow',e)
|
|
|
|
this.$emit('update:isShow',e)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -67,6 +83,11 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$refs['elForm'].resetFields()
|
|
|
|
this.$refs['elForm'].resetFields()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
fullScreen(){
|
|
|
|
|
|
|
|
this.isFullScreen = !this.isFullScreen
|
|
|
|
|
|
|
|
// this.width = 100
|
|
|
|
|
|
|
|
// this.height = '100vh'
|
|
|
|
|
|
|
|
},
|
|
|
|
submit(){
|
|
|
|
submit(){
|
|
|
|
if(this.type === 'normal'){
|
|
|
|
if(this.type === 'normal'){
|
|
|
|
return
|
|
|
|
return
|
|
|
|
@ -95,16 +116,22 @@ export default {
|
|
|
|
footer slot:
|
|
|
|
footer slot:
|
|
|
|
footerContent
|
|
|
|
footerContent
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
|
|
|
|
const {okText,okClick,headerRender,footerRender,width,isFullScreen,type,$scopedSlots,rules,form,showChange,isShow,title} = this
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Modal
|
|
|
|
<Modal
|
|
|
|
ok-text={okText}
|
|
|
|
ok-text={okText}
|
|
|
|
class-name={'vertical-center-modal'}
|
|
|
|
class-name={!isFullScreen?'vertical-center-modal':'vertical-center-modal vertical-full-modal'}
|
|
|
|
width={width}
|
|
|
|
width={width}
|
|
|
|
title={title}
|
|
|
|
title={title}
|
|
|
|
value={isShow}
|
|
|
|
value={isShow}
|
|
|
|
on={{['on-visible-change']:showChange,['on-ok']:okClick}}
|
|
|
|
on={{['on-visible-change']:showChange,['on-ok']:okClick}}
|
|
|
|
|
|
|
|
|
|
|
|
scopedSlots={{
|
|
|
|
scopedSlots={{
|
|
|
|
|
|
|
|
header(){
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return headerRender()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
default(){
|
|
|
|
default(){
|
|
|
|
if(type === "form"){
|
|
|
|
if(type === "form"){
|
|
|
|
let formItems = []
|
|
|
|
let formItems = []
|
|
|
|
@ -215,6 +242,29 @@ export default {
|
|
|
|
min-height: 300px;
|
|
|
|
min-height: 300px;
|
|
|
|
overflow: scroll;
|
|
|
|
overflow: scroll;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.ivu-modal-screen{
|
|
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
right: 40px;
|
|
|
|
|
|
|
|
top: 17px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
color:#bf617c
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.vertical-full-modal{
|
|
|
|
|
|
|
|
.ivu-modal{
|
|
|
|
|
|
|
|
width:100%!important
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.ivu-modal-content{
|
|
|
|
|
|
|
|
height:100vh
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.ivu-modal-body{
|
|
|
|
|
|
|
|
max-height: 80vh !important;
|
|
|
|
|
|
|
|
min-height: 300px;
|
|
|
|
|
|
|
|
overflow: scroll;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.xy-table-item{
|
|
|
|
.xy-table-item{
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
|