// 可以展示更多条目的角图表 Vue.component("more-items-angle", { props: ["v-data-url", "v-url"], data: function () { return { visible: false } }, methods: { show: function () { this.visible = !this.visible if (this.visible) { this.showBox() } else { this.hideBox() } }, showBox: function () { let that = this this.visible = true Tea.action(this.vDataUrl) .params({ url: this.vUrl }) .post() .success(function (resp) { let groups = resp.data.groups let boxLeft = that.$el.offsetLeft + 120; let boxTop = that.$el.offsetTop + 70; let box = document.createElement("div") box.setAttribute("id", "more-items-box") box.style.cssText = "z-index: 100; position: absolute; left: " + boxLeft + "px; top: " + boxTop + "px; max-height: 30em; overflow: auto; border-bottom: 1px solid rgba(34,36,38,.15)" document.body.append(box) let menuHTML = "