Fix build issues

This commit is contained in:
Garrett Mills 2022-04-09 10:56:54 -05:00
parent 51266861f8
commit a7266b3a21
2 changed files with 7 additions and 1 deletions

View File

@ -2,15 +2,20 @@
import {MathPage} from '../support/page' import {MathPage} from '../support/page'
import {v4 as uuidv4} from 'uuid' import {v4 as uuidv4} from 'uuid'
import Statement from './Statement.vue' import Statement from './Statement.vue'
import {MathStatement} from '../support/parse'
const page = new MathPage(uuidv4()) const page = new MathPage(uuidv4())
const stmt1Id = page.addRaw('x = y+3/4') const stmt1Id = page.addRaw('x = y+3/4')
const stmt2Id = page.addRaw('y = 9') const stmt2Id = page.addRaw('y = 9')
const evaluation = page.evaluate() const evaluation = page.evaluate()
const stmt = page.getStatement(stmt1Id)
console.log({page, stmt1Id}) console.log({page, stmt1Id})
const onEdit = (stmt: MathStatement) => () => console.log('edit', stmt)
</script> </script>
<template> <template>
<p>Scratch page for testing!</p> <p>Scratch page for testing!</p>
<Statement :statement="page.getStatement(stmt1Id)" :evaluation="evaluation"/> <Statement v-if="stmt" :statement="stmt" :evaluation="evaluation"/>
</template> </template>

View File

@ -30,6 +30,7 @@ computed(() => value = getValueStatement())
<template> <template>
<div class="math-statement"> <div class="math-statement">
<Katex :statement="statement" size="big"/> <Katex :statement="statement" size="big"/>
<div class="result" v-if="value"> <div class="result" v-if="value">
<hr v-if="value" style="border: 1px solid #ccc; border-bottom: 0"> <hr v-if="value" style="border: 1px solid #ccc; border-bottom: 0">