1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > vue 封装dialog_element-ui 封装dialog组件

vue 封装dialog_element-ui 封装dialog组件

时间:2022-12-30 02:11:05

相关推荐

vue 封装dialog_element-ui 封装dialog组件

封装组件:

title="title"

:visible.sync="visible"

@close="$emit('update:show', false)"

:show="show">

this is a dialog

export default {

data () {

return {

visible: this.show

};

},

props: {

show: {

type: Boolean,

default: false

}

},

watch: {

show () {

this.visible = this.show;

}

}

};

使用组件:

click

import serviceDialog from './serviceDialog'

export default {

data () {

return {

show: false

};

},

methods: {

open () {

this.show = true;

}

},

components: {

serviceDialog

}

};

本文来源于网络:查看>/qq_36708991/article/details/79234732

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。