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) that.notifyChange() } }) }, 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) that.notifyChange() } }) }, removePage: function (pageIndex) { let that = this teaweb.confirm("确定要移除此页面吗?", function () { that.pages.$remove(pageIndex) that.notifyChange() }) }, notifyChange: function () { let parent = this.$el.parentNode while (true) { if (parent == null) { break } if (parent.tagName == "FORM") { break } parent = parent.parentNode } if (parent != null) { setTimeout(function () { Tea.runActionOn(parent) }, 100) } } }, template: `
响应状态码 页面类型 新状态码 例外URL 限制URL 操作
{{page.status[0]}} {{page.status}}
{{page.url}}
读取URL
{{page.url}}
跳转URL {{page.newStatus}}
[HTML内容]
{{page.newStatus}}
{{page.newStatus}} 保持
{{urlPattern.pattern}}
-
{{urlPattern.pattern}}
-
修改   删除
` })