更新组件演示页面,方便用户直接使用组件,去除tn-button的默认背景色,tn-avatar修改参数默认值,修复tn-avatar-group最开始头像进行了偏移、修复无法使用标签的bug,tn-badge修改参数默认值,tn-collapse-item修复背景颜色失效问题,滚动通知移除默认背景颜色和字体大小,tn-count-down修复时间单位不正确问题,列表组件修复背景颜色问题,tn-nav-bar返回按钮修改为可进行修改的图标,tn-step添加点击步骤进行跳转,tn-loading修复默认激活颜色出错问题,tn-tag移除默认背景颜色,优化阴影大小css

This commit is contained in:
JaylenTech
2022-02-08 19:55:15 +08:00
parent 043ee3f585
commit 946bb52c03
94 changed files with 6296 additions and 4727 deletions

View File

@@ -3,34 +3,58 @@
<view class="components-nav_bar">
<!-- 顶部自定义导航 -->
<tn-nav-bar fixed>navBar导航栏</tn-nav-bar>
<tn-nav-bar
v-if="mode === 'normal'"
fixed
:height="height"
:backgroundColor="backgroundColor"
:fontColor="fontColor"
:alpha="alpha"
:bottomShadow="bottomShadow"
>navBar导航栏</tn-nav-bar>
<tn-nav-bar
v-if="mode === 'customBack'"
fixed
:height="height"
:customBack="true"
:backgroundColor="backgroundColor"
:fontColor="fontColor"
:alpha="alpha"
:bottomShadow="bottomShadow"
>
<view slot="back" class='tn-custom-nav-bar__back'>
<view><text class='tn-icon-left'></text></view>
<view><text class='tn-icon-home-capsule-fill'></text></view>
</view>
<view class="custom-nav-content">
<view class="search-content">
<tn-input class="search-input" v-model="searchValue" placeholder="请输入要搜索的内容" :border="true" :height="50" :showLeftIcon="true" leftIcon="search"></tn-input>
</view>
</view>
</tn-nav-bar>
<tn-nav-bar
v-if="mode === 'customNav'"
fixed
:height="height"
:isBack="false"
:backgroundColor="backgroundColor"
:fontColor="fontColor"
:alpha="alpha"
:bottomShadow="bottomShadow"
>
<view class="custom-nav-content">
<view class="search-content">
<tn-input class="search-input" v-model="searchValue" placeholder="请输入要搜索的内容" :border="true" :height="50" :showLeftIcon="true" leftIcon="search"></tn-input>
</view>
</view>
</tn-nav-bar>
<!-- 页面内容 -->
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<dynamic-demo-template ref="demoTemplate" :tips="tips" :sectionList="sectionList" :full="true" @click="click">
<!-- 普通导航栏 -->
<tn-nav-bar v-if="mode === 'normal'" :fixed="false" :height="height" :backgroundColor="backgroundColor" :alpha="alpha">图鸟科技</tn-nav-bar>
<!-- 自定义内容导航栏隐藏返回按钮 -->
<tn-nav-bar v-if="mode === 'customNav'" :fixed="false" :isBack="false" :height="height" :backgroundColor="backgroundColor" :alpha="alpha">
<view class="custom-nav-content">
<view class="search-content">
<tn-input class="search-input" v-model="searchValue" placeholder="请输入要搜索的内容" :border="true" :height="50" :showLeftIcon="true" leftIcon="search"></tn-input>
</view>
</view>
</tn-nav-bar>
<!-- 自定义放回按钮 -->
<tn-nav-bar v-if="mode === 'customBack'" :fixed="false" :customBack="true" :height="height" :backgroundColor="backgroundColor" :alpha="alpha">
<view slot="back" class='tn-custom-nav-bar__back'>
<view><text class='tn-icon-left'></text></view>
<view><text class='tn-icon-home-capsule-fill'></text></view>
</view>
<view class="custom-nav-content">
<view class="search-content">
<tn-input class="search-input" v-model="searchValue" placeholder="请输入要搜索的内容" :border="true" :height="50" :showLeftIcon="true" leftIcon="search"></tn-input>
</view>
</view>
</tn-nav-bar>
<dynamic-demo-template ref="demoTemplate" :tips="tips" :sectionList="sectionList" :full="true" @click="click" :noDemo="true">
</dynamic-demo-template>
</view>
@@ -48,9 +72,11 @@
return {
searchValue: '',
mode: 'normal',
height: 46,
height: 0,
backgroundColor: '#FFFFFF',
fontColor: '',
alpha: false,
bottomShadow: true,
tips: ['无需依赖额外的样式文件','使用tn-toast组件'],
sectionList: [
@@ -59,9 +85,8 @@
section: [
{
title: '高度',
optional: ['默认','46','80'],
methods: 'heightChange',
current: 1
optional: ['默认','38','80'],
methods: 'heightChange'
},
{
title: '样式',
@@ -70,8 +95,13 @@
},
{
title: '背景颜色',
optional: ['默认','#01BEFF','透明'],
optional: ['默认','#01BEFF','tn-bg-grey','tn-main-gradient-indigo','透明'],
methods: 'backgroundColorChange'
},
{
title: '底部阴影',
optional: ['默认','隐藏'],
methods: 'bottomShadowChange'
}
]
}
@@ -105,17 +135,27 @@
switch(event.index) {
case 0:
this.backgroundColor = '#FFFFFF'
this.fontColor = ''
this.alpha = false
break
case 1:
case 2:
case 3:
this.fontColor = '#FFFFFF'
this.backgroundColor = event.name
this.alpha = false
break
case 2:
case 4:
this.backgroundColor = ''
this.fontColor = ''
this.alpha = true
break
}
},
// 切换底部阴影
bottomShadowChange(event) {
this.bottomShadow = event.index === 0 ? true : false
}
},
}