ee61002c by xiaomiao

弹框样式拆分

1 parent cd82abd6
......@@ -113,8 +113,8 @@ export default {
}
</script>
<style rel="stylesheet/scss" lang="scss" >
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
// @import "~@/styles/mixin.scss";
// @import "~@/styles/dialogBox.scss";
</style>
<style rel="stylesheet/scss" scoped lang="scss" >
/deep/.is-fullscreen {
......@@ -123,4 +123,4 @@ export default {
left: 50% !important;
transform: translate(-50%, -50%) !important;
}
</style>
\ No newline at end of file
</style>
......
<template>
<transition name="msgbox-fade" v-if="myShow">
<div class="ls-mask" v-loading="loading">
<div class="ls-mask-window dialogBox" :style="{ 'width': width }">
<div class="ls-mask-window" :style="{ 'width': width }">
<div class="ls-head">
<div class="ls-title" :style="{ 'text-align': titleStyle }">
<svg-icon v-if="iconClass != ''" :icon-class='iconClass' />
......@@ -21,172 +21,167 @@
</transition>
</template>
<script>
import Popup1 from './index'
export default {
name: 'index',
data () {
return {
title: '标题',
editItem: "",
formData: undefined,//父组件传递的参数 负责传给子组件
btnShow: false,
cancel: function () { },
confirm: function () { },
cancelText: '取消',
confirmText: '确认',
isSync: false,
isShow: false,
myShow: false,
titleStyle: 'center',
width: "75%",
height: "auto",
contentHeight: "",
iconClass: "",
key: 0
}
},
props: {
loading: { type: Boolean, default: false },
},
watch: {
isShow (newValue) {
this.editItem = this.loadViewFn(this.editItem)
document.body.appendChild(this.$el);
this.myShow = newValue
}
},
mounted () {
// 计算滚动条高度
setTimeout(() => {
if (this.btnShow) {
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
import Popup1 from './index'
export default {
name: 'index',
data () {
return {
title: '标题',
editItem: "",
formData: undefined,//父组件传递的参数 负责传给子组件
btnShow: false,
cancel: function () { },
confirm: function () { },
cancelText: '取消',
confirmText: '确认',
isSync: false,
isShow: false,
myShow: false,
titleStyle: 'center',
width: "75%",
height: "auto",
contentHeight: "",
iconClass: "",
key: 0
}
},
props: {
loading: { type: Boolean, default: false },
},
watch: {
isShow (newValue) {
this.editItem = this.loadViewFn(this.editItem)
document.body.appendChild(this.$el);
this.myShow = newValue
}
},
mounted () {
// 计算滚动条高度
setTimeout(() => {
if (this.btnShow) {
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
} else {
this.contentHeight = this.height
}
} else {
this.contentHeight = this.height
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
} else {
this.contentHeight = this.height
}
}
} else {
if (this.height == 'auto') {
this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px'
} else {
this.contentHeight = this.height
}, 300)
},
methods: {
onCancel () {
Popup1().close()
},
onConfirm () {
this.loading = true
let res = new Promise((resolve, reject) => {
this.confirm()
resolve(true)
})
if (res) {
this.isShow = false
}
},
loadingFn (e) { //加载状态
this.loading = e
},
loadViewFn (view) {
return (r) =>
require.ensure([], () =>
r(require(`@/${view}.vue`))
)
}
}, 300)
},
methods: {
onCancel () {
Popup1().close()
},
onConfirm () {
this.loading = true
let res = new Promise((resolve, reject) => {
this.confirm()
resolve(true)
})
if (res) {
this.isShow = false
destroyed () {
if (this.appendToBody && this.$el && this.$el.parentNode) {
this.$el.parentNode.removeChild(this.$el);
}
},
loadingFn (e) { //加载状态
this.loading = e
},
loadViewFn (view) {
return (r) =>
require.ensure([], () =>
r(require(`@/${view}.vue`))
)
}
},
destroyed () {
if (this.appendToBody && this.$el && this.$el.parentNode) {
this.$el.parentNode.removeChild(this.$el);
}
}
}
</script>
<style scoped lang="scss" >
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
.ls-mask {
width: 100%;
height: 100%;
z-index: 2000;
position: fixed;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.3);
}
.ls-mask-window {
background: white;
position: relative;
left: 50%;
top: 50%;
min-height: 200px;
transform: translate(-50%, -50%);
border-radius: 5px;
overflow: hidden;
}
.ls-mask {
width: 100%;
height: 100%;
z-index: 2000;
position: fixed;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.3);
}
.ls-mask-window b {
padding-left: 5px;
}
.ls-mask-window {
background: white;
position: relative;
left: 50%;
top: 50%;
min-height: 200px;
transform: translate(-50%, -50%);
border-radius: 5px;
overflow: hidden;
}
/deep/.closeStyle {
top: 7px !important;
}
.ls-mask-window b {
padding-left: 5px;
}
.ls-title {
padding: 10px;
color: #ffffff;
// background: linear-gradient(90deg, #1D66DC 0%, #081B56 100%);
font-size: 16px;
}
/deep/.closeStyle {
top: 7px !important;
}
.ls-title .svg-icon {
font-size: 18px;
}
.ls-title {
padding: 10px;
color: #ffffff;
// background: linear-gradient(90deg, #1D66DC 0%, #081B56 100%);
font-size: 16px;
}
.mask-content {
padding: 15px;
width: 100%;
min-height: 20%;
max-height: 95%;
// overflow-y: scroll;
}
.ls-title .svg-icon {
font-size: 18px;
}
.ls-mask-footer {
height: 50px;
display: flex;
justify-content: center;
width: 100%;
position: absolute;
border-top: 1px solid $borderColor;
bottom: 0;
background: #ffffff;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
overflow: hidden;
}
.mask-content {
padding: 15px;
width: 100%;
min-height: 20%;
max-height: 95%;
// overflow-y: scroll;
}
.ls-mask-footer {
height: 50px;
display: flex;
justify-content: center;
width: 100%;
position: absolute;
border-top: 1px solid $borderColor;
bottom: 0;
background: #ffffff;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
overflow: hidden;
}
/deep/.closeStyle {
position: absolute;
top: 13px;
right: 26px;
font-size: 24px;
cursor: pointer;
color: #409EFF;
}
/deep/.closeStyle {
position: absolute;
top: 13px;
right: 26px;
font-size: 24px;
cursor: pointer;
color: #409eff;
}
/deep/.el-loading-mask {
background: none;
}
/deep/.el-loading-mask {
background: none;
}
/deep/.el-button {
margin: 8px 10px;
width: 75px;
}
/deep/.el-button {
margin: 8px 10px;
width: 75px;
}
</style>
......
.dialogBox {
overflow: hidden;
background: url("~@/image/dialogBg.png") no-repeat !important;
background-size: 100% 100% !important;
// min-height: 90vh;
.dialog_title {
display: flex;
position: relative;
font-size: 22px;
top: -10px;
width: 38%;
height: 40px;
margin-left: 28px;
justify-content: center;
white-space: nowrap;
b {
font-weight: 200;
display: inline-block;
position: relative;
font-size: 24px;
top: -11px;
width: 38%;
height: 40px;
margin-left: 28px;
// @include flex-center;
display: flex;
justify-content: center;
}
}
.dialog_full {
position: absolute;
top: 0;
right: 30px;
}
.el-dialog__body {
max-height: 88vh;
overflow-x: hidden;
overflow-y: hidden;
}
.dialog_footer {
margin-bottom: 8px;
@include flex-center;
}
.dialogBox-content {
height: auto
}
.editDialogBox-box {
background: #031A46;
box-shadow: inset 0px 0px 12px 0px #02D9FD;
border-radius: 2px;
border: 1px solid #6BC1FC;
margin: 0 18px 10px 18px;
}
}
.item-content-input {
/deep/.el-input__inner {
border: none !important;
text-align: right;
}
}
.regularHeight {
display: flex;
flex-direction: column;
height: 87vh;
.editDialogBox-con,
.JsonEditor {
flex: 1;
height: 100%;
}
}
.dialog-from {
padding: 13px;
border-radius: 2px;
box-sizing: border-box;
.el-row {
display: flex;
flex-wrap: nowrap;
}
.el-col {
line-height: 18px;
display: flex;
align-items: center;
margin-bottom: 3px;
color: #B5D6DC;
border-radius: 2px;
border: 1px solid #224C7C;
span {
display: inline-block;
padding: 3px;
border-radius: 3px;
overflow: hidden;
white-space: nowrap;
text-align: left;
color: #02D9FD;
}
p {
flex: 1;
width: 100%;
padding-left: 5px;
line-height: 20px;
color: #c0c4cc;
cursor: not-allowed;
white-space: nowrap;
margin-right: 5px;
text-align: right;
}
}
}
/deep/.el-textarea__inner {
border: 1px solid #224C7C;
margin: 0 0 10px 0 !important;
width: 100% !important;
color: #dadde3 !important;
background: transparent !important;
}
/deep/.el-input__inner {
border: 1px solid #224C7C !important;
margin: 0 !important;
width: 100% !important;
color: #dadde3 !important;
background: transparent !important;
}
.dialog_title {
@include flex;
justify-content: space-between;
width: 100%;
}
.el-dialog__header {
color: #FFFFFF;
height: 46px !important;
width: 97%;
margin: 0 auto;
margin-top: 2px;
}
.el-dialog__body {
padding-top: 0;
padding-bottom: 0;
// height: 95vh;
}
.el-dialog__headerbtn {
width: 42px;
height: 20px;
background: url("~@/image/closebg.png") no-repeat;
background-size: 100% 100%;
right: 40px;
top: 33px;
&:hover {
box-shadow: inset 0px 0px 12px 0px #02D9FD;
}
}
.el-dialog__close {
font-size: 0;
}
.el-form-item {
@include flex;
width: 100%;
}
.el-dialog__wrapper {
width: 100%;
height: 100%;
overflow: hidden;
}
.contentCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(calc(-50% + 85px), -50%);
}
.mainCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// 展开收起按钮位置
.el-input__suffix {
right: 10px;
}
}
\ No newline at end of file
......
......@@ -79,6 +79,15 @@
}
}
.el-dialog__close {
font-size: 0;
}
.el-form-item {
display: flex;
width: 100%;
}
.advanced-search {
display: flex;
font-size: 12px;
......@@ -240,12 +249,6 @@
color: #fff;
}
.el-dialog__headerbtn {
position: absolute;
top: 22px;
right: 30px;
}
.el-dialog__header {
text-align: center;
margin-bottom: 10px;
......@@ -424,6 +427,7 @@
width: 100%;
border-bottom: 1px solid #ccc;
}
}
.el-dialog__wrapper {
......@@ -552,3 +556,202 @@
background-size: cover;
color: white;
}
// 监管弹框样式
.dialogBox {
overflow: hidden;
background: url("~@/image/dialogBg.png") no-repeat !important;
background-size: 100% 100% !important;
// min-height: 90vh;
.dialog_title {
display: flex;
position: relative;
font-size: 22px;
top: -10px;
width: 38%;
height: 40px;
margin-left: 28px;
justify-content: center;
white-space: nowrap;
b {
font-weight: 200;
display: inline-block;
position: relative;
font-size: 24px;
top: -11px;
width: 38%;
height: 40px;
margin-left: 28px;
// @include flex-center;
display: flex;
justify-content: center;
}
}
.dialog_full {
position: absolute;
top: 0;
right: 30px;
}
.el-dialog__body {
max-height: 88vh;
overflow-x: hidden;
overflow-y: hidden;
}
.dialog_footer {
margin-bottom: 8px;
display: flex;
justify-content: center;
align-items: center;
}
.dialogBox-content {
height: auto
}
.editDialogBox-box {
background: #031A46;
box-shadow: inset 0px 0px 12px 0px #02D9FD;
border-radius: 2px;
border: 1px solid #6BC1FC;
margin: 0 18px 10px 18px;
}
.item-content-input {
/deep/.el-input__inner {
border: none !important;
text-align: right;
}
}
.regularHeight {
display: flex;
flex-direction: column;
height: 87vh;
.editDialogBox-con,
.JsonEditor {
flex: 1;
height: 100%;
}
}
.dialog-from {
padding: 13px;
border-radius: 2px;
box-sizing: border-box;
.el-row {
display: flex;
flex-wrap: nowrap;
}
.el-col {
line-height: 18px;
display: flex;
align-items: center;
margin-bottom: 3px;
color: #B5D6DC;
border-radius: 2px;
border: 1px solid #224C7C;
span {
display: inline-block;
padding: 3px;
border-radius: 3px;
overflow: hidden;
white-space: nowrap;
text-align: left;
color: #02D9FD;
}
p {
flex: 1;
width: 100%;
padding-left: 5px;
line-height: 20px;
color: #c0c4cc;
cursor: not-allowed;
white-space: nowrap;
margin-right: 5px;
text-align: right;
}
}
}
.el-textarea__inner {
border: 1px solid #224C7C;
margin: 0 0 10px 0 !important;
width: 100% !important;
color: #dadde3 !important;
background: transparent !important;
}
.el-input__inner {
border: 1px solid #224C7C !important;
margin: 0 !important;
width: 100% !important;
color: #dadde3 !important;
background: transparent !important;
}
.el-dialog__header {
color: #FFFFFF;
height: 46px !important;
width: 97%;
margin: 0 auto;
margin-top: 2px;
}
.el-dialog__body {
padding-top: 0;
padding-bottom: 0;
// height: 95vh;
}
.el-dialog__headerbtn {
width: 42px;
height: 20px;
background: url("~@/image/closebg.png") no-repeat;
background-size: 100% 100%;
right: 40px;
top: 33px;
&:hover {
box-shadow: inset 0px 0px 12px 0px #02D9FD;
}
}
.el-dialog__close {
font-size: 0;
}
.el-form-item {
display: flex;
width: 100%;
}
}
.contentCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(calc(-50% + 85px), -50%);
}
.mainCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// 展开收起按钮位置
.el-input__suffix {
right: 10px;
}
}
......
......@@ -27,7 +27,14 @@
padding: 22px 42px 20px;
}
.el-dialog__close {
font-size: 0;
}
.el-form-item {
display: flex;
width: 100%;
}
.el-form--inline .el-form-item {
width: auto;
......
......@@ -177,9 +177,12 @@
white-space: nowrap;
b {
font-size: 16px;
font-weight: 600;
}
}
.el-dialog__headerbtn {
right: 20px !important;
top: 23px !important;
}
}
}
</style>
......
......@@ -412,6 +412,6 @@
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
// @import "~@/styles/mixin.scss";
// @import "~@/styles/dialogBox.scss";
</style>
......
......@@ -210,9 +210,12 @@
white-space: nowrap;
b {
font-size: 16px;
font-weight: 600;
}
}
.el-dialog__headerbtn {
right: 20px !important;
top: 23px !important;
}
}
.selbig {
width: 500px;
......