Skip to content

Commit

Permalink
v2.5.1-优化首页样式
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileZXLee committed Feb 1, 2023
1 parent 9479e1a commit a9bbd6b
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 9 deletions.
60 changes: 60 additions & 0 deletions z-paging/components/index-nav/index-nav.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<template>
<u-navbar :background="{'background-color': 'rgb(248, 248, 248)'}" :isBack="false">
<view style="display: flex;align-items: flex-end;justify-content: center;width: 100%;" @click="navClick">
<image style="width: 180px;height: 28px;" src="https://z-paging.zxlee.cn/img/title-logo.png"></image>
<view style="display: flex;">
<view class="version-tag version-text">v{{version}}</view>
<!-- #ifdef VUE2 -->
<view class="version-tag vue-version-text">vue2</view>
<!-- #endif -->
<!-- #ifdef VUE3 -->
<view class="version-tag vue-version-text">vue3</view>
<!-- #endif -->
</view>
</view>
</u-navbar>
</template>

<script>
import { version } from '@/uni_modules/z-paging/package.json'
export default {
name:"index-nav",
data() {
return {
version
};
},
methods: {
navClick() {
const url = 'https://z-paging.zxlee.cn/';
// #ifdef APP-PLUS
plus.runtime.openURL(url);
// #endif
// #ifdef H5
window.open(url);
// #endif
}
},
}
</script>

<style scoped>
.version-tag {
font-weight: bold;
color: white;
padding: 1px 4px;
border-radius: 4rpx;
font-size: 12px;
transform: scale(0.85);
margin-left: -2px;
margin-bottom: 3px;
}
.version-text {
background-color: #007AFF;
}
.vue-version-text {
background-color: #3eaf7c;
}
</style>
3 changes: 2 additions & 1 deletion z-paging/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"
"navigationBarTitleText": "z-paging",
"navigationStyle": "custom"
}
}, {
"path": "pages/common-demo/common-demo",
Expand Down
13 changes: 7 additions & 6 deletions z-paging/pages/index/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<template>
<view class="content">
<z-paging ref="paging" refresher-only @onRefresh="onRefresh">

<!-- 自定义导航栏 -->
<template #top>
<index-nav />
</template>

<!-- 自定义下拉刷新view -->
<template #refresher>
<view style="height: 120rpx;display: flex;justify-content: center;align-items: center;">
<image style="width: 300rpx;height: 60rpx;" src="../../static/logo_loading.gif"></image>
Expand Down Expand Up @@ -28,7 +35,6 @@
</template>

<script>
import { version } from '@/uni_modules/z-paging/package.json'
import indexList from './list'
export default {
data() {
Expand All @@ -40,10 +46,6 @@
// #ifdef APP-PLUS
this.list = this.list.concat(indexList.listNvue);
// #endif
uni.setNavigationBarTitle({
title: `z-paging(v${version})`
})
},
methods: {
//下拉刷新被触发
Expand All @@ -58,7 +60,6 @@
uni.navigateTo({
url: `../${item.file}/${item.file}`
})
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>

<!-- 以下内容极为重要!!!!!!!! -->
<!-- cell中的内容必须写在zp-public-virtual-cell组件中,必须在项目的components目录下创建名为zp-public-virtual-cell的组件 -->
<!-- cell中的内容必须写在zp-public-virtual-cell.vue文件中,必须在项目的components目录下创建名为zp-public-virtual-cell的组件 -->


<!-- 放在所有cell上方的用slot="header"插入,放在所有cell下方的用slot="footer"插入 -->
Expand Down
8 changes: 7 additions & 1 deletion z-paging/uni_modules/z-paging/readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# z-paging

[![version](https://img.shields.io/badge/version-2.5.0-blue)](https://github.com/SmileZXLee/uni-z-paging)
<p align="center">
<img alt="logo" src="https://z-paging.zxlee.cn/img/title-logo.png" height="100" style="margin-bottom: 50px;">
</p>

[![version](https://img.shields.io/badge/version-2.5.1-blue)](https://github.com/SmileZXLee/uni-z-paging)
[![license](https://img.shields.io/github/license/SmileZXLee/uni-z-paging)](https://en.wikipedia.org/wiki/MIT_License)

### 插件文档地址:[https://z-paging.zxlee.cn](https://z-paging.zxlee.cn)

### 更新插件前,请注意[版本差异](https://z-paging.zxlee.cn/start/upgrade-guide.html)

***
### 功能&特点
* 【配置简单】仅需两步(绑定网络请求方法、绑定分页结果数组)轻松完成完整下拉刷新,上拉加载更多功能。
Expand Down

0 comments on commit a9bbd6b

Please sign in to comment.