-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue load Article Widget in front-end editor
- Loading branch information
Showing
14 changed files
with
115 additions
and
987 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import 'bootstrap/scss/bootstrap.scss' | ||
import Article from './Article.vue' | ||
import "vue-search-select/dist/VueSearchSelect.css" | ||
import 'vue-color-kit/dist/vue-color-kit.css' | ||
import 'quill/dist/quill.snow.css' | ||
import { Tooltip, Toast, Modal } from 'bootstrap/js/index.esm' | ||
import { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText } from '@fortawesome/vue-fontawesome' | ||
import { install as VueMonacoEditorPlugin } from '@guolao/vue-monaco-editor' | ||
import './assets/base.scss' | ||
window.Tooltip = Tooltip; | ||
window.Toast = Toast; | ||
window.Modal = Modal; | ||
const app = createApp(App); | ||
app.use(VueMonacoEditorPlugin, { | ||
paths: { | ||
// The default CDN config | ||
vs: 'https://cdn.jsdelivr.net/npm/[email protected]/min/vs' | ||
}, | ||
}); | ||
app.component('font-awesome-icon', FontAwesomeIcon); | ||
app.component('font-awesome-layers', FontAwesomeLayers); | ||
app.component('font-awesome-layers-text', FontAwesomeLayersText); | ||
app.mount('#astroid-app') | ||
let astroid_app = document.getElementById('astroid-app'); | ||
let as_widgets = document.querySelectorAll('.as-article-widget-data'); | ||
if (typeof(astroid_app) !== 'undefined' && astroid_app !== null) | ||
{ | ||
const app = createApp(App); | ||
app.use(VueMonacoEditorPlugin, { | ||
paths: { | ||
// The default CDN config | ||
vs: 'https://cdn.jsdelivr.net/npm/[email protected]/min/vs' | ||
}, | ||
}); | ||
app.component('font-awesome-icon', FontAwesomeIcon); | ||
app.component('font-awesome-layers', FontAwesomeLayers); | ||
app.component('font-awesome-layers-text', FontAwesomeLayersText); | ||
app.mount('#astroid-app') | ||
} | ||
else if (as_widgets.length > 0) { | ||
as_widgets.forEach(as_widget => { | ||
let app = createApp(Article, { | ||
widget_json_id : as_widget.id | ||
}); | ||
app.use(VueMonacoEditorPlugin, { | ||
paths: { | ||
// The default CDN config | ||
vs: 'https://cdn.jsdelivr.net/npm/[email protected]/min/vs' | ||
}, | ||
}); | ||
app.component('font-awesome-icon', FontAwesomeIcon); | ||
app.component('font-awesome-layers', FontAwesomeLayers); | ||
app.component('font-awesome-layers-text', FontAwesomeLayersText); | ||
app.mount('#'+as_widget.id); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters