mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-29 01:39:15 +08:00
fix(Dialog): some popup props not work
This commit is contained in:
parent
627e376cfb
commit
af94c92614
@ -1,4 +1,4 @@
|
|||||||
import { createNamespace, addUnit } from '../utils';
|
import { createNamespace, addUnit, pick } from '../utils';
|
||||||
import { BORDER_TOP, BORDER_LEFT } from '../utils/constant';
|
import { BORDER_TOP, BORDER_LEFT } from '../utils/constant';
|
||||||
import Popup from '../popup';
|
import Popup from '../popup';
|
||||||
import Button from '../button';
|
import Button from '../button';
|
||||||
@ -90,13 +90,17 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onClose(action) {
|
onClose(action) {
|
||||||
this.$emit('update:show', false);
|
this.onUpdateShow(false);
|
||||||
|
|
||||||
if (this.callback) {
|
if (this.callback) {
|
||||||
this.callback(action);
|
this.callback(action);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onUpdateShow(value) {
|
||||||
|
this.$emit('update:show', value);
|
||||||
|
},
|
||||||
|
|
||||||
genRoundButtons() {
|
genRoundButtons() {
|
||||||
return (
|
return (
|
||||||
<ActionBar class={bem('footer')}>
|
<ActionBar class={bem('footer')}>
|
||||||
@ -204,9 +208,17 @@ export default createComponent({
|
|||||||
role="dialog"
|
role="dialog"
|
||||||
class={[bem([this.theme]), this.className]}
|
class={[bem([this.theme]), this.className]}
|
||||||
style={{ width: addUnit(this.width) }}
|
style={{ width: addUnit(this.width) }}
|
||||||
transition={this.transition}
|
|
||||||
lazyRender={this.lazyRender}
|
|
||||||
aria-labelledby={this.title || message}
|
aria-labelledby={this.title || message}
|
||||||
|
{...{
|
||||||
|
...pick(this, [
|
||||||
|
'overlay',
|
||||||
|
'transition',
|
||||||
|
'lazyRender',
|
||||||
|
'closeOnPopstate',
|
||||||
|
'closeOnClickOverlay',
|
||||||
|
]),
|
||||||
|
'onUpdate:show': this.onUpdateShow,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{Title}
|
{Title}
|
||||||
{this.genContent(title)}
|
{this.genContent(title)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user