From 2ee0e07bb6346d29bc5e57ec8aac348143e2d50f Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 20 Apr 2020 21:35:27 +0900 Subject: refactor(client): :sparkles: --- src/client/components/page/page.button.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/client/components/page/page.button.vue') diff --git a/src/client/components/page/page.button.vue b/src/client/components/page/page.button.vue index 148fdc8e9c..83753b4e80 100644 --- a/src/client/components/page/page.button.vue +++ b/src/client/components/page/page.button.vue @@ -1,6 +1,6 @@ @@ -16,35 +16,35 @@ export default Vue.extend({ value: { required: true }, - script: { + hpml: { required: true } }, methods: { click() { if (this.value.action === 'dialog') { - this.script.eval(); + this.hpml.eval(); this.$root.dialog({ - text: this.script.interpolate(this.value.content) + text: this.hpml.interpolate(this.value.content) }); } else if (this.value.action === 'resetRandom') { - this.script.aoiScript.updateRandomSeed(Math.random()); - this.script.eval(); + this.hpml.updateRandomSeed(Math.random()); + this.hpml.eval(); } else if (this.value.action === 'pushEvent') { this.$root.api('page-push', { - pageId: this.script.page.id, + pageId: this.hpml.page.id, event: this.value.event, ...(this.value.var ? { - var: this.script.vars[this.value.var] + var: this.hpml.vars[this.value.var] } : {}) }); this.$root.dialog({ type: 'success', - text: this.script.interpolate(this.value.message) + text: this.hpml.interpolate(this.value.message) }); } else if (this.value.action === 'callAiScript') { - this.script.callAiScript(this.value.fn); + this.hpml.callAiScript(this.value.fn); } } } -- cgit v1.2.3-freya