未验证 提交 539167df 编写于 作者: Y yun小梦 提交者: GitHub

Update ypicker.js

上级 ccb1f2b8
const meng_date = new Date(); const meng_date = new Date();
let sec=false;
let years = []; let years = [];
let months = []; let months = [];
let days = []; let days = [];
...@@ -50,10 +49,6 @@ Component({ ...@@ -50,10 +49,6 @@ Component({
lifetimes:{ lifetimes:{
// 这时节点树已创建完成,开始可以用setData渲染节点,但还无法操作节点 // 这时节点树已创建完成,开始可以用setData渲染节点,但还无法操作节点
attached:function(){ attached:function(){
console.log(this.properties.seo)
if(this.properties.seo && this.properties.seo==true){
sec=true
}
//设置默认的年份 //设置默认的年份
this.setData({ this.setData({
choose_year: this.data.multiArray[0][0] choose_year: this.data.multiArray[0][0]
...@@ -64,11 +59,12 @@ Component({ ...@@ -64,11 +59,12 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
seo:Boolean, seo:String,
open:Boolean, open:Boolean,
size:String, size:String,
color:String, color:String,
time:String, time:String,
defaulttext:String,
holder:String holder:String
}, },
...@@ -77,8 +73,8 @@ Component({ ...@@ -77,8 +73,8 @@ Component({
*/ */
data: { data: {
time: '', time: '',
multiArray: !sec?[years, months, days, hours, minutes]:[years, months, days, hours, minutes,seconds], multiArray: (!Component.seo=="true")?[years, months, days, hours, minutes]:[years, months, days, hours, minutes,seconds],
multiIndex: !sec?[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()], multiIndex: (!Component.seo=="true")?[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()],
choose_year:'' choose_year:''
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册