mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-25 07:36:18 +09:00
Revert "[Client] Load katex async to reduce bundle size"
This reverts commit 37e3d60ade0c742591d2a4d18a79b8de0b67a637.
This commit is contained in:
parent
6c398ba877
commit
369473f6db
@ -4,6 +4,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as katex from 'katex';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
@ -12,14 +13,10 @@ export default Vue.extend({
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
compiledFormula: null
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
const katex = await import('katex').then(m => m.default);
|
||||
this.compiledFormula = katex.renderToString(this.formula);
|
||||
computed: {
|
||||
compiledFormula(): any {
|
||||
return katex.renderToString(this.formula);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user