This commit is contained in:
37
ayanova/src/components/wiki-control.vue
Normal file
37
ayanova/src/components/wiki-control.vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-col cols="12">
|
||||||
|
<span class="v-label v-label--active theme--light">
|
||||||
|
{{ $ay.t("WikiPage") }}
|
||||||
|
</span>
|
||||||
|
<v-sheet elevation="4" color="light-gray" v-html="compiledOutput" class="pa-2 pa-sm-6">
|
||||||
|
<!-- <div v-html="compiledOutput"></div> -->
|
||||||
|
</v-sheet>
|
||||||
|
<div>raw Content: {{ content }}</div>
|
||||||
|
</v-col>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import marked from "marked";
|
||||||
|
export default {
|
||||||
|
data: () => ({}),
|
||||||
|
props: {
|
||||||
|
content: String
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
compiledOutput() {
|
||||||
|
//return marked(this.content, { sanitize: true });
|
||||||
|
return marked(this.content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
todo:
|
||||||
|
put the output on a paper element so it's raised and delineated
|
||||||
|
figure out why parts are fucked (blockquote)
|
||||||
|
remove extra spacing on sides in xs mode (gutters maybe on column or row?)
|
||||||
|
Show/hide/edit control
|
||||||
|
|
||||||
|
*/
|
||||||
|
</script>
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<v-col cols="12">
|
|
||||||
<span class="v-label v-label--active theme--light">
|
|
||||||
{{ $ay.t("WikiPage") }}
|
|
||||||
</span>
|
|
||||||
<div v-html="compiledOutput"></div>
|
|
||||||
<div>raw Content: {{ content }}</div>
|
|
||||||
</v-col>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import marked from "marked";
|
|
||||||
export default {
|
|
||||||
data: () => ({}),
|
|
||||||
props: {
|
|
||||||
content: String
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
compiledOutput() {
|
|
||||||
return marked(this.content, { sanitize: true });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* //markdown viewer
|
|
||||||
Vue.filter("marked", function vueMarkedFilter(value) {
|
|
||||||
return marked(value, { sanitize: true });
|
|
||||||
});
|
|
||||||
|
|
||||||
*/
|
|
||||||
</script>
|
|
||||||
@@ -15,7 +15,6 @@ import { DateTime } from "luxon";
|
|||||||
import VueCurrencyInput from "vue-currency-input";
|
import VueCurrencyInput from "vue-currency-input";
|
||||||
import lodash from "./libs/lodash.min.js";
|
import lodash from "./libs/lodash.min.js";
|
||||||
|
|
||||||
|
|
||||||
//my libs
|
//my libs
|
||||||
import errorhandler from "./api/errorhandler";
|
import errorhandler from "./api/errorhandler";
|
||||||
import ayaNovaVersion from "./api/ayanova-version";
|
import ayaNovaVersion from "./api/ayanova-version";
|
||||||
@@ -46,7 +45,7 @@ import decimalControl from "./components/decimal-control.vue";
|
|||||||
import errorControl from "./components/error-control.vue";
|
import errorControl from "./components/error-control.vue";
|
||||||
import reportSelectorControl from "./components/report-selector-control.vue";
|
import reportSelectorControl from "./components/report-selector-control.vue";
|
||||||
import reportViewerControl from "./components/report-viewer-control.vue";
|
import reportViewerControl from "./components/report-viewer-control.vue";
|
||||||
import wikiViewerControl from "./components/wiki-viewer-control.vue";
|
import wikiControl from "./components/wiki-control.vue";
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// LIBS AND GLOBAL ITEMS
|
// LIBS AND GLOBAL ITEMS
|
||||||
@@ -176,7 +175,7 @@ Vue.component("gz-decimal", decimalControl);
|
|||||||
Vue.component("gz-error", errorControl);
|
Vue.component("gz-error", errorControl);
|
||||||
Vue.component("gz-report-selector", reportSelectorControl);
|
Vue.component("gz-report-selector", reportSelectorControl);
|
||||||
Vue.component("gz-report-viewer", reportViewerControl);
|
Vue.component("gz-report-viewer", reportViewerControl);
|
||||||
Vue.component("gz-wiki-viewer", wikiViewerControl);
|
Vue.component("gz-wiki", wikiControl);
|
||||||
|
|
||||||
//3rd party components
|
//3rd party components
|
||||||
Vue.use(VueCurrencyInput);
|
Vue.use(VueCurrencyInput);
|
||||||
|
|||||||
@@ -205,8 +205,8 @@
|
|||||||
></gz-custom-fields>
|
></gz-custom-fields>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<gz-wiki-viewer :content="obj.wikiContent"
|
<gz-wiki :content="obj.wikiContent"></gz-wiki
|
||||||
/></v-col>
|
></v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|||||||
Reference in New Issue
Block a user