mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 20:13:09 +02:00
Revert "[Client] Load katex async to reduce bundle size"
This reverts commit 37e3d60ade
.
This commit is contained in:
parent
37e3d60ade
commit
23d8235197
1 changed files with 5 additions and 8 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import * as katex from 'katex';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -12,14 +13,10 @@ export default Vue.extend({
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
computed: {
|
||||||
return {
|
compiledFormula(): any {
|
||||||
compiledFormula: null
|
return katex.renderToString(this.formula);
|
||||||
};
|
}
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
const katex = await import('katex').then(m => m.default);
|
|
||||||
this.compiledFormula = katex.renderToString(this.formula);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue