Merge branch 'main' into ui
This commit is contained in:
commit
43e067d5f0
@ -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>
|
||||||
|
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user