mirror of
https://gitee.com/TSpecific/tuniao-ui.git
synced 2026-03-07 08:14:01 +08:00
新增10+页面模板
新增form表单部分组件的演示代码 新增图标 添加第三方开发插件演示(所属权归属第三方) 新增tn-scroll-view下拉组件开发(会员) 新增tn-stack-swiper堆叠轮播添加垂直滚动属性(会员) 新增tn-waterfall瀑布流组件(会员) 新增tn-tree-view树形菜单组件(会员) 新增tn-cascade-selection级联选择组件(会员) 新增tn-custom-swiper组件(会员【实验室】) 新增tn-lazy-load懒加载组件 新增tn-load-more加载更多组件 新增tn-sekeleton骨架屏组件 新增tn-empty空白页组件 新增tn-landscape压屏窗组件 新增tn-verification-code-input验证码输入组件 新增tn-goods-nav商品导航组件 修复tn-slider在tn-form-item下在H5端无法滑动的bug 修复tn-swipe-action-item点击回调事件中无法读取name属性的bug 修复群友已反馈的bug 优化部分页面在iphone上底部确实的问题
This commit is contained in:
122
componentsPage/goods-nav/goods-nav.vue
Normal file
122
componentsPage/goods-nav/goods-nav.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<view class="components-goods-nav tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>商品导航</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基础">
|
||||
<tn-goods-nav></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="选项设置为头像">
|
||||
<tn-goods-nav :options="avatarOptions"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置角标">
|
||||
<tn-goods-nav :options="countOptions"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置边距按钮">
|
||||
<tn-goods-nav buttonType="paddingRect"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置圆角按钮">
|
||||
<tn-goods-nav buttonType="round"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="不设置选项">
|
||||
<tn-goods-nav :options="[]"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义颜色">
|
||||
<tn-goods-nav :options="customOptions" buttonType="round" :buttonGroups="customButtonGroups"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="固定在底部">
|
||||
<tn-goods-nav :fixed="true" :safeAreaInsetBottom="true" @optionClick="onOptionClick" @buttonClick="onButtonClick"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<view style="padding-bottom: 88rpx;"></view>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsGoodsNav',
|
||||
components: { demoTitle },
|
||||
data() {
|
||||
return {
|
||||
avatarOptions: [{
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg'
|
||||
},{
|
||||
icon: 'service',
|
||||
text: '客服'
|
||||
},{
|
||||
icon: 'star',
|
||||
text: '收藏'
|
||||
}],
|
||||
countOptions: [{
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
count: 10
|
||||
},{
|
||||
icon: 'service',
|
||||
text: '客服',
|
||||
count: 100
|
||||
},{
|
||||
icon: 'star',
|
||||
text: '收藏'
|
||||
}],
|
||||
customOptions: [{
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
count: 10,
|
||||
countBackgroundColor: '#E83A30'
|
||||
},{
|
||||
icon: 'service',
|
||||
text: '客服',
|
||||
count: 100,
|
||||
countBackgroundColor: 'transparent',
|
||||
countFontColor: '#E83A30'
|
||||
},{
|
||||
icon: 'star',
|
||||
text: '收藏',
|
||||
iconColor: '#838383',
|
||||
fontColor: '#080808'
|
||||
}],
|
||||
customButtonGroups: [{
|
||||
text: '加入购物车',
|
||||
backgroundColor: 'tn-cool-bg-color-8',
|
||||
color: '#FFFFFF'
|
||||
},{
|
||||
text: '结算',
|
||||
backgroundColor: 'tn-cool-bg-color-8--reverse',
|
||||
color: '#FFFFFF'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选项点击事件
|
||||
onOptionClick(e) {
|
||||
this.$t.messageUtils.toast(`点击了第${e.index}个选项`)
|
||||
},
|
||||
// 按钮点击事件
|
||||
onButtonClick(e) {
|
||||
this.$t.messageUtils.toast(`点击了第${e.index}个按钮`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.components-goods-nav {
|
||||
background-color: $tn-bg-gray-color;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user