Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
U
uni-app-base
Project
Project
Details
Activity
Releases
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
tangfh
uni-app-base
Commits
be64ade2
Commit
be64ade2
authored
May 19, 2023
by
tangfh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+
parent
68f5dfc1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
42 deletions
+47
-42
base-page.vue
pages/template/base-page.vue
+3
-3
base-tab.vue
pages/template/base-tab.vue
+44
-39
No files found.
pages/template/base-page.vue
View file @
be64ade2
...
...
@@ -40,16 +40,16 @@
channel
:
"ongoning"
}
},
onLoad
()
{
onLoad
(
option
)
{
var
systemInfo
=
uni
.
getSystemInfoSync
();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this
.
scrollViewHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
.
statusBarHeight
+
this
.
$refs
.
navBar
.
height
)
-
(
systemInfo
.
safeAreaInsets
.
bottom
)
-
90
/
getApp
().
globalData
.
pxToRpxScale
;
this
.
init
();
this
.
init
(
option
);
},
methods
:
{
init
()
{
init
(
option
)
{
this
.
onRefresh
()
},
onNavBarLeftClick
()
{
...
...
pages/template/base-tab.vue
View file @
be64ade2
...
...
@@ -88,7 +88,7 @@
}
}
},
onLoad
()
{
onLoad
(
option
)
{
var
systemInfo
=
uni
.
getSystemInfoSync
();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this
.
scrollViewHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
...
...
@@ -98,6 +98,13 @@
this
.
svHeight
=
this
.
swiperHeight
;
this
.
tabWidth
=
(
getApp
().
globalData
.
screenWidth
-
this
.
tabItemMargin
*
2
)
/
this
.
tabBars
.
length
;
this
.
init
(
option
);
},
methods
:
{
init
(
option
)
{
this
.
initTabBar
();
},
initTabBar
()
{
var
_this
=
this
;
setTimeout
(()
=>
{
_this
.
tabBars
.
forEach
((
tabBar
)
=>
{
...
...
@@ -135,9 +142,7 @@
});
_this
.
onRefresh
();
},
350
)
//this.loadTexts = this.$constant.LOAD_TEXTS;
},
methods
:
{
onNavBarLeftClick
()
{
uni
.
navigateBack
();
},
...
...
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