Commit fad8df8e authored by wlxuqu's avatar wlxuqu

1. 修复tag组件主题色可能无效的问题

2. 修复navbar的custom-back无效的问题
parent e0ec5ac8
[*]
#缩进风格:空格
indent_style = space
#缩进大小2
indent_size = 4
#换行符lf
end_of_line = lf
#字符集utf-8
charset = utf-8
#是否删除行尾的空格
trim_trailing_whitespace = true
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "uView", "name" : "uView",
"appid" : "__UNI__60F4B81", "appid" : "__UNI__60F4B81",
"description" : "多平台快速开发的UI框架", "description" : "多平台快速开发的UI框架",
"versionName" : "1.3.8", "versionName" : "1.4.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
......
...@@ -4,14 +4,11 @@ ...@@ -4,14 +4,11 @@
<view class="u-demo-title">演示效果</view> <view class="u-demo-title">演示效果</view>
<view class="u-demo-area"> <view class="u-demo-area">
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>
<u-tag :text="text" :type="type" :shape="shape" :closeable="closeable" :mode="mode" <u-tag :text="text" :type="type" :shape="shape" :closeable="closeable" :mode="mode" @close="close" @click="click" :show="show" :size="size" />
@close="close" @click="click" :show="show" :size="size"/>
</view> </view>
</view> </view>
<view class="u-config-wrap"> <view class="u-config-wrap">
<view class="u-config-title u-border-bottom"> <view class="u-config-title u-border-bottom">参数配置</view>
参数配置
</view>
<view class="u-config-item"> <view class="u-config-item">
<view class="u-item-title">模式选择</view> <view class="u-item-title">模式选择</view>
<u-subsection vibrateShort :list="['light', 'dark', 'plain']" @change="modeChange"></u-subsection> <u-subsection vibrateShort :list="['light', 'dark', 'plain']" @change="modeChange"></u-subsection>
...@@ -41,7 +38,7 @@ ...@@ -41,7 +38,7 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
text: '蒹葭苍苍', text: '蒹葭苍苍',
...@@ -51,7 +48,7 @@ ...@@ -51,7 +48,7 @@
shape: 'square', shape: 'square',
closeable: true, closeable: true,
show: true show: true
} };
}, },
methods: { methods: {
modeChange(index) { modeChange(index) {
...@@ -76,18 +73,19 @@ ...@@ -76,18 +73,19 @@
this.$refs.uToast.show({ this.$refs.uToast.show({
title: `第${index + 1}个标签被点击`, title: `第${index + 1}个标签被点击`,
type: 'success' type: 'success'
}) });
}, },
close(index) { close(index) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: `关闭图标被点击`, title: `关闭图标被点击`,
type: 'success' type: 'success'
}) });
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.u-demo {} .u-demo {
}
</style> </style>
<template> <template>
<view class="content u-skeleton"> <u-form
<view class="bg-white padding-10 banner u-skeleton-fillet"> :model="form"
<u-swiper :list="bannerList" :effect3d="true" @click='bannerClick' :title='true'></u-swiper> ref="uForm"
</view> >
<view class="bg-white radius-bbg padding-5 nav flex flex-row flex-nowrap align-center"> <u-form-item label="姓名">
<view v-for="(item, index) in gridIconList" @click="gridClick(item)" :key="index" class="u-skeleton-fillet padding-sm flex-1 flex flex-column align-center"> <u-input v-model="form.name" />
<image :src="'/static/index/'+item+'.png'" style="width: 80rpx;height: 80rpx;"></image> </u-form-item>
<text class="grid-text">{{ tabs[index].name }}</text> <u-form-item label="简介">
</view> <u-input v-model="form.intro" />
</view> </u-form-item>
<view class="tab bg-gray "> <u-form-item label="性别">
<u-tabs-swiper class='u-skeleton-fillet' bg-color='#f1f1f1' :isScroll="false" ref="uTabs" activeColor="#A87DFF" :list="tabs" :current="current" @change="tabsChange" :isScrool="false" swiperWidth="750"></u-tabs-swiper> <u-input
</view> v-model="form.sex"
<swiper class="padding-10 bg-white radius-bbg" :style="{height: swiperHeight}" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"> type="select"
<swiper-item v-for="(item, index) in tabs" :key="index" > />
<scroll-view scroll-y :style="{height: swiperHeight,width: '100%'}" :scroll-top="scrollTop" @scroll="scroll" @scrolltolower="onreachBottom(index)"> </u-form-item>
<view v-for="(item1,index1) in swiperData[0]" @click="dataClick(item1.id)" :key='index1' :class="index1==0?'margin-top-sm':''" class="flex flex-row align-center padding-5"> <u-form-item label="水果">
<view class="flex-1 u-skeleton-fillet"> <u-checkbox-group>
<image :src="'/static/source/'+item1.img+'.png'" style="width: 100rpx;height: 100rpx;"></image> <u-checkbox
</view> v-model="item.checked"
<view class="u-skeleton-rect flex-9 margin-left-sm flex flex-column justify-start justify-between"> v-for="(item, index) in checkboxList"
<view class="flex-7 text-format-2 text-black">{{item1.title}}</view> :key="index"
<view class="flex-3 flex flex-row align-center justify-between padding-top-sm margin-bottom-sm"> :name="item.name"
<view class="flex-7">{{item1.typename}}</view> >
<view class="flex-3">{{item1.time*1000 | date}}</view> {{ item.name }}
</view> </u-checkbox>
<view v-if='(index1+1)<swiperData[0].length' class="zise-line"></view> </u-checkbox-group>
</view> </u-form-item>
</view> <u-form-item label="味道">
</scroll-view> <u-radio-group v-model="radio">
</swiper-item> <u-radio
</swiper> v-for="(item, index) in radioList"
<u-top-tips ref="uTips"></u-top-tips> :key="index"
<u-skeleton :loading="loading" :animation="true" bgColor="#f1f1f1"></u-skeleton> :name="item.name"
<u-no-network></u-no-network> :disabled="item.disabled"
</view> >
{{ item.name }}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="开关">
<u-switch
slot="right"
v-model="switchVal"
></u-switch>
</u-form-item>
</u-form>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
bannerList: [ form: {
{ name: '',
id:1,type:'forum', intro: '',
image: '1', sex: ''
title: '蒹葭苍苍,白露为霜。所谓伊人,在水一方'
},
{
id:2,type:'book',
image: '2',
title: '溯洄从之,道阻且长。溯游从之,宛在水中央'
}, },
{ checkboxList: [{
id:3,type:'video', name: '苹果',
image: '3', checked: false,
title: '蒹葭萋萋,白露未晞。所谓伊人,在水之湄' disabled: false
}, },
{ {
id:4,type:'cartoon', name: '雪梨',
image: '4', checked: false,
title: '蒹葭萋萋,白露未晞。所谓伊人,在水之湄' disabled: false
}, },
{ {
id:5,type:'audio', name: '柠檬',
image: '5', checked: false,
title: '蒹葭萋萋,白露未晞。所谓伊人,在水之湄' disabled: false
} }
], ],
gridIconList: ['forum', 'book', 'video', 'cartoon', 'audio'], radioList: [{
tabs: [{name: '论坛'}, {name: '小说'}, {name: '视频'}, {name: '漫画'}, {name: '音频'}], name: '鲜甜',
current: 0, disabled: false
swiperCurrent: 0,
dx: 0,
swiperHeight:'800rpx',
scrollTop: 0,
old: {
scrollTop: 0
}, },
loading:true,
swiperData:[
[
{ {
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方', name: '麻辣',
typename:'蒹葭苍苍', disabled: false
img:1,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:3,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:4,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:5,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:6,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:1,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},{
title:'蒹葭苍苍,白露为霜。所谓伊人,在水一方',
typename:'蒹葭苍苍',
img:2,
time:1586758367
},
]
],
}
},
async onLoad() {
setTimeout(()=>{
this.loading = false;
},2000)
},
onReady() {
this.getSwiperHeight();
},
methods: {
async getSwiperHeight(){
let windowHeight = this.$until.height(1)
let banner = await this.$u.getRect('.banner');
let nav = await this.$u.getRect('.nav');
let tab = await this.$u.getRect('.tab');
this.swiperHeight = (windowHeight-banner.height-nav.height-tab.height)+'px'
},
bannerClick(index) {
this.$refs.uTips.show({
title: `点击了`+this.bannerList[index].id+',类型为'+this.bannerList[index].type,
type: 'success',
})
},
gridClick(index) {
switch(index){
case 'forum':
this.$u.route('/pages/forum/index');
break;
default:
this.$refs.uTips.show({
title: `点击了${index}按钮`,
type: 'success',
})
}
},
tabsChange(index) {
this.swiperCurrent = index;
this.scrollTop = this.old.scrollTop
this.$nextTick(()=>{
this.scrollTop = 0
});
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
this.scrollTop = this.old.scrollTop
this.$nextTick(()=>{
this.scrollTop = 0
});
},
// scroll-view到底部加载更多
onreachBottom(index) {
this.$refs.uTips.show({
title: `在${index}触发触底刷新`,
type: 'success',
})
},
scroll(e) {
this.old.scrollTop = e.detail.scrollTop
},
} }
],
radio: '',
switchVal: false
};
} }
};
</script> </script>
<style scoped>
.grid-text {
color: #A87DFF;
font-size: 28rpx;
margin-top: 6rpx;
}
.grid-text {
font-size: 28rpx;
margin-top: 4rpx;
}
</style>
<template> <template>
<view class=""> <view>
<!-- 底部弹窗 -->
<u-popup v-model="show" mode="bottom">
<view style="padding-bottom: 60px;">出淤泥而不染,濯清涟而不妖</view>
</u-popup>
<!-- 底部固定栏 -->
<view class="box-1"></view>
<!-- 模态框 -->
<u-modal v-model="show" :zoom="false"></u-modal>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return {} return {
s:false,
show:false
}
},
onReady() {
this.show = true;
},
methods: {
} }
} }
</script> </script>
<style>
.box-1{
z-index: 999;
height: 50px;
background-color: #f00;
left: 0;
width: 100%;
position: fixed;
bottom: 0;
}
</style>
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
// 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑 // 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑
if(typeof this.customBack === 'function') { if(typeof this.customBack === 'function') {
this.customBack(); this.customBack();
} { } else {
uni.navigateBack(); uni.navigateBack();
} }
} }
......
...@@ -181,31 +181,31 @@ ...@@ -181,31 +181,31 @@
.u-mode-light-primary { .u-mode-light-primary {
background-color: $u-type-primary-light; background-color: $u-type-primary-light;
color: $u-type-primary; color: $u-type-primary;
border: 1px solid rgb(215, 234, 254); border: 1px solid $u-type-primary-disabled;
} }
.u-mode-light-success { .u-mode-light-success {
background-color: $u-type-success-light; background-color: $u-type-success-light;
color: $u-type-success; color: $u-type-success;
border: 1px solid #BEF5C8; border: 1px solid $u-type-success-disabled;
} }
.u-mode-light-error { .u-mode-light-error {
background-color: $u-type-error-light; background-color: $u-type-error-light;
color: $u-type-error; color: $u-type-error;
border: 1px solid #fde2e2; border: 1px solid $u-type-error-disabled;
} }
.u-mode-light-warning { .u-mode-light-warning {
background-color: $u-type-warning-light; background-color: $u-type-warning-light;
color: $u-type-warning; color: $u-type-warning;
border: 1px solid #faecd8; border: 1px solid $u-type-warning-disabled;
} }
.u-mode-light-info { .u-mode-light-info {
background-color: $u-type-info-light; background-color: $u-type-info-light;
color: $u-type-info; color: $u-type-info;
border: 1px solid #ebeef5; border: 1px solid $u-type-info-disabled;
} }
.u-mode-dark-primary { .u-mode-dark-primary {
......
// 此版本发布于2020-06-25 // 此版本发布于2020-06-28
let version = '1.3.9'; let version = '1.4.0';
export default { export default {
v: version, v: version,
......
...@@ -10,7 +10,7 @@ u-td, u-th { ...@@ -10,7 +10,7 @@ u-td, u-th {
} }
u-icon { u-icon {
display: flex; display: inline-flex;
align-items: center; align-items: center;
} }
......
{ {
"name": "uview-ui", "name": "uview-ui",
"version": "1.3.9", "version": "1.4.0",
"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水", "description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
"main": "index.js", "main": "index.js",
"keywords": ["uview", "uView", "uni-app", "uni-app ui", "uniapp", "uviewui", "uview ui", "uviewUI", "uViewui", "uViewUI", "uView UI", "uni ui", "uni UI", "uniapp ui", "ui", "UI框架", "uniapp ui框架", "uniapp UI"], "keywords": ["uview", "uView", "uni-app", "uni-app ui", "uniapp", "uviewui", "uview ui", "uviewUI", "uViewui", "uViewUI", "uView UI", "uni ui", "uni UI", "uniapp ui", "ui", "UI框架", "uniapp ui框架", "uniapp UI"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment