Commit ce5391b1 by Hao

add

parent 2c958c2d
if (window.__POWERED_BY_QIANKUN__) {
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
\ No newline at end of file
......@@ -29,7 +29,7 @@
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="44383"
p-id="44383"
>
<path
d="M692.071703 329.86173c-48.372707-48.387034-112.705921-75.023694-181.146687-75.023694-68.440765 0-132.747373 26.63666-181.148733 75.023694-48.400337 48.374754-75.022671 112.707968-75.022671 181.123151s26.623357 132.74635 75.022671 181.146687c48.374754 48.402383 112.707968 75.023694 181.148733 75.023694 68.441788 0 132.745327-26.647917 181.146687-75.023694 48.427966-48.373731 75.024717-112.706945 75.024717-181.146687C767.096421 442.544115 740.447481 378.237507 692.071703 329.86173z"
......
......@@ -16,7 +16,6 @@ service.interceptors.request.use(
config.headers["tenant-id"] = tenantid;
// (config.headers["tenantName"] = "master");
if (config.method == "get") {
if (config.url.indexOf("sys/dict/getDictItems") < 0) {
config.params = {
......
......@@ -4,6 +4,37 @@ import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
Vue.use(Antd);
Vue.config.productionTip = false;
new Vue({
render: (h) => h(shopHome),
}).$mount("#app");
let router=null;
let instance = null;
function render(props = {}) {
const { container } = props;
// router = new VueRouter({
// base: window.__POWERED_BY_QIANKUN__ ? '/app-vue/' : '/',
// mode: 'history',
// routes,
// });
instance = new Vue({
render: (h) => h(shopHome),
}).$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;
}
// new Vue({
// render: (h) => h(shopHome),
// }).$mount("#app");
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const data = require("./mock.js");
const { name } = require('./package');
module.exports = {
lintOnSave: false,
// 多页面配置
......@@ -12,7 +12,7 @@ module.exports = {
template: "public/index.html",
},
// 管理入口
index: {
appVue: {
entry: "test/shopHome.js",
template: "public/index.html",
},
......@@ -27,8 +27,10 @@ module.exports = {
template: "public/index.html",
},
},
// configureWebpack是对象就是合入,是方法就直接修改配置
devServer: {
headers:{
"Access-Control-Allow-Origin": "*",
},
after: (app) => {
if (!app) {
throw new Error("webpack-dev-server is not defined");
......@@ -59,5 +61,11 @@ module.exports = {
])
);
}
config.output = {
...config.output,
library: `${name}-[name]`,
libraryTarget: "umd", //把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${name}`, // webpack 5 需要把 jsonpFunction 替换成 chunkLoadingGlobal
};
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment