新增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:
JaylenTech
2022-03-16 09:13:58 +08:00
parent 4883c3ff4c
commit 81579ccee5
56 changed files with 6297 additions and 487 deletions

View 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>