提交 338ad3ef 作者: 翁进城

feat: qiankun改造完成

上级 595acb3a
{ {
"name": "iframe1", "name": "FKZX",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint",
"v": "webpack --version"
}, },
"dependencies": { "dependencies": {
"core-js": "^3.8.3", "core-js": "^3.8.3",
"element-ui": "^2.15.14", "element-ui": "^2.15.14",
"js-base64": "^3.7.7", "js-base64": "^3.7.7",
"url-loader": "^4.1.1",
"vue": "^2.6.14" "vue": "^2.6.14"
}, },
"devDependencies": { "devDependencies": {
...@@ -36,7 +38,9 @@ ...@@ -36,7 +38,9 @@
"parserOptions": { "parserOptions": {
"parser": "@babel/eslint-parser" "parser": "@babel/eslint-parser"
}, },
"rules": {} "rules": {
"no-unused-vars": "off"
}
}, },
"browserslist": [ "browserslist": [
"> 1%", "> 1%",
......
...@@ -8,12 +8,11 @@ ...@@ -8,12 +8,11 @@
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="./cesium/Widgets/widgets.css"> <link rel="stylesheet" href="./cesium/Widgets/widgets.css">
<script src="./cesium/Cesium.js"></script> <script src="./cesium/Cesium.js"></script>
<script src="./js/icontfont.js"></script> <script async src="./js/icontfont.js"></script>
<script type="text/javascript" src="./js/nipplejs.min.js"></script> <script async type="text/javascript" src="./js/nipplejs.min.js"></script>
<script src="./s3m.js"></script> <script async src="QingLiu/PIMediaPlayer_api.js"></script>
<script src="QingLiu/PIMediaPlayer_api.js"></script> <script async type="text/javascript" src="QingLiu/kbt_api.js"></script>
<script type="text/javascript" src="QingLiu/kbt_api.js"></script> <script async src="liveplayer/liveplayer-lib.min.js"></script>
<script src="liveplayer/liveplayer-lib.min.js"></script>
</head> </head>
<body> <body>
<noscript> <noscript>
......
import Vue from 'vue' import Vue from "vue";
import Vuex from 'vuex'; import Vuex from "vuex";
import App from './App.vue' import App from "./App.vue";
import ElementUI from "element-ui"; import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css"; import "element-ui/lib/theme-chalk/index.css";
/* import MMCSTL from '../../dist/index'; /* import MMCSTL from '../../dist/index';
import '../../dist/style/index.css'; */ import '../../dist/style/index.css'; */
import MMCSTL from '../../index'; import MMCSTL from "../../index";
import './styles/reset.css'; import "./styles/reset.css";
Vue.config.productionTip = false Vue.config.productionTip = false;
Vue.use(Vuex); Vue.use(Vuex);
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.use(MMCSTL); Vue.use(MMCSTL);
new Vue({ let router = null;
render: h => h(App), let instance = null;
store: new Vuex.Store({}), function render(props = {}) {
}).$mount('#app') const { container } = props;
instance = new Vue({
render: (h) => h(App),
store: new Vuex.Store({}),
}).$mount(container ? container.querySelector('#app') : '#app');
}
// 独立运行时
if (!window.__POWERED_BY_QIANKUN__) {
render();
}
export async function bootstrap() {
console.log('[vue] vue app bootstraped');
}
export async function mount(props) {
console.log('[vue] props from main framework', props);
render(props);
}
export async function unmount() {
instance.$destroy();
instance.$el.innerHTML = '';
instance = null;
router = null;
}
\ No newline at end of file
if (window.__POWERED_BY_QIANKUN__) {
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
const { defineConfig } = require("@vue/cli-service"); const { defineConfig } = require("@vue/cli-service");
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin"); // 引入 const NodePolyfillPlugin = require("node-polyfill-webpack-plugin"); // 引入
const packageName = require('./package.json').name;
const publicPath = process.env.NODE_ENV === 'production' ? 'https://tmj-v4.t.mmcuav.cn/tmj_fkzx_v4/' : `//localhost:9000`;
module.exports = defineConfig({ module.exports = defineConfig({
publicPath: "./", // publicPath: "./",
publicPath: publicPath,
transpileDependencies: true, transpileDependencies: true,
productionSourceMap: false, productionSourceMap: false,
configureWebpack: { configureWebpack: {
plugins: [new NodePolyfillPlugin()], plugins: [new NodePolyfillPlugin()],
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd',
chunkLoadingGlobal: `webpackJsonp_${packageName}`,
},
}, },
devServer: { devServer: {
https: false, https: false,
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
this.viewer.imageryLayers.addImageryProvider( this.viewer.imageryLayers.addImageryProvider(
new Cesium.UrlTemplateImageryProvider({ new Cesium.UrlTemplateImageryProvider({
url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
maximumLevel: 18, maximumLevel: 17,
}) })
); );
// 星图地球卫星影像 https://datacloud.geovisearth.com/ // 星图地球卫星影像 https://datacloud.geovisearth.com/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论