Vue.component("http-pages-box", { props: ["v-pages"], data: function () { let pages = [] if (this.vPages != null) { pages = this.vPages } return { pages: pages } }, methods: { addPage: function () { let that = this teaweb.popup("/servers/server/settings/pages/createPopup", { height: "26em", callback: function (resp) { that.pages.push(resp.data.page) } }) }, updatePage: function (pageIndex, pageId) { let that = this teaweb.popup("/servers/server/settings/pages/updatePopup?pageId=" + pageId, { height: "26em", callback: function (resp) { Vue.set(that.pages, pageIndex, resp.data.page) } }) }, removePage: function (pageIndex) { let that = this teaweb.confirm("确定要移除此页面吗?", function () { that.pages.$remove(pageIndex) }) } }, template: `
` })