|
@@ -3,8 +3,16 @@
|
|
|
<ContentContainer :containerStyle="containerStyle">
|
|
<ContentContainer :containerStyle="containerStyle">
|
|
|
<template v-if="!is_mounted"></template>
|
|
<template v-if="!is_mounted"></template>
|
|
|
|
|
|
|
|
- <WujieVue v-if="is_mounted" width="100%" height="100%" name="xiaoshu" :url="xiaoshu_server_url" :sync="false"
|
|
|
|
|
- :props="props" :plugins="plugins"></WujieVue>
|
|
|
|
|
|
|
+ <WujieVue
|
|
|
|
|
+ v-if="is_mounted"
|
|
|
|
|
+ width="100%"
|
|
|
|
|
+ height="100%"
|
|
|
|
|
+ name="xiaoshu"
|
|
|
|
|
+ :url="xiaoshu_server_url"
|
|
|
|
|
+ :sync="false"
|
|
|
|
|
+ :props="props"
|
|
|
|
|
+ :plugins="plugins"
|
|
|
|
|
+ ></WujieVue>
|
|
|
</ContentContainer>
|
|
</ContentContainer>
|
|
|
<!-- </LayoutExperience> -->
|
|
<!-- </LayoutExperience> -->
|
|
|
</template>
|
|
</template>
|
|
@@ -50,12 +58,14 @@ onMounted(() => {
|
|
|
/**
|
|
/**
|
|
|
* 插入到小数项目中的脚本
|
|
* 插入到小数项目中的脚本
|
|
|
*/
|
|
*/
|
|
|
- const insert_script_str = `
|
|
|
|
|
|
|
+ const insert_script_before_str = `
|
|
|
window.WEBSOCKET_BASE_URL = '${xiaoshu_websocket_url}';
|
|
window.WEBSOCKET_BASE_URL = '${xiaoshu_websocket_url}';
|
|
|
window.ASSETS_BASE_URL = '${xiaoshu_assets_url}';
|
|
window.ASSETS_BASE_URL = '${xiaoshu_assets_url}';
|
|
|
|
|
|
|
|
localStorage.setItem('xintongxiaoshu', '${info_str}');
|
|
localStorage.setItem('xintongxiaoshu', '${info_str}');
|
|
|
|
|
+ `;
|
|
|
|
|
|
|
|
|
|
+ const insert_script_after_str = `
|
|
|
const box = document.querySelector('.xiaoshu-aside-left-menus-container');
|
|
const box = document.querySelector('.xiaoshu-aside-left-menus-container');
|
|
|
|
|
|
|
|
if(box){
|
|
if(box){
|
|
@@ -105,10 +115,18 @@ onMounted(() => {
|
|
|
plugins.value = [
|
|
plugins.value = [
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 在子应用所有的js之前
|
|
|
* @see https://wujie-micro.github.io/doc/guide/plugin.html#js-before-loaders
|
|
* @see https://wujie-micro.github.io/doc/guide/plugin.html#js-before-loaders
|
|
|
*/
|
|
*/
|
|
|
- // 在子应用所有的js之后
|
|
|
|
|
- jsAfterLoaders: [{ content: insert_script_str }]
|
|
|
|
|
|
|
+ jsBeforeLoaders: [{ content: insert_script_before_str }]
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 在子应用所有的js之后
|
|
|
|
|
+ * @see https://wujie-micro.github.io/doc/guide/plugin.html#js-after-loader
|
|
|
|
|
+ */
|
|
|
|
|
+ jsAfterLoaders: [{ content: insert_script_after_str }]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
cssAfterLoaders: [
|
|
cssAfterLoaders: [
|