42 lines
905 B
Vue
42 lines
905 B
Vue
<template>
|
|
<div>
|
|
<div v-if="active" class="dialog_wrapper">
|
|
<div class="dialog">
|
|
<div class="dialog_header">
|
|
<span class="dialog_title">{{title}}</span>
|
|
<button class="dialog_headerbtn" @click="toCancle">
|
|
<i class="iconfont icon_close"></i>
|
|
</button>
|
|
</div>
|
|
<div class="dialog_body">
|
|
<slot></slot>
|
|
</div>
|
|
<div class="dialog_footer">
|
|
<button class="button button--primary" @click="toCancle">取消</button>
|
|
<button class="button button--primary">确定</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-if="active" class="modal"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'jxDialog',
|
|
props: {
|
|
title: String
|
|
},
|
|
data () {
|
|
return {
|
|
active: false
|
|
}
|
|
},
|
|
methods: {
|
|
toCancle () {
|
|
this.active = false
|
|
}
|
|
}
|
|
}
|
|
</script>
|