mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 14:20:25 +08:00
实现公用的IP名单
This commit is contained in:
37
web/public/js/components/common/tip-message-box.js
Normal file
37
web/public/js/components/common/tip-message-box.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// 信息提示窗口
|
||||
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>
|
||||
<i class="close icon" title="取消" @click.prevent="close"></i>
|
||||
<div class="content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
Reference in New Issue
Block a user