新增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上底部确实的问题
95
componentsPage/check-box/check-box.vue
Normal file
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<view class="components-check-box tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>按钮</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基础">
|
||||
<tn-checkbox v-model="value1" name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox v-model="value1" name="选项2" disabled>选项2(不可点击)</tn-checkbox>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="圆形选框">
|
||||
<tn-checkbox-group shape="circle">
|
||||
<tn-checkbox name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="竖直排列">
|
||||
<tn-checkbox-group width="100%" wrap>
|
||||
<tn-checkbox name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="禁止点击标签">
|
||||
<tn-checkbox-group disabledLabel>
|
||||
<tn-checkbox name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义尺寸">
|
||||
<view>
|
||||
<tn-checkbox-group :size="26" :iconSize="18">
|
||||
<tn-checkbox name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3" :size="36" :iconSize="30">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-checkbox-group :size="46" :iconSize="40">
|
||||
<tn-checkbox name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义颜色">
|
||||
<tn-checkbox-group activeColor="#31E749">
|
||||
<tn-checkbox name="选项1">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3" activeColor="#E83A30">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义图标">
|
||||
<tn-checkbox-group>
|
||||
<tn-checkbox name="选项1" iconName="star">选项1</tn-checkbox>
|
||||
<tn-checkbox name="选项2" iconName="fire">选项2</tn-checkbox>
|
||||
<tn-checkbox name="选项3" iconName="like">选项3</tn-checkbox>
|
||||
</tn-checkbox-group>
|
||||
</demo-title>
|
||||
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsCheckBox',
|
||||
components: {demoTitle},
|
||||
data() {
|
||||
return {
|
||||
value1: false,
|
||||
value2: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
101
componentsPage/empty/empty.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<view class="components-empty tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>空页面</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="内置图标">
|
||||
<block v-for="(item, index) in inlineMode" :key="index">
|
||||
<view class="empty__item">
|
||||
<tn-empty :mode="item"></tn-empty>
|
||||
</view>
|
||||
</block>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义图标">
|
||||
<view class="empty__item">
|
||||
<tn-empty icon="moon-fill" text="夜深人静"></tn-empty>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义图片">
|
||||
<view class="empty__item">
|
||||
<tn-empty icon="https://tnuiimage.tnkjapp.com/empty/alien/2.png" text="空空如也"></tn-empty>
|
||||
</view>
|
||||
<block v-for="(value, key, index) in imgEmpty" :key="index">
|
||||
<view class="empty__item">
|
||||
<tn-empty :icon="value" :mode="key"></tn-empty>
|
||||
</view>
|
||||
</block>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="隐藏文字">
|
||||
<view class="empty__item">
|
||||
<tn-empty icon="https://tnuiimage.tnkjapp.com/empty/alien/2.png" mode=""></tn-empty>
|
||||
</view>
|
||||
<view class="empty__item tn-margin-top">
|
||||
<tn-empty icon="help" mode=""></tn-empty>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="带跳转按钮">
|
||||
<view class="empty__item">
|
||||
<tn-empty icon="moon-fill" text="夜深人静">
|
||||
<tn-button backgroundColor="#01BEFF" fontColor="#FFFFFF" size="sm">看看小视频</tn-button>
|
||||
</tn-empty>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义样式">
|
||||
<view class="empty__item">
|
||||
<tn-empty icon="moon-fill" text="夜深人静" :iconSize="120" :textSize="34" iconColor="#E6E6E6" textColor="#C6D1D8"></tn-empty>
|
||||
</view>
|
||||
<view class="empty__item tn-margin-top">
|
||||
<tn-empty icon="https://tnuiimage.tnkjapp.com/empty/alien/2.png" text="空空如也" :imgWidth="200" :imgHeight="200"></tn-empty>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsEmpty',
|
||||
components: { demoTitle },
|
||||
data() {
|
||||
return {
|
||||
inlineMode: ['cart','page','search','address','network','order','coupon','favor','permission','history','message','list','data','comment'],
|
||||
imgEmpty: {
|
||||
cart: '/componentsPage/static/images/empty/cart.jpg',
|
||||
comment: '/componentsPage/static/images/empty/comment.jpg',
|
||||
data: '/componentsPage/static/images/empty/data.jpg',
|
||||
network: '/componentsPage/static/images/empty/network.jpg',
|
||||
page: '/componentsPage/static/images/empty/page.jpg',
|
||||
permission: '/componentsPage/static/images/empty/permission.jpg',
|
||||
search: '/componentsPage/static/images/empty/search.jpg'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.components-empty {
|
||||
background-color: $tn-bg-gray-color;
|
||||
}
|
||||
|
||||
.empty {
|
||||
&__item {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
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>
|
||||
231
componentsPage/input/input.vue
Normal file
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<view class="components-input tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>Input输入框</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基本使用" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">文本</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input v-model="inputValue" type="text" placeholder="请输入文本"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="禁止输入" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">文本</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="text" placeholder="请输入文本" disabled></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="对齐方式" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center tn-border-solid-bottom">
|
||||
<view class="content__title">居中对齐</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="text" placeholder="请输入文本" inputAlign="center"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">右对齐</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="text" placeholder="请输入文本" inputAlign="right"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="边框" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">文本</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="text" placeholder="请输入文本" border></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center tn-border-solid-bottom">
|
||||
<view class="content__title">文本</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="text" placeholder="请输入文本" border borderColor="#01BEFF"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="右边显示图标" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">文本</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="text" placeholder="请输入文本" showRightIcon rightIcon="code"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="文本域" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">文本域</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="textarea" placeholder="请输入文本"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="内置类型" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center tn-border-solid-bottom">
|
||||
<view class="content__title">整数</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="number" placeholder="请输入整数"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center tn-border-solid-bottom">
|
||||
<view class="content__title">小数</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="digit" placeholder="请输入小数"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center tn-border-solid-bottom">
|
||||
<view class="content__title">身份证</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="idcard" placeholder="请输入身份证"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">电话号码</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="tel" placeholder="请输入电话号码"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="密码输入框" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center tn-border-solid-bottom">
|
||||
<view class="content__title">密码</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="password" placeholder="请输入密码"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">密码</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="password" placeholder="请输入密码" :passwordIcon="false"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="弹出选择" :contentPadding="false">
|
||||
<view class="content tn-flex tn-flex-direction-row tn-flex-col-center">
|
||||
<view class="content__title">业务</view>
|
||||
<view class="content__data tn-flex-1">
|
||||
<tn-input type="select" placeholder="请选择业务类型" :selectOpen="selectShow" @click="selectShow = true"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="配合formItem使用" :contentPadding="false">
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="姓名">
|
||||
<tn-input type="text" placeholder="请输入姓名"></tn-input>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="姓名" labelPosition="top" required>
|
||||
<tn-input type="text" placeholder="请输入姓名"></tn-input>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="联系电话" :labelWidth="200">
|
||||
<tn-input type="tel" placeholder="请输入电话号码"></tn-input>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="联系电话" :labelWidth="200" labelAlign="center">
|
||||
<tn-input type="tel" placeholder="请输入电话号码"></tn-input>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="联系电话" :labelWidth="200" labelAlign="right">
|
||||
<tn-input type="tel" placeholder="请输入电话号码"></tn-input>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="验证码" :labelWidth="200">
|
||||
<tn-input type="text" placeholder="请输入验证码"></tn-input>
|
||||
<tn-button slot="right" backgroundColor="#01BEFF" fontColor="#FFFFFF" size="sm">获取验证码</tn-button>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
<view class="content tn-padding-left tn-padding-right">
|
||||
<tn-form-item label="身份证" :labelWidth="200" leftIcon="identity">
|
||||
<tn-input type="idcard" placeholder="请输入身份证号码"></tn-input>
|
||||
</tn-form-item>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 业务类型select -->
|
||||
<tn-select
|
||||
v-model="selectShow"
|
||||
mode="single"
|
||||
:list="selectList"
|
||||
@confirm="businessSelectConfirm"
|
||||
></tn-select>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
|
||||
export default {
|
||||
name: 'ComponentsInput',
|
||||
components: { demoTitle },
|
||||
data() {
|
||||
return {
|
||||
inputValue: '',
|
||||
selectShow: false,
|
||||
selectList: [
|
||||
{
|
||||
label: '免费',
|
||||
value: 1101
|
||||
},
|
||||
{
|
||||
label: '会员',
|
||||
value: 1102
|
||||
},
|
||||
{
|
||||
label: '全新开发',
|
||||
value: 1103
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
businessSelectConfirm() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.components-input {
|
||||
background-color: $tn-bg-gray-color;
|
||||
min-height: 100vh;
|
||||
|
||||
.content {
|
||||
background-color: #FFFFFF;
|
||||
|
||||
&__title {
|
||||
padding: 30rpx;
|
||||
}
|
||||
&__data {
|
||||
margin: 10rpx 0;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
185
componentsPage/landscape/landscape.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
|
||||
<view class="components-landscape">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>压屏窗</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<dynamic-demo-template ref="demoTemplate" :tips="tips" :sectionList="sectionList" :full="false" @click="click">
|
||||
<view class="tn-flex tn-flex-row-center"><tn-button backgroundColor="#01BEFF" fontColor="tn-color-white" @tap="showLandscape">弹出压屏窗</tn-button></view>
|
||||
</dynamic-demo-template>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 压屏窗-->
|
||||
<tn-landscape
|
||||
:show="show"
|
||||
:closeBtn="closeBtn"
|
||||
:closeColor="closeColor"
|
||||
:closeSize="closeSize"
|
||||
:closePosition="closePosition"
|
||||
:closeTop="closeTop"
|
||||
:closeRight="closeRight"
|
||||
:closeBottom="closeBottom"
|
||||
:closeLeft="closeLeft"
|
||||
:mask="mask"
|
||||
:maskCloseable="maskCloseable"
|
||||
@close="closeLandscape"
|
||||
>
|
||||
<image src="https://tnuiimage.tnkjapp.com/landscape/2022-new-year.png" mode="widthFix"></image>
|
||||
</tn-landscape>
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dynamicDemoTemplate from '@/libs/components/dynamic-demo-template.vue'
|
||||
|
||||
export default {
|
||||
name: 'ComponentsLandscape',
|
||||
components: {dynamicDemoTemplate},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
closeBtn: true,
|
||||
closeColor: '',
|
||||
closeSize: 0,
|
||||
closePosition: 'rightTop',
|
||||
closeTop: 0,
|
||||
closeRight: 0,
|
||||
closeBottom: 0,
|
||||
closeLeft: 0,
|
||||
mask: true,
|
||||
maskCloseable: true,
|
||||
|
||||
tips: ['无需依赖额外的样式文件','使用tn-landscape组件'],
|
||||
sectionList: [
|
||||
{
|
||||
name: '参数切换',
|
||||
section: [
|
||||
{
|
||||
title: '关闭按钮',
|
||||
optional: ['显示','隐藏'],
|
||||
methods: 'closeBtnChange'
|
||||
},
|
||||
{
|
||||
title: '关闭按钮位置',
|
||||
optional: ['左上','右上','底部'],
|
||||
methods: 'closePositionChange',
|
||||
current: 1
|
||||
},
|
||||
{
|
||||
title: '自定义关闭按钮',
|
||||
optional: ['默认','自定义'],
|
||||
methods: 'customCloseChange'
|
||||
},
|
||||
{
|
||||
title: '遮罩',
|
||||
optional: ['显示','隐藏'],
|
||||
methods: 'maskChange'
|
||||
},
|
||||
{
|
||||
title: '点击遮罩关闭',
|
||||
optional: ['允许','不允许'],
|
||||
methods: 'maskCloseableChange'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
click(event) {
|
||||
this[event.methods] && this[event.methods](event)
|
||||
},
|
||||
// 弹出压屏窗
|
||||
showLandscape() {
|
||||
this.openLandscape()
|
||||
},
|
||||
// 切换关闭按钮显示隐藏
|
||||
closeBtnChange(event) {
|
||||
switch (event.index) {
|
||||
case 0:
|
||||
this.closeBtn = true
|
||||
this.$refs.demoTemplate.updateSectionBtnsState([1,2], true)
|
||||
break
|
||||
case 1:
|
||||
this.closeBtn = false
|
||||
this.$refs.demoTemplate.updateSectionBtnsState([1,2], false)
|
||||
break
|
||||
}
|
||||
this.openLandscape()
|
||||
},
|
||||
// 切换关闭按钮位置
|
||||
closePositionChange(event) {
|
||||
switch (event.index) {
|
||||
case 0:
|
||||
this.closePosition = 'leftTop'
|
||||
break
|
||||
case 1:
|
||||
this.closePosition = 'rightTop'
|
||||
break
|
||||
case 2:
|
||||
this.closePosition = 'bottom'
|
||||
break
|
||||
}
|
||||
this.$refs.demoTemplate.updateSectionBtnsValue(0, 2, 0)
|
||||
this.customCloseChange({index: 0})
|
||||
this.openLandscape()
|
||||
},
|
||||
// 切换自定义关闭按钮样式
|
||||
customCloseChange(event) {
|
||||
if (event.index === 0) {
|
||||
this.closeTop = 0
|
||||
this.closeRight = 0
|
||||
this.closeBottom = 0
|
||||
this.closeLeft = 0
|
||||
this.closeColor = ''
|
||||
this.closeSize = 0
|
||||
} else if (event.index === 1) {
|
||||
if (this.closePosition === 'leftTop') {
|
||||
this.closeTop = -40
|
||||
this.closeLeft = 30
|
||||
} else if (this.closePosition === 'rightTop') {
|
||||
this.closeTop = -40
|
||||
this.closeRight = 30
|
||||
} else if (this.closePosition === 'bottom') {
|
||||
this.closeBottom = -60
|
||||
}
|
||||
this.closeColor = '#E83A30'
|
||||
this.closeSize = 60
|
||||
}
|
||||
this.openLandscape()
|
||||
},
|
||||
// 切换遮罩显示隐藏
|
||||
maskChange(event) {
|
||||
this.mask = event.index === 0 ? true : false
|
||||
this.openLandscape()
|
||||
},
|
||||
// 切换遮罩关闭状态
|
||||
maskCloseableChange(event) {
|
||||
this.maskCloseable = event.index === 0 ? true : false
|
||||
this.openLandscape()
|
||||
},
|
||||
|
||||
// 打开压屏窗
|
||||
openLandscape() {
|
||||
this.show = true
|
||||
},
|
||||
// 关闭压屏窗
|
||||
closeLandscape() {
|
||||
this.show = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
102
componentsPage/lazy-load/lazy-load.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<view class="components-lazy-load">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>懒加载</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view class="content">
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="item">
|
||||
<tn-lazy-load
|
||||
:index="index"
|
||||
:image="item.src"
|
||||
:threshold="-450"
|
||||
:height="400"
|
||||
imgMode="aspectFill"
|
||||
></tn-lazy-load>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<tn-load-more :status="status" @loadmore="getData"></tn-load-more>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ComponentsLazyLoad',
|
||||
data() {
|
||||
return {
|
||||
status: 'loadmore',
|
||||
list: [],
|
||||
data: [
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/bag1.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/bag2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/banner1.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/banner2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/banner3.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/card.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/computer1.jpg' },
|
||||
{ src: 'error.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/computer2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/content.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/cup1.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/cup2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/office.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/phonecase1.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/phonecase2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/pillow.jpg' },
|
||||
{ src: 'error.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/pillow2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/prototype1.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/prototype2.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/watch1.jpg' },
|
||||
{ src: 'https://tnuiimage.tnkjapp.com/shop/watch2.jpg' },
|
||||
{ src: 'error.jpg' }
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getData()
|
||||
},
|
||||
onReachBottom() {
|
||||
uni.$emit('tOnLazyLoadReachBottom')
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let index = 0
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < 10; i++) {
|
||||
index = this.$t.number.random(0, this.data.length - 1)
|
||||
this.list.push({
|
||||
src: this.data[index].src
|
||||
})
|
||||
}
|
||||
this.status = 'loadmore'
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding: 30rpx;
|
||||
|
||||
.item {
|
||||
flex: 0 0 335rpx;
|
||||
height: 400rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
81
componentsPage/load-more/load-more.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<view class="components-load-more tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>加载更多</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="默认">
|
||||
<tn-load-more></tn-load-more>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="加载中">
|
||||
<tn-load-more status="loading" :loadingIcon="false"></tn-load-more>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="loading"></tn-load-more>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="loading" loadingIconColor="#01BEFF"></tn-load-more>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="loading" loadingIconType="flower"></tn-load-more>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="没有更多">
|
||||
<tn-load-more status="nomore"></tn-load-more>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="nomore" dot></tn-load-more>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="修改提示语">
|
||||
<tn-load-more status="loadmore" :loadText="loadText"></tn-load-more>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="loading" :loadText="loadText"></tn-load-more>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="nomore" :loadText="loadText"></tn-load-more>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="修改颜色">
|
||||
<tn-load-more status="loadmore" :loadText="loadText" fontColor="#01BEFF"></tn-load-more>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="loading" :loadText="loadText" fontColor="tn-color-indigo"></tn-load-more>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-load-more class="tn-margin-top" status="nomore" :loadText="loadText" fontColor="rgba(255, 129, 129, 0.8)"></tn-load-more>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="修改字体尺寸">
|
||||
<tn-load-more :fontSize="32"></tn-load-more>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsLoadMore',
|
||||
components: { demoTitle },
|
||||
data() {
|
||||
return {
|
||||
loadText: {
|
||||
loadmore: '下拉加载',
|
||||
loading: '快速加载中...',
|
||||
nomore: '已经没有了啊'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -29,7 +29,7 @@
|
||||
</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>
|
||||
<tn-input class="search-input" v-model="searchValue" placeholder="请输入要搜索的内容" :border="true" :height="50" :showRightIcon="true" rightIcon="search"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
@@ -46,7 +46,7 @@
|
||||
>
|
||||
<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>
|
||||
<tn-input class="search-input" v-model="searchValue" placeholder="请输入要搜索的内容" :border="true" :height="50" :showRightIcon="true" rightIcon="search"></tn-input>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
89
componentsPage/radio/radio.vue
Normal file
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view class="components-radio tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>Radio单选按钮</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基础">
|
||||
<tn-radio-group>
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2" disabled>选项2(禁止选中)</tn-radio>
|
||||
<tn-radio name="选项3">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="方形选框">
|
||||
<tn-radio-group shape="square">
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2">选项2</tn-radio>
|
||||
<tn-radio name="选项3">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="竖直排列">
|
||||
<tn-radio-group width="100%" wrap>
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2">选项2</tn-radio>
|
||||
<tn-radio name="选项3">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="禁止点击标签">
|
||||
<tn-radio-group :disabledLabel="true">
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2">选项2</tn-radio>
|
||||
<tn-radio name="选项3">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义尺寸">
|
||||
<view>
|
||||
<tn-radio-group :size="20" :iconSize="14">
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2">选项2</tn-radio>
|
||||
<tn-radio name="选项3" :size="36" :iconSize="26">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-radio-group :size="46" :iconSize="36">
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2">选项2</tn-radio>
|
||||
<tn-radio name="选项3">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义颜色">
|
||||
<tn-radio-group activeColor="#31E749">
|
||||
<tn-radio name="选项1">选项1</tn-radio>
|
||||
<tn-radio name="选项2">选项2</tn-radio>
|
||||
<tn-radio name="选项3" activeColor="#E83A30">选项3</tn-radio>
|
||||
</tn-radio-group>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'componentsRadio',
|
||||
components: {demoTitle},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
236
componentsPage/skeleton/skeleton.vue
Normal file
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<view class="components-skeleton tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>骨架屏</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<view class="tn-padding-top"></view>
|
||||
|
||||
<view class="news tn-skeleton">
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="news__item tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-top">
|
||||
<view class="news__item__info tn-flex tn-flex-direction-row tn-flex-row-center tn-flex-col-center">
|
||||
<view class="news__item__avatar tn-skeleton-circle">
|
||||
<image :src="item.userInfo.avatar"></image>
|
||||
</view>
|
||||
<view class="news__item__outline tn-flex tn-flex-direction-column tn-flex-col-top tn-flex-row-around">
|
||||
<view class="news__item__nick-name tn-skeleton-fillet">{{ item.userInfo.nickName}}</view>
|
||||
<view class="news__item__release-date tn-skeleton-fillet">{{ item.content.releaseDate }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news__item__content tn-flex tn-flex-direction-row tn-flex-col-top tn-flex-row-center">
|
||||
<view class="news__item__content__data">
|
||||
<view class="news__item__title tn-text-ellipsis tn-skeleton-fillet">{{ item.content.title }}</view>
|
||||
<view class="news__item__desc tn-text-ellipsis-2 tn-skeleton-fillet">{{ item.content.desc }}</view>
|
||||
</view>
|
||||
<view class="news__item__main-image tn-skeleton-rect">
|
||||
<image :src="item.content.mainImage" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 引用组件 -->
|
||||
<tn-skeleton :show="showSkeleton"></tn-skeleton>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ComponentsSkeleton',
|
||||
data() {
|
||||
return {
|
||||
showSkeleton: true,
|
||||
list: [
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
},
|
||||
{
|
||||
userInfo: {
|
||||
avatar: 'https://tnuiimage.tnkjapp.com/avatar/xiaomai1.jpg',
|
||||
nickName: '图鸟科技-北北'
|
||||
},
|
||||
content: {
|
||||
title: '全新UI框架,tuniaoUI正式发布',
|
||||
desc: '基于uniapp开发的UI框架,tuniaoUI现已正式发布,该UI最大的特点就是酷炫,相对于传统的UI框架,不仅仅提供了组件方便用户进行使用同时提供了酷炫的页面模板,让用户直接使用模板就可以做出精美的页面',
|
||||
mainImage: 'https://tnuiimage.tnkjapp.com/shop/sticker.jpg',
|
||||
releaseDate: '2020年12月30日'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// 模拟加载数据完毕
|
||||
setTimeout(() => {
|
||||
this.showSkeleton = false
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.components-skeleton {
|
||||
// background-color: $tn-bg-gray-color;
|
||||
}
|
||||
|
||||
.news {
|
||||
position: relative;
|
||||
|
||||
&__item {
|
||||
margin: 0 30rpx;
|
||||
padding: 10rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 4rpx 6rpx 28rpx 0px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
&__info {
|
||||
height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
&__avatar {
|
||||
width: 80rpx;
|
||||
height: 100%;
|
||||
border-radius: 100%;
|
||||
overflow: hidden;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
&__outline {
|
||||
height: 100%;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
&__nick-name {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
&__release-date {
|
||||
font-size: 22rpx;
|
||||
color: $tn-font-sub-color;
|
||||
}
|
||||
|
||||
&__content {
|
||||
height: 140rpx;
|
||||
&__data {
|
||||
width: 60%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
&__title {
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
&__desc {
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
&__main-image {
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
border-radius: 5rpx;
|
||||
overflow: hidden;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -39,6 +39,14 @@
|
||||
</tn-slider>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="配合formItem使用">
|
||||
<tn-form>
|
||||
<tn-form-item label="价格区间" :labelWidth="140">
|
||||
<tn-slider v-model="value8"></tn-slider>
|
||||
</tn-form-item>
|
||||
</tn-form>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
@@ -60,7 +68,8 @@
|
||||
value4: 0,
|
||||
value5: 0,
|
||||
value6: 0,
|
||||
value7: 0
|
||||
value7: 0,
|
||||
value8: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
BIN
componentsPage/static/images/empty/cart.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
componentsPage/static/images/empty/comment.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
componentsPage/static/images/empty/data.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
componentsPage/static/images/empty/network.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
componentsPage/static/images/empty/page.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
componentsPage/static/images/empty/permission.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
componentsPage/static/images/empty/search.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
68
componentsPage/subsection/subsection.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<view class="components-subsection tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>分段器</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基本使用">
|
||||
<tn-subsection :list="list"></tn-subsection>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="按钮模式">
|
||||
<tn-subsection :list="list" mode="button"></tn-subsection>
|
||||
<view class="tn-margin-top">
|
||||
<tn-subsection :list="list" mode="button" :borderRadius="50"></tn-subsection>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="取消切换动画">
|
||||
<tn-subsection :list="list" :animation="false"></tn-subsection>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="贝塞尔曲线切换动画">
|
||||
<tn-subsection :list="list" animationType="cubic-bezier"></tn-subsection>
|
||||
<view class="tn-margin-top">
|
||||
<tn-subsection :list="list" mode="button" :borderRadius="50" animationType="cubic-bezier"></tn-subsection>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="选中字体设置为粗体">
|
||||
<tn-subsection :list="list" :bold="true"></tn-subsection>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义样式">
|
||||
<tn-subsection :list="list" :height="40" :fontSize="20"></tn-subsection>
|
||||
<view class="tn-margin-top">
|
||||
<tn-subsection :list="list" mode="button" :borderRadius="50" backgroundColor="tn-cool-bg-color-9" buttonColor="tn-cool-bg-color-7" inactiveColor="#FFFFFF" activeColor="#27A1BA"></tn-subsection>
|
||||
</view>
|
||||
<view class="tn-margin-top">
|
||||
<tn-subsection :list="list" :borderRadius="50" backgroundColor="#FFFFFF" buttonColor="#E83A30" inactiveColor="#838383"></tn-subsection>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsSubsection',
|
||||
components: { demoTitle },
|
||||
data() {
|
||||
return {
|
||||
list: ['全部','未付款','待发货','待收货','待评价']
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view class="components-verification-code-input tn-safe-area-inset-bottom">
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>验证码输入</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基础使用">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value1"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="居中提示线">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value2" mode="middleLine"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="底部提示线">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value3" mode="bottomLine"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="修改验证码长度">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value4" :maxLength="6"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="使用圆点隐藏已输入">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value5" :dotFill="true"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="不带呼吸效果">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value6" :breathe="false"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="字体加粗">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value7" :bold="true"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义样式">
|
||||
<view class="tn-bg-white">
|
||||
<tn-verification-code-input v-model="value8" :fontSize="40" :inputWidth="60" activeColor="#3D7EFF" inactiveColor="#9EBEFF"></tn-verification-code-input>
|
||||
</view>
|
||||
</demo-title>
|
||||
|
||||
<view class="tn-padding-bottom-lg"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsVerificationCode',
|
||||
components: { demoTitle },
|
||||
data() {
|
||||
return {
|
||||
value1: '24',
|
||||
value2: '',
|
||||
value3: '',
|
||||
value4: '',
|
||||
value5: '',
|
||||
value6: '',
|
||||
value7: '',
|
||||
value8: '',
|
||||
value9: '',
|
||||
value10: '',
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.components-verification-code-input {
|
||||
background-color: $tn-bg-gray-color;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||