sz-mx-cabin-yjb
Advanced tools
Comparing version 0.0.40 to 0.0.41
@@ -104,20 +104,28 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
if (isMobile() && attrs[key][formkey] && attrs[key][formkey].type === 'singleSelect') { | ||
console.log('11'); | ||
if (!data[key][formkey] || Array.isArray(data[key][formkey]) && data[key][formkey].length === 0) { | ||
formdata[formkey] = ""; | ||
data[name] = []; | ||
newDataLoad[formkey] = []; | ||
} else { | ||
formdata[formkey] = data[key][formkey][0]; | ||
newDataLoad[formkey] = [].push(data[key][formkey]); | ||
newDataLoad[formkey] = [data[key][formkey]]; | ||
} | ||
console.log('111'); | ||
} | ||
if (isMobile() && attrs[key][formkey] && attrs[key][formkey].type === 'inputNumber') { | ||
console.log('22'); | ||
formdata[formkey] = Number(data[key][formkey]); | ||
newDataLoad[formkey] = data[key][formkey]; | ||
console.log('222'); | ||
} | ||
if (isMobile() && data[key][formkey] && isDate(data[key][formkey], attrs[key][formkey].type)) { | ||
console.log('33'); | ||
var format = attrs[key][formkey] ? attrs[key][formkey].format : 'YYYY-MM-DD'; | ||
formdata[formkey] = moment(data[key][formkey]).format(format); | ||
newDataLoad[formkey] = new Date(Date.parse(data[key][formkey])); | ||
console.log('333'); | ||
} | ||
@@ -158,4 +166,5 @@ | ||
sessionStorage.setItem('data', JSON.stringify(newdata)); | ||
console.log('看看这玩意?????', newDataLoad); // 数据初始化 | ||
console.log('---', data[name]); | ||
console.log('+++', newDataLoad); | ||
sessionStorage.setItem('data', JSON.stringify(newdata)); // 数据初始化 | ||
@@ -162,0 +171,0 @@ formInstance.setFieldsValue({// ...data[name], |
@@ -125,20 +125,28 @@ "use strict"; | ||
if ((0, _NumberUtil.isMobile)() && attrs[key][formkey] && attrs[key][formkey].type === 'singleSelect') { | ||
console.log('11'); | ||
if (!data[key][formkey] || Array.isArray(data[key][formkey]) && data[key][formkey].length === 0) { | ||
formdata[formkey] = ""; | ||
data[name] = []; | ||
newDataLoad[formkey] = []; | ||
} else { | ||
formdata[formkey] = data[key][formkey][0]; | ||
newDataLoad[formkey] = [].push(data[key][formkey]); | ||
newDataLoad[formkey] = [data[key][formkey]]; | ||
} | ||
console.log('111'); | ||
} | ||
if ((0, _NumberUtil.isMobile)() && attrs[key][formkey] && attrs[key][formkey].type === 'inputNumber') { | ||
console.log('22'); | ||
formdata[formkey] = Number(data[key][formkey]); | ||
newDataLoad[formkey] = data[key][formkey]; | ||
console.log('222'); | ||
} | ||
if ((0, _NumberUtil.isMobile)() && data[key][formkey] && isDate(data[key][formkey], attrs[key][formkey].type)) { | ||
console.log('33'); | ||
var format = attrs[key][formkey] ? attrs[key][formkey].format : 'YYYY-MM-DD'; | ||
formdata[formkey] = (0, _moment["default"])(data[key][formkey]).format(format); | ||
newDataLoad[formkey] = new Date(Date.parse(data[key][formkey])); | ||
console.log('333'); | ||
} | ||
@@ -179,4 +187,5 @@ | ||
sessionStorage.setItem('data', JSON.stringify(newdata)); | ||
console.log('看看这玩意?????', newDataLoad); // 数据初始化 | ||
console.log('---', data[name]); | ||
console.log('+++', newDataLoad); | ||
sessionStorage.setItem('data', JSON.stringify(newdata)); // 数据初始化 | ||
@@ -183,0 +192,0 @@ formInstance.setFieldsValue({// ...data[name], |
{ | ||
"name": "sz-mx-cabin-yjb", | ||
"version": "0.0.40", | ||
"version": "0.0.41", | ||
"description": "reactCabin", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
1217505
26267
83