Commit 759f9139 by luyt

fix:1.修复大弹窗得自定义title,添加插槽

2.修复弹窗按钮偏下的问题,苹方字体导致的高度问题
1 parent 01abf26f
...@@ -23,10 +23,10 @@ import '@/theme/theme.scss' ...@@ -23,10 +23,10 @@ import '@/theme/theme.scss'
// // import '../dist/glsx-components.css' // // import '../dist/glsx-components.css'
// //开发完成后,本地测试使用我们第二次封装的组件 // //开发完成后,本地测试使用我们第二次封装的组件
// import './index' import './index'
//开发完成后,打包后本地测试,我们第二次封装的组件 //开发完成后,打包后本地测试,我们第二次封装的组件
import './localtest/index' // import './localtest/index'
Vue.config.productionTip = false Vue.config.productionTip = false
......
<template> <template>
<div class="gl-dialog-wrap" :class="mode"> <div class="gl-dialog-wrap " :class="mode">
<el-dialog v-bind="$attrs" v-on="$listeners"> <el-dialog v-bind="$attrs" v-on="$listeners">
<template v-slot:title> <template v-slot:title>
<!-- 标题插槽 --> <!-- 标题插槽 -->
<slot name="title" v-if="!bigTitle"></slot> <slot name="title" v-if="!bigTitle"></slot>
<template v-if="bigTitle"> <template v-if="bigTitle">
<template v-if="mode === 'big'"> <template v-if="mode === 'big'">
<span class="el-dialog__title">{{ bigTitle }}</span> <span class="el-dialog__title" v-if="!$slots.custombigtitle">
{{ bigTitle }}
</span>
<span class="el-dialog__title" v-if="$slots.custombigtitle">
<!-- 大弹窗自定义插槽 -->
<slot name="custombigtitle"></slot>
</span>
<button type="button" aria-label="Close" class="el-dialog__headerbtn"> <button type="button" aria-label="Close" class="el-dialog__headerbtn">
<!-- <i v-if="mode === 'big'" class="el-icon-full-screen full-screen" @click="fullScreenFn"></i> --> <!-- <i v-if="mode === 'big'" class="el-icon-full-screen full-screen" @click="fullScreenFn"></i> -->
<i v-if="mode === 'big'" :class="isFull ? 's-full-screen' : 'full-screen'" @click="fullScreenFn"></i> <i v-if="mode === 'big'" :class="isFull ? 's-full-screen' : 'full-screen'" @click="fullScreenFn"></i>
...@@ -90,6 +96,7 @@ export default { ...@@ -90,6 +96,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('slots',this.$slots)
document.addEventListener('fullscreenchange', () => { document.addEventListener('fullscreenchange', () => {
this.fullscreenchangeFn() this.fullscreenchangeFn()
}) })
...@@ -255,6 +262,7 @@ export default { ...@@ -255,6 +262,7 @@ export default {
top: 18px; top: 18px;
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
line-height: 24px;
color: #000; color: #000;
.full-screen { .full-screen {
display: block; display: block;
...@@ -288,4 +296,11 @@ export default { ...@@ -288,4 +296,11 @@ export default {
height: 40px; height: 40px;
} }
} }
// .gl-dialog-scrm{
// .el-dialog__header {
// .el-dialog__headerbtn {
// top: 15px;
// }
// }
// }
</style> </style>
...@@ -645,6 +645,9 @@ $lightColorDisabled: $color-primary-light04; ...@@ -645,6 +645,9 @@ $lightColorDisabled: $color-primary-light04;
// this.$confirm样式 // this.$confirm样式
.gl-message-box { .gl-message-box {
.el-message-box__title {
line-height: 27px;
}
.el-message-box__headerbtn { .el-message-box__headerbtn {
height: 100%; height: 100%;
top: 0; top: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!