修复标题栏和按钮栏的默认状态
parent
07e4b9c0aa
commit
b5b252f06f
|
@ -65,7 +65,7 @@
|
||||||
/* 弹层样式 */
|
/* 弹层样式 */
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
display: flex;
|
display: none;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__ctrl {
|
&__ctrl {
|
||||||
display: flex;
|
display: none;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
@ -280,7 +280,7 @@ class Layer {
|
||||||
mask: false,
|
mask: false,
|
||||||
'mask-close': false,
|
'mask-close': false,
|
||||||
'mask-color': null,
|
'mask-color': null,
|
||||||
fixed: false //是否固定位置
|
fixed: true //是否固定位置
|
||||||
}
|
}
|
||||||
|
|
||||||
__init__() {
|
__init__() {
|
||||||
|
@ -307,9 +307,9 @@ class Layer {
|
||||||
} else {
|
} else {
|
||||||
this.__TITLE__.textContent = val
|
this.__TITLE__.textContent = val
|
||||||
}
|
}
|
||||||
this.__TITLE__.style.display = ''
|
this.__TITLE__.style.display = 'flex'
|
||||||
} else {
|
} else {
|
||||||
this.__TITLE__.style.display = 'none'
|
this.__TITLE__.style.display = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,9 +349,9 @@ class Layer {
|
||||||
this.props.type = val
|
this.props.type = val
|
||||||
if (btns.length) {
|
if (btns.length) {
|
||||||
this.__CTRL__.innerHTML = renderBtns(btns)
|
this.__CTRL__.innerHTML = renderBtns(btns)
|
||||||
this.__CTRL__.style.display = ''
|
this.__CTRL__.style.display = 'flex'
|
||||||
} else {
|
} else {
|
||||||
this.__CTRL__.style.display = 'none'
|
this.__CTRL__.style.display = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setAttribute(val, '')
|
this.setAttribute(val, '')
|
||||||
|
@ -605,7 +605,6 @@ function _layer(opt) {
|
||||||
opt = {
|
opt = {
|
||||||
type,
|
type,
|
||||||
content,
|
content,
|
||||||
fixed: true,
|
|
||||||
from: { top: 0 },
|
from: { top: 0 },
|
||||||
to: { top: '30px' }
|
to: { top: '30px' }
|
||||||
}
|
}
|
||||||
|
@ -683,7 +682,6 @@ Object.assign(_layer, {
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
title,
|
title,
|
||||||
content,
|
content,
|
||||||
fixed: true,
|
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -696,7 +694,6 @@ Object.assign(_layer, {
|
||||||
type: 'confirm',
|
type: 'confirm',
|
||||||
title,
|
title,
|
||||||
content,
|
content,
|
||||||
fixed: true,
|
|
||||||
mask: true,
|
mask: true,
|
||||||
intercept
|
intercept
|
||||||
})
|
})
|
||||||
|
@ -706,7 +703,6 @@ Object.assign(_layer, {
|
||||||
type: 'prompt',
|
type: 'prompt',
|
||||||
title,
|
title,
|
||||||
content: `<wc-input autofocus class="layer__content__input"></wc-input>`,
|
content: `<wc-input autofocus class="layer__content__input"></wc-input>`,
|
||||||
fixed: true,
|
|
||||||
mask: true,
|
mask: true,
|
||||||
intercept
|
intercept
|
||||||
})
|
})
|
||||||
|
@ -716,7 +712,6 @@ Object.assign(_layer, {
|
||||||
...extra,
|
...extra,
|
||||||
type: 'frame',
|
type: 'frame',
|
||||||
content: `<iframe class="layer__content__frame" src="${url}"></iframe>`,
|
content: `<iframe class="layer__content__frame" src="${url}"></iframe>`,
|
||||||
fixed: true,
|
|
||||||
mask: true,
|
mask: true,
|
||||||
'mask-close': true
|
'mask-close': true
|
||||||
})
|
})
|
||||||
|
@ -726,7 +721,6 @@ Object.assign(_layer, {
|
||||||
type: 'notify',
|
type: 'notify',
|
||||||
title: '通知',
|
title: '通知',
|
||||||
content,
|
content,
|
||||||
fixed: true,
|
|
||||||
blur: true,
|
blur: true,
|
||||||
from: { right: '-300px', top: 0 },
|
from: { right: '-300px', top: 0 },
|
||||||
to: { right: 0 }
|
to: { right: 0 }
|
||||||
|
|
Reference in New Issue