更新组件演示页面,方便用户直接使用组件,去除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

@@ -1,6 +1,6 @@
<template>
<view class="components-loading">
<view class="components-loading tn-safe-area-inset-bottom">
<!-- 顶部自定义导航 -->
<tn-nav-bar fixed>Loading加载动画</tn-nav-bar>
@@ -8,14 +8,57 @@
<!-- 页面内容 -->
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<dynamic-demo-template ref="demoTemplate" :tips="tips" :sectionList="sectionList" :full="false" @click="click">
<tn-loading
:show="show"
:mode="mode"
:color="color"
:size="size"
></tn-loading>
</dynamic-demo-template>
<demo-title title="样式">
<view class="tn-flex tn-flex-col-center tn-flex-row-left">
<view class="tn-margin-right">
<tn-loading show="show"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" mode="flower"></tn-loading>
</view>
</view>
</demo-title>
<demo-title title="大小">
<view class="tn-flex tn-flex-col-center tn-flex-row-left">
<view class="tn-margin-right">
<tn-loading show="show"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" :size="50"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" :size="80"></tn-loading>
</view>
</view>
<view class="tn-flex tn-flex-col-center tn-flex-row-left tn-margin-top">
<view class="tn-margin-right">
<tn-loading show="show" mode="flower"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" mode="flower" :size="50"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" mode="flower" :size="80"></tn-loading>
</view>
</view>
</demo-title>
<demo-title title="颜色">
<view class="tn-flex tn-flex-col-center tn-flex-row-left">
<view class="tn-margin-right">
<tn-loading show="show"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" color="#01BEFF"></tn-loading>
</view>
<view class="tn-margin-right">
<tn-loading show="show" color="#E83A30"></tn-loading>
</view>
</view>
</demo-title>
<view class="tn-padding-bottom-lg"></view>
</view>
@@ -24,79 +67,17 @@
</template>
<script>
import dynamicDemoTemplate from '@/libs/components/dynamic-demo-template.vue'
import demoTitle from '@/libs/components/demo-title.vue'
export default {
name: 'componentsLoading',
components: {dynamicDemoTemplate},
components: {demoTitle},
data() {
return {
show: true,
mode: 'circle',
color: '',
size: 34,
tips: ['无需依赖额外的样式文件','使用tn-loading组件'],
sectionList: [
{
name: '参数切换',
section: [
{
title: '显示',
optional: ['显示','隐藏'],
methods: 'showChange'
},
{
title: '模式',
optional: ['圆圈','花朵'],
methods: 'modeChange'
},
{
title: '颜色',
optional: ['默认','#31E749','#31C9E8'],
methods: 'colorChange'
},
{
title: '尺寸',
optional: ['28','34','54'],
methods: 'sizeChange',
current: 1
}
]
}
]
}
},
methods: {
click(event) {
this[event.methods] && this[event.methods](event)
},
// 切换是否显示
showChange(event) {
this.show = event.index === 0 ? true : false
},
// 切换模式
modeChange(event) {
switch (event.index) {
case 0:
this.mode = 'circle'
this.$refs.demoTemplate.updateSectionBtnsState(2, true)
break
case 1:
this.mode = 'flower'
this.$refs.demoTemplate.updateSectionBtnsState(2, false)
break
}
},
// 切换颜色
colorChange(event) {
this.color = event.index === 0 ? '' : event.name
},
// 切换尺寸
sizeChange(event) {
this.size = Number(event.name)
},
},
}
}
</script>