7913a3f5 by renchao@pashanhoo.com

style:弹框组件的修改

1 parent dcb58891
<template>
<transition name="msgbox-fade">
<div class="ls-mask" v-if="myShow">
<div class="ls-mask-window" :style="{ 'width': width }">
<div class="ls-mask-window" :class="isMain ? 'mainCenter' : 'contentCenter'" :style="{ 'width': width }">
<div class="ls-head">
<div class="ls-title" :style="{ 'text-align': titleStyle }">
<svg-icon v-if="iconClass != ''" :icon-class='iconClass' />
......@@ -28,6 +28,7 @@ export default {
return {
title: '标题',
editItem: "",
isMain: false,
formData: undefined,//父组件传递的参数 负责传给子组件
btnShow: false,
cancel: function () { },
......@@ -100,6 +101,9 @@ export default {
}
</script>
<style scoped lang="scss" >
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
.ls-mask {
width: 100%;
height: 100%;
......
......@@ -75,15 +75,15 @@
}
.contentCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(calc(-50% + 85px), -50%);
position: absolute !important;
top: 50% !important;
left: 50% !important;
transform: translate(calc(-50% + 85px), -50%) !important;
}
.mainCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
}
\ No newline at end of file
......
/*
* @Description: 弹框组件的封装
* @Autor: renchao
* @LastEditTime: 2023-04-11 09:31:14
*/
import Popup from '@/components/Popup/index'
import Popup1 from '@/components/Popup1/index'
export function popupDialog (title, url, params, width = '75%', height, btnShow = false, callback) {
export function popupDialog (title, url, params, width = '75%', isMain, height, btnShow = false, callback, cancel) {
// Popup.install
Popup1(title, url, {
height: height,
width: width,
formData: params,
btnShow: btnShow,
isMain: isMain,
cancel: () => {
console.log("取消回调");
cancel()
},
confirm: () => {
callback
callback()
}
})
}
......
......@@ -94,18 +94,9 @@ export default {
},
methods: {
openDialog (bsmBatch) {
// if (bsmBatch) {
// this.$nextTick(() => {
// this.$refs.addDialog.getDetailInfo(bsmBatch);
// })
// } else {
// this.$nextTick(() => {
// this.$refs.addDialog.ywhSerial();
// })
// }
this.$popupDialog("证书入库", "zsgl/zsrk/components/addDialog", {
bsmBatch: bsmBatch
})
}, "50%")
},
queryClick () {
getZsglrkList({ ...this.ruleForm, ...this.pageData }).then(res => {
......