Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiit-liri-pc-page-div
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伟豪
weiit-liri-pc-page-div
Commits
ce5391b1
Commit
ce5391b1
authored
Nov 05, 2025
by
Hao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
2c958c2d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
6 deletions
+48
-6
src/public-path.js
+4
-0
src/shopTab/index.vue
+0
-0
src/util/ajax.js
+0
-1
test/shopHome.js
+33
-2
vue.config.js
+11
-3
No files found.
src/public-path.js
0 → 100644
View file @
ce5391b1
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
__webpack_public_path__
=
window
.
__INJECTED_PUBLIC_PATH_BY_QIANKUN__
;
}
\ No newline at end of file
src/shopTab/index.vue
View file @
ce5391b1
src/util/ajax.js
View file @
ce5391b1
...
...
@@ -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
=
{
...
...
test/shopHome.js
View file @
ce5391b1
...
...
@@ -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
({
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
(
"#app"
);
}).
$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");
vue.config.js
View file @
ce5391b1
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
};
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment