refactor(client): refactor dialog functions to improve type inference
This commit is contained in:
@ -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)
|
||||
});
|
||||
|
@ -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
|
||||
});*/
|
||||
|
Reference in New Issue
Block a user