2021-06-23 13:12:33 +08:00
|
|
|
// 信息提示窗口
|
|
|
|
|
Vue.component("tip-message-box", {
|
|
|
|
|
props: ["code"],
|
|
|
|
|
mounted: function () {
|
|
|
|
|
let that = this
|
|
|
|
|
Tea.action("/ui/showTip")
|
|
|
|
|
.params({
|
|
|
|
|
code: this.code
|
|
|
|
|
})
|
|
|
|
|
.success(function (resp) {
|
|
|
|
|
that.visible = resp.data.visible
|
|
|
|
|
})
|
|
|
|
|
.post()
|
|
|
|
|
},
|
|
|
|
|
data: function () {
|
|
|
|
|
return {
|
|
|
|
|
visible: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
close: function () {
|
|
|
|
|
this.visible = false
|
|
|
|
|
Tea.action("/ui/hideTip")
|
|
|
|
|
.params({
|
|
|
|
|
code: this.code
|
|
|
|
|
})
|
|
|
|
|
.post()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
template: `<div class="ui icon message" v-if="visible">
|
|
|
|
|
<i class="icon info circle"></i>
|
2021-07-13 15:50:09 +08:00
|
|
|
<i class="close icon" title="取消" @click.prevent="close" style="margin-top: 1em"></i>
|
2021-06-23 13:12:33 +08:00
|
|
|
<div class="content">
|
|
|
|
|
<slot></slot>
|
|
|
|
|
</div>
|
|
|
|
|
</div>`
|
|
|
|
|
})
|