mirror of
https://gitee.com/TSpecific/tuniao-ui.git
synced 2026-03-07 08:14:01 +08:00
修改$t为$tn
修改部分函数api的名称
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
// 点击了选项
|
||||
clickActionSheetItem(index) {
|
||||
if (index === 1) {
|
||||
this.$t.message.toast('选择正确')
|
||||
this.$tn.message.toast('选择正确')
|
||||
}
|
||||
this.closedActionSheet()
|
||||
},
|
||||
@@ -136,4 +136,4 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
// 点击悬浮按钮的内容
|
||||
clickFabItem(e) {
|
||||
this.$t.message.toast(`点击了第 ${e.index} 个选项`)
|
||||
this.$tn.message.toast(`点击了第 ${e.index} 个选项`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,4 +193,4 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -89,9 +89,9 @@
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dynamicDemoTemplate from '@/libs/components/dynamic-demo-template.vue'
|
||||
export default {
|
||||
@@ -201,7 +201,7 @@
|
||||
{
|
||||
// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
|
||||
validator: (rule, value, callback) => {
|
||||
return this.$t.test.chinese(value);
|
||||
return this.$tn.test.chinese(value);
|
||||
},
|
||||
message: '姓名必须为中文',
|
||||
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
|
||||
@@ -448,7 +448,7 @@
|
||||
if (valid) {
|
||||
// 验证通过
|
||||
if (!this.model.agreement) {
|
||||
this.$t.message.toast('请勾选协议')
|
||||
this.$tn.message.toast('请勾选协议')
|
||||
return
|
||||
}
|
||||
} else {
|
||||
@@ -480,15 +480,15 @@
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
if (this.$refs.code.canGetCode) {
|
||||
this.$t.message.loading('正在获取验证码')
|
||||
this.$tn.message.loading('正在获取验证码')
|
||||
setTimeout(() => {
|
||||
this.$t.message.closeLoading()
|
||||
this.$t.message.toast('验证码已经发送')
|
||||
this.$tn.message.closeLoading()
|
||||
this.$tn.message.toast('验证码已经发送')
|
||||
// 通知组件开始计时
|
||||
this.$refs.code.start()
|
||||
}, 2000)
|
||||
} else {
|
||||
this.$t.message.toast(this.$refs.code.secNum + '秒后再重试')
|
||||
this.$tn.message.toast(this.$refs.code.secNum + '秒后再重试')
|
||||
}
|
||||
},
|
||||
// 验证码倒计时时间改变
|
||||
@@ -504,9 +504,9 @@
|
||||
this.model.agreement = event.value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.agreement {
|
||||
@@ -519,5 +519,5 @@
|
||||
color: $tn-font-sub-color;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,126 +1,126 @@
|
||||
<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="基础" :contentPadding="false">
|
||||
<tn-goods-nav></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="显示阴影" :contentPadding="false">
|
||||
<tn-goods-nav :shadow="true"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="选项设置为头像" :contentPadding="false">
|
||||
<tn-goods-nav :options="avatarOptions"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置角标" :contentPadding="false">
|
||||
<tn-goods-nav :options="countOptions"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置边距按钮" :contentPadding="false">
|
||||
<tn-goods-nav buttonType="paddingRect"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置圆角按钮" :contentPadding="false">
|
||||
<tn-goods-nav buttonType="round"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="不设置选项" :contentPadding="false">
|
||||
<tn-goods-nav :options="[]"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义颜色" :contentPadding="false">
|
||||
<tn-goods-nav :options="customOptions" buttonType="round" :buttonGroups="customButtonGroups"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="固定在底部" :contentPadding="false">
|
||||
<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>
|
||||
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed>商品导航</tn-nav-bar>
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<demo-title title="基础" :contentPadding="false">
|
||||
<tn-goods-nav></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="显示阴影" :contentPadding="false">
|
||||
<tn-goods-nav :shadow="true"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="选项设置为头像" :contentPadding="false">
|
||||
<tn-goods-nav :options="avatarOptions"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置角标" :contentPadding="false">
|
||||
<tn-goods-nav :options="countOptions"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置边距按钮" :contentPadding="false">
|
||||
<tn-goods-nav buttonType="paddingRect"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="设置圆角按钮" :contentPadding="false">
|
||||
<tn-goods-nav buttonType="round"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="不设置选项" :contentPadding="false">
|
||||
<tn-goods-nav :options="[]"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="自定义颜色" :contentPadding="false">
|
||||
<tn-goods-nav :options="customOptions" buttonType="round" :buttonGroups="customButtonGroups"></tn-goods-nav>
|
||||
</demo-title>
|
||||
|
||||
<demo-title title="固定在底部" :contentPadding="false">
|
||||
<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>
|
||||
<script>
|
||||
import demoTitle from '@/libs/components/demo-title.vue'
|
||||
export default {
|
||||
name: 'ComponentsGoodsNav',
|
||||
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'
|
||||
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.message.toast(`点击了第${e.index}个选项`)
|
||||
},
|
||||
// 按钮点击事件
|
||||
onButtonClick(e) {
|
||||
this.$t.message.toast(`点击了第${e.index}个按钮`)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选项点击事件
|
||||
onOptionClick(e) {
|
||||
this.$tn.message.toast(`点击了第${e.index}个选项`)
|
||||
},
|
||||
// 按钮点击事件
|
||||
onButtonClick(e) {
|
||||
this.$tn.message.toast(`点击了第${e.index}个按钮`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.components-goods-nav {
|
||||
background-color: $tn-bg-gray-color;
|
||||
min-height: 100vh;
|
||||
.components-goods-nav {
|
||||
background-color: $tn-bg-gray-color;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
console.log('上传文件列表发生改变', lists, index);
|
||||
this.lists.splice(0, this.lists.length)
|
||||
this.$nextTick(() => {
|
||||
this.lists = this.$t.deepClone(lists)
|
||||
this.lists = this.$tn.deepClone(lists)
|
||||
if (this.customStyle && lists.length > 4) {
|
||||
this.fullWindowsScroll = true
|
||||
} else {
|
||||
@@ -270,4 +270,4 @@
|
||||
justify-content: center;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -194,15 +194,15 @@
|
||||
this.inputValue += e
|
||||
} else if (this.mode === 'car') {
|
||||
// 判断输入的值是否正确
|
||||
if (this.currentLicensePlateIndex === 0 && !this.$t.test.chinese(e)) {
|
||||
this.$t.message.toast('车牌归属地选择错误')
|
||||
if (this.currentLicensePlateIndex === 0 && !this.$tn.test.chinese(e)) {
|
||||
this.$tn.message.toast('车牌归属地选择错误')
|
||||
return
|
||||
} else if (this.currentLicensePlateIndex === 1 && !this.$t.test.letter(e)) {
|
||||
this.$t.message.toast('车牌归属地字母选择错误')
|
||||
} else if (this.currentLicensePlateIndex === 1 && !this.$tn.test.letter(e)) {
|
||||
this.$tn.message.toast('车牌归属地字母选择错误')
|
||||
return
|
||||
}
|
||||
if (this.currentLicensePlateIndex !== 0 && !this.$t.test.enOrNum(e)) {
|
||||
this.$t.message.toast('车牌号码选择错误')
|
||||
if (this.currentLicensePlateIndex !== 0 && !this.$tn.test.enOrNum(e)) {
|
||||
this.$tn.message.toast('车牌号码选择错误')
|
||||
return
|
||||
}
|
||||
// this.licensePlateValue[this.currentLicensePlateIndex] = e
|
||||
@@ -216,11 +216,11 @@
|
||||
},
|
||||
// 点击了取消按钮
|
||||
onCancel() {
|
||||
this.$t.message.toast('点击了取消按钮')
|
||||
this.$tn.message.toast('点击了取消按钮')
|
||||
},
|
||||
// 点击了确认按钮
|
||||
onConfirm() {
|
||||
this.$t.message.toast('点击了确认按钮')
|
||||
this.$tn.message.toast('点击了确认按钮')
|
||||
this.value = false
|
||||
},
|
||||
// 点击了退格按钮
|
||||
|
||||
@@ -1,102 +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>
|
||||
<!-- 顶部自定义导航 -->
|
||||
<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 {
|
||||
export default {
|
||||
name: 'ComponentsLazyLoad',
|
||||
data() {
|
||||
return {
|
||||
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' }
|
||||
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.randomInt(0, this.data.length - 1)
|
||||
this.list.push({
|
||||
src: this.data[index].src
|
||||
})
|
||||
}
|
||||
this.status = 'loadmore'
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
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.$tn.number.randomInt(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;
|
||||
}
|
||||
.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>
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
// 点击按钮
|
||||
clickBtn(event) {
|
||||
this.show = false
|
||||
this.$t.message.toast('点击了第'+(event.index + 1)+'个按钮')
|
||||
this.$tn.message.toast('点击了第'+(event.index + 1)+'个按钮')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -274,4 +274,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
// 点击取消按钮
|
||||
cancelPicker(event) {
|
||||
this.$t.message.toast('点击了取消按钮')
|
||||
this.$tn.message.toast('点击了取消按钮')
|
||||
},
|
||||
// 点击确认按钮
|
||||
confirmPicker(event) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<block v-for="(item, index) in 14" :key="index">
|
||||
<view class="tn-flex-1 tn-padding-sm tn-margin-xs tn-radius">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon3__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" :class="[$t.color.getRandomCoolBgClass(index)]">
|
||||
<view class="icon3__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" :class="[$tn.color.getRandomCoolBgClass(index)]">
|
||||
<view class="tn-icon-gloves-fill"></view>
|
||||
</view>
|
||||
<view class="tn-color-black tn-text-lg tn-text-center">
|
||||
@@ -33,7 +33,7 @@
|
||||
<block v-for="(item, index) in 14" :key="index">
|
||||
<view class="tn-flex-1 tn-padding-sm tn-margin-xs tn-radius">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon3__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" :class="[$t.color.getRandomCoolBgClass(index)]">
|
||||
<view class="icon3__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" :class="[$tn.color.getRandomCoolBgClass(index)]">
|
||||
<view class="tn-icon-gloves-fill"></view>
|
||||
</view>
|
||||
<view class="tn-color-black tn-text-lg tn-text-center">
|
||||
@@ -52,7 +52,7 @@
|
||||
<block v-for="(item, index) in 14" :key="index">
|
||||
<view class="tn-flex-1 tn-padding-sm tn-margin-xs tn-radius">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon3__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" :class="[$t.color.getRandomCoolBgClass(index)]">
|
||||
<view class="icon3__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" :class="[$tn.color.getRandomCoolBgClass(index)]">
|
||||
<view class="tn-icon-gloves-fill"></view>
|
||||
</view>
|
||||
<view class="tn-color-black tn-text-lg tn-text-center">
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
// 点击取消按钮
|
||||
cancelSelect(event) {
|
||||
this.$t.message.toast('点击了取消按钮')
|
||||
this.$tn.message.toast('点击了取消按钮')
|
||||
},
|
||||
// 点击确认按钮
|
||||
confirmSelect(event) {
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
resolve()
|
||||
return
|
||||
}
|
||||
this.$t.message.modal('操作提示','当前已经打开了签名板,是否确认需要关闭', () => {
|
||||
this.$tn.message.modal('操作提示','当前已经打开了签名板,是否确认需要关闭', () => {
|
||||
resolve()
|
||||
}, true, () => {
|
||||
reject()
|
||||
@@ -131,4 +131,4 @@
|
||||
.button {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -205,9 +205,9 @@
|
||||
// 处理swiperActionItem点击事件
|
||||
onSwiperItemClick(e) {
|
||||
if (e.type === 'button') {
|
||||
this.$t.message.toast(`点击了第${e.index}个按钮`)
|
||||
this.$tn.message.toast(`点击了第${e.index}个按钮`)
|
||||
} else if (e.type === 'item') {
|
||||
this.$t.message.toast(`点击了item标签,name为${e.name}`)
|
||||
this.$tn.message.toast(`点击了item标签,name为${e.name}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,4 +241,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
},
|
||||
// 关闭Tips
|
||||
closeTips() {
|
||||
this.$t.message.toast('tips提示框关闭了')
|
||||
this.$tn.message.toast('tips提示框关闭了')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -130,4 +130,4 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
},
|
||||
// 关闭Toast
|
||||
closedToast() {
|
||||
this.$t.message.toast('Toast关闭')
|
||||
this.$tn.message.toast('Toast关闭')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -136,4 +136,4 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -119,15 +119,15 @@
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
if (this.$refs.code.canGetCode) {
|
||||
this.$t.message.loading('正在获取验证码')
|
||||
this.$tn.message.loading('正在获取验证码')
|
||||
setTimeout(() => {
|
||||
this.$t.message.closeLoading()
|
||||
this.$t.message.toast('验证码已经发送')
|
||||
this.$tn.message.closeLoading()
|
||||
this.$tn.message.toast('验证码已经发送')
|
||||
// 通知组件开始计时
|
||||
this.$refs.code.start()
|
||||
}, 2000)
|
||||
} else {
|
||||
this.$t.message.toast(this.$refs.code.secNum + '秒后再重试')
|
||||
this.$tn.message.toast(this.$refs.code.secNum + '秒后再重试')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -138,11 +138,11 @@
|
||||
|
||||
// 开始倒计时
|
||||
codeStart() {
|
||||
this.$t.message.toast('倒计时开始')
|
||||
this.$tn.message.toast('倒计时开始')
|
||||
},
|
||||
// 结束倒计时
|
||||
codeEnd() {
|
||||
this.$t.message.toast('倒计时结束')
|
||||
this.$tn.message.toast('倒计时结束')
|
||||
},
|
||||
// 正在倒计时
|
||||
codeChange(event) {
|
||||
@@ -155,4 +155,4 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user