1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 21:58:58 +09:00
This commit is contained in:
NoriDev 2023-07-04 16:25:39 +09:00
parent 57c5c4b4de
commit 38254c1c2a
2 changed files with 0 additions and 57 deletions

View File

@ -1,23 +0,0 @@
<template>
<XFormula :formula="formula" :block="block"/>
</template>
<script lang="ts">
import { defineComponent, defineAsyncComponent } from 'vue';
export default defineComponent({
components: {
XFormula: defineAsyncComponent(() => import('@/components/MkFormulaCore.vue')),
},
props: {
formula: {
type: String,
required: true,
},
block: {
type: Boolean,
required: true,
},
},
});
</script>

View File

@ -1,34 +0,0 @@
<!-- eslint-disable vue/no-v-html -->
<template>
<div v-if="block" v-html="compiledFormula"></div>
<span v-else v-html="compiledFormula"></span>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import temml from '../../node_modules/temml/dist/temml.cjs';
export default defineComponent({
props: {
formula: {
type: String,
required: true,
},
block: {
type: Boolean,
required: true,
},
},
computed: {
compiledFormula(): any {
return temml.renderToString(this.formula, {
throwOnError: false,
} as any);
},
},
});
</script>
<style>
@import "../../node_modules/temml/dist/Temml-Local.css";
</style>