Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
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
marketing-web
marketing
Commits
8f40443b
Commit
8f40443b
authored
May 09, 2022
by
crushh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/微前端' into dev
parents
07bb1c2e
81da83fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
main.js
src/main.js
+12
-18
No files found.
src/main.js
View file @
8f40443b
...
...
@@ -37,35 +37,29 @@ Vue.prototype.$tips = function({ message = '提示', type = 'success' }) {
let
instance
=
null
;
function
render
(
props
=
{})
{
const
{
container
}
=
props
;
instance
=
new
Vue
({
router
,
store
,
render
:
h
=>
h
(
App
)
}).
$mount
(
container
?
container
.
querySelector
(
'#app'
)
:
'#app'
);
}
// 独立运行时
if
(
!
window
.
__POWERED_BY_QIANKUN__
)
{
console
.
log
(
'独立运行'
);
limit
({
createApp
()
{
window
.
getLimit
(
router
,
'marketing'
).
then
(()
=>
{
render
();
window
.
getLimit
(
router
,
'marketing'
,
'/marketing/'
).
then
(()
=>
{
instance
=
new
Vue
({
router
,
store
,
render
:
h
=>
h
(
App
)
}).
$mount
(
container
?
container
.
querySelector
(
'#app'
)
:
'#app'
);
});
}
});
}
// 独立运行时
if
(
!
window
.
__POWERED_BY_QIANKUN__
)
{
console
.
log
(
'独立运行'
);
render
();
}
export
async
function
bootstrap
()
{
console
.
log
(
'[vue] vue app bootstraped'
);
}
export
async
function
mount
(
props
)
{
limit
({
createApp
()
{
window
.
getLimit
(
router
,
'marketing'
).
then
(()
=>
{
render
();
});
}
});
render
();
}
export
async
function
unmount
()
{
instance
.
$destroy
();
...
...
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