提交 29afcd05 编写于 作者: 恪愚's avatar 恪愚

修复组件yPicker存在bug

上级 0cb014b9
......@@ -48,6 +48,7 @@ Component({
lifetimes:{
// 这时节点树已创建完成,开始可以用setData渲染节点,但还无法操作节点
attached:function(){
this.appd()
//设置默认的年份
this.setData({
choose_year: this.data.multiArray[0][0]
......@@ -80,14 +81,21 @@ Component({
*/
data: {
time: '',
multiArray: (!Component.seo==1)?[years, months, days, hours, minutes]:[years, months, days, hours, minutes,seconds],
multiIndex: (!Component.seo==1)?[10, meng_date.getMonth(), meng_date.getDate()-1, meng_date.getHours(), meng_date.getMinutes()]:[10, meng_date.getMonth(), meng_date.getDate()-1, meng_date.getHours(), meng_date.getMinutes(),meng_date.getSeconds()],
multiArray: [],
multiIndex: [],
choose_year:''
},
/**
* 组件的方法列表
*/
methods: {
appd(){
console.log(this.properties.seo)
this.setData({
multiArray: (!this.properties.seo==1)?[years, months, days, hours, minutes]:[years, months, days, hours, minutes,seconds],
multiIndex: (!this.properties.seo==1)?[10, meng_date.getMonth(), meng_date.getDate()-1, meng_date.getHours(), meng_date.getMinutes()]:[10, meng_date.getMonth(), meng_date.getDate()-1, meng_date.getHours(), meng_date.getMinutes(),meng_date.getSeconds()],
})
},
//获取时间日期 - 点进picker组件而什么也不干 && 每次触发完成后 -> 每次点击“确定”时携带值
bindMultiPickerChange: function(e) {
// console.log('picker发送选择改变,携带值为', e.detail.value)
......
......@@ -5,7 +5,8 @@ Page({
* 页面的初始数据
*/
data: {
url_one:'https://codechina.csdn.net/qq_43624878/yunUI',
url_two:'https://github.com/1314mxc/yunUI'
},
gonotice(){
......@@ -32,6 +33,25 @@ Page({
})
},
clipone(){
this.setclip(this.data.url_one)
},
cliptwo(){
this.setclip(this.data.url_two)
},
setclip(data){
wx.setClipboardData({
//准备复制的数据内容
data: data,
success: function (res) {
wx.showToast({
title: '链接复制成功',
});
}
});
},
/**
* 生命周期函数--监听页面加载
*/
......
......@@ -9,4 +9,18 @@
</view>
<view class="mxc3" bindtap="alphabetshow">
<text>去康康“自定义侧边栏字母导航组件”吧!</text>
</view>
<view class="loaded">
<view class="typing">更多内容,敬请期待 ...</view>
</view>
<view class="navigator">
<text>项目开源地址:</text>
<text class="url" bindlongtap="clipone">{{url_one}}</text>
<text>或:</text>
<text class="url" bindlongtap="cliptwo">{{url_two}}</text>
<text>在其中你可以看到详细代码及注释以及使用方式(本小程序版本只展示其中一种应用方式)</text>
</view>
\ No newline at end of file
......@@ -4,11 +4,12 @@ Page{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
overflow-y: auto;
}
view{
width: 46%;
min-height: 231rpx;
height: 489rpx;
background-color: rgba(0,0,0,.1);
overflow: hidden;
display: flex;
......@@ -16,4 +17,53 @@ view{
align-items: center;
margin-top: 26rpx;
margin-bottom: 24rpx;
}
.loaded{
width: 96%;
height: 180rpx;
background-color: rgba(0,0,0,.04);
margin-top: 7rpx;
overflow: hidden;
}
.loaded .typing{
display: inline-block;
width: 17.5em;
height: 1.25em;
border-right: 1px solid transparent;
animation: typing 3.5s steps(28, end), blink-caret .75s step-end infinite;
font-family: Consolas, Monaco;
word-break: break-all;
overflow: hidden;
background-color: transparent;
letter-spacing: 14rpx;
}
/* 打印效果 */
@keyframes typing {
from { width: 0; }
to { width: 18.5em; }
}
/* 光标闪啊闪 */
@keyframes blink-caret {
from, to { box-shadow: 1px 0 0 0 transparent; }
50% { box-shadow: 1px 0 0 0; }
}
.navigator{
width: 96%;
height: 500rpx;
margin: 20rpx auto;
background-color: rgba(0,0,0,.1);
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: space-around;
align-items: center;
overflow: hidden;
letter-spacing: -0.01rpx;
}
.navigator .url{
padding: 6rpx 0;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册