Skip to content

Commit

Permalink
v0.1.5-添加z-paging-x demo&更新首页导航栏
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileZXLee committed Jan 21, 2024
1 parent d16c85b commit ec2c8cb
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 12 deletions.
79 changes: 79 additions & 0 deletions z-paging-x/components/index-nav/index-nav.uvue
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<template>
<view class="index-nav">
<view class="index-nav-inner" :style="navbarStyle">
<view class="index-nav-content" >
<image class="index-nav-image" src="/static/title-logo-x.png" mode="aspectFit"></image>
<text class="index-nav-version">0.1.5</text>
</view>
</view>
</view>
</template>

<script>
export default {
name: "index-nav",
data() {
return {
statusBarHeight: 0
};
},
computed: {
navbarStyle() : string {
return `margin-top:${this.statusBarHeight}px`
}
},
created() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
},
mounted() {
setTimeout(() => {
uni.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
}, 100)
},
methods: {
back() {
uni.navigateBack({})
}
},
}
</script>

<style>
.index-nav {
border: 1px #eee solid;
background-color: #fff;
}
.index-nav-inner {
position: relative;
display: flex;
flex-direction: row;
justify-content: space-between;
height: 45px;
}

.index-nav-content {
position: absolute;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.index-nav-image {
width: 540rpx;
}
.index-nav-version {
background-color: #007AFF;
font-size: 24rpx;
color: white;
padding: 6rpx 12rpx;
border-radius: 6rpx;
}
</style>
3 changes: 2 additions & 1 deletion z-paging-x/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "z-paging x"
"navigationBarTitleText": "z-paging x",
"navigationStyle": "custom"
}
},
{
Expand Down
24 changes: 13 additions & 11 deletions z-paging-x/pages/index/index.uvue
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<template>
<view class="content">
<view class="demo-list">
<view class="demo-item" v-for="(item,index) in list" :key="index" @click="itemClick(item)">
<view class="demo-item-main">
<text class="demo-item-title">{{item.title}}</text>
<text class="demo-item-subtitle" v-if="item.subTitle.length">{{item.subTitle}}</text>
<text class="demo-item-file-text">{{item.file + '.uvue'}}</text>
</view>
<image class="demo-item-more-img" src="../../static/more_icon.png"></image>
<z-paging-x :refresher-enabled="false">
<template #top>
<index-nav />
</template>
<list-item class="demo-item" v-for="(item,index) in list" :key="index" @click="itemClick(item)">
<view class="demo-item-main">
<text class="demo-item-title">{{item.title}}</text>
<text class="demo-item-subtitle" v-if="item.subTitle.length">{{item.subTitle}}</text>
<text class="demo-item-file-text">{{item.file + '.uvue'}}</text>
</view>
</view>
</view>
<image class="demo-item-more-img" src="../../static/more_icon.png"></image>
</list-item>
</z-paging-x>
</template>

<script lang="uts">
Expand Down Expand Up @@ -42,6 +43,7 @@
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
border-bottom: #eeeeee solid 1px;
padding: 20rpx 30rpx;
}
Expand Down
Binary file added z-paging-x/static/title-logo-x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions z-paging-x/uni_modules/z-paging-x/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# z-paging-x

<p align="center">
<img alt="logo" src="https://z-paging.zxlee.cn/img/title-logo-x.png" height="100" style="margin-bottom: 50px;">
</p>

> z-paging uniapp x版
[![version](https://img.shields.io/badge/version-0.1.5-blue)](https://github.com/SmileZXLee/uni-z-paging-x)
Expand Down

0 comments on commit ec2c8cb

Please sign in to comment.