refactor(client): refactor dialog functions to improve type inference

This commit is contained in:
syuilo
2021-11-18 18:45:58 +09:00
parent 63415f1074
commit ea9aeef9d8
84 changed files with 415 additions and 460 deletions

View File

@ -29,7 +29,7 @@ export default defineComponent({
click() {
if (this.block.action === 'dialog') {
this.hpml.eval();
os.dialog({
os.alert({
text: this.hpml.interpolate(this.block.content)
});
} else if (this.block.action === 'resetRandom') {
@ -44,7 +44,7 @@ export default defineComponent({
} : {})
});
os.dialog({
os.alert({
type: 'success',
text: this.hpml.interpolate(this.block.message)
});

View File

@ -40,7 +40,7 @@ export default defineComponent({
ast = parse(props.page.script);
} catch (e) {
console.error(e);
/*os.dialog({
/*os.alert({
type: 'error',
text: 'Syntax error :('
});*/
@ -50,7 +50,7 @@ export default defineComponent({
hpml.eval();
}).catch(e => {
console.error(e);
/*os.dialog({
/*os.alert({
type: 'error',
text: e
});*/