Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
5a92348b
Commit
5a92348b
authored
Aug 12, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全局悬浮框
parent
a9fe9256
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
App.vue
src/App.vue
+11
-0
fab.vue
src/Components/fab/fab.vue
+2
-2
No files found.
src/App.vue
View file @
5a92348b
<
script
setup
>
import
Fab
from
'@/Components/fab/fab.vue'
;
import
{
createApp
}
from
'vue'
;
onLaunch
(()
=>
{});
onShow
(()
=>
{
console
.
log
(
'App Show'
);
});
onMounted
(()
=>
{
const
globalComponentContainer
=
document
.
createElement
(
'div'
);
globalComponentContainer
.
id
=
'global-component-container'
;
// 将这个元素插入到 body 中
document
.
body
.
appendChild
(
globalComponentContainer
);
// 使用 Vue 创建一个新的应用实例并挂载到新创建的 DOM 元素中
createApp
(
Fab
).
mount
(
'#global-component-container'
);
});
onHide
(()
=>
{
console
.
log
(
'App Hide'
);
});
...
...
src/Components/fab/fab.vue
View file @
5a92348b
...
...
@@ -8,11 +8,11 @@
inactiveIcon=
"a-controlplatform"
>
<view
class=
"custom-button"
@
click=
"go('/pages/ticket/ticket')"
>
<image
class=
"fab-icon"
src=
"
@
/static/index/coupon.png"
></image>
<image
class=
"fab-icon"
src=
"
../..
/static/index/coupon.png"
></image>
<text
class=
"fab-text"
>
优惠券
</text>
</view>
<view
class=
"custom-button"
@
click=
"go('/pages/order/order')"
>
<image
class=
"fab-icon"
src=
"
@
/static/index/order.png"
></image>
<image
class=
"fab-icon"
src=
"
../..
/static/index/order.png"
></image>
<text
class=
"fab-text"
>
订单
</text>
</view>
</wd-fab>
...
...
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