iapyang 7 years ago
parent
commit
013e539339
  1. 4
      dist/_fineui.min.js
  2. 9
      dist/bundle.js
  3. 28
      dist/bundle.min.js
  4. 105
      dist/demo.js
  5. 9
      dist/fineui.js
  6. 4
      dist/fineui.min.js
  7. 9
      dist/widget.js
  8. 6
      src/widget/dynamicdate/dynamicdate.caculate.js

4
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

9
dist/bundle.js vendored

@ -90320,6 +90320,11 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
var date = BI.getDate(); var date = BI.getDate();
return this.getCalculationByDate(date, obj);
},
getCalculationByDate: function (date, obj) {
if (BI.isNotNull(obj.year)) { if (BI.isNotNull(obj.year)) {
date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate()); date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());
} }
@ -90342,6 +90347,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);
} }
return date; return date;
}, },
@ -90364,7 +90370,8 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
return date; return date;
} }
}); });
})();BI.DynamicDateCard = BI.inherit(BI.Widget, { })();
BI.DynamicDateCard = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-dynamic-date-card" baseCls: "bi-dynamic-date-card"

28
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

105
dist/demo.js vendored

@ -11017,111 +11017,6 @@ BI.shortcut("demo.tmp", Demo.Func);
}); });
BI.shortcut("demo.fix_global_watcher", Demo.Fix); BI.shortcut("demo.fix_global_watcher", Demo.Fix);
}());(function () {
var State = BI.inherit(Fix.Model, {
state: function () {
return {
name: "原始属性",
info: {
age: 12,
sex: "male",
birth: {
year: 2018,
month: 9,
day: 11
}
},
career: [{
a: 1,
b: 2,
c: 3
}]
};
},
computed: {
b: function () {
return this.model.name + "-计算属性";
},
birth: function () {
return this.model.info.birth;
}
}
});
Demo.Fix = BI.inherit(BI.Widget, {
_store: function () {
return new State();
},
watch: {
b: function () {
this.button.setText(this.model.b);
},
"birth.**": function () {
console.log(123);
}
},
render: function () {
var self = this;
return {
type: "bi.vertical",
items: [{
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.name = "这是改变后的属性";
},
text: this.model.b
}
}, {
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.birth.year = 2019;
},
text: "birthYearButton"
}
}, {
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.career.push({
year: 2017,
month: 3,
day: 24
});
},
text: "careerAddButton"
}
}, {
el: {
type: "bi.button",
ref: function () {
self.button = this;
},
handler: function () {
self.model.career[0].a = 24;
},
text: "careerChangeButton"
}
}]
};
},
mounted: function () {
}
});
BI.shortcut("demo.fix_immutable", Demo.Fix);
}());/** }());/**
* @Author: Young * @Author: Young
* @CreationDate 2017-11-06 10:32 * @CreationDate 2017-11-06 10:32

9
dist/fineui.js vendored

@ -90563,6 +90563,11 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
var date = BI.getDate(); var date = BI.getDate();
return this.getCalculationByDate(date, obj);
},
getCalculationByDate: function (date, obj) {
if (BI.isNotNull(obj.year)) { if (BI.isNotNull(obj.year)) {
date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate()); date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());
} }
@ -90585,6 +90590,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);
} }
return date; return date;
}, },
@ -90607,7 +90613,8 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
return date; return date;
} }
}); });
})();BI.DynamicDateCard = BI.inherit(BI.Widget, { })();
BI.DynamicDateCard = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-dynamic-date-card" baseCls: "bi-dynamic-date-card"

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

9
dist/widget.js vendored

@ -2753,6 +2753,11 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
var date = BI.getDate(); var date = BI.getDate();
return this.getCalculationByDate(date, obj);
},
getCalculationByDate: function (date, obj) {
if (BI.isNotNull(obj.year)) { if (BI.isNotNull(obj.year)) {
date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate()); date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());
} }
@ -2775,6 +2780,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);
} }
return date; return date;
}, },
@ -2797,7 +2803,8 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
return date; return date;
} }
}); });
})();BI.DynamicDateCard = BI.inherit(BI.Widget, { })();
BI.DynamicDateCard = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-dynamic-date-card" baseCls: "bi-dynamic-date-card"

6
src/widget/dynamicdate/dynamicdate.caculate.js

@ -7,6 +7,11 @@
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
var date = BI.getDate(); var date = BI.getDate();
return this.getCalculationByDate(date, obj);
},
getCalculationByDate: function (date, obj) {
if (BI.isNotNull(obj.year)) { if (BI.isNotNull(obj.year)) {
date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate()); date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());
} }
@ -29,6 +34,7 @@
if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) { if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {
date = this.getBeginDate(date, obj); date = this.getBeginDate(date, obj);
} }
return date; return date;
}, },

Loading…
Cancel
Save