|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
cssScale: 2.0 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
childContext: ["text"], |
|
|
|
|
childContext: ["text", "cssScale"], |
|
|
|
|
|
|
|
|
|
computed: { |
|
|
|
|
text: function () { |
|
|
|
@ -41,10 +41,20 @@
|
|
|
|
|
}); |
|
|
|
|
BI.model("demo.model", Model); |
|
|
|
|
|
|
|
|
|
var TempModel = BI.inherit(BI.Model, { |
|
|
|
|
state: function () { |
|
|
|
|
return { |
|
|
|
|
cssScale: 1.0 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
childContext: ["cssScale"], |
|
|
|
|
}); |
|
|
|
|
BI.model("demo.temp_model", TempModel); |
|
|
|
|
|
|
|
|
|
var oldFormat = BI.pixFormat; |
|
|
|
|
BI.pixFormat = function (pix, border) { |
|
|
|
|
var context = BI.useContext("cssScale"); |
|
|
|
|
if (!context) { |
|
|
|
|
if (!context || context.model.cssScale <=1) { |
|
|
|
|
return oldFormat.apply(this, arguments); |
|
|
|
|
} |
|
|
|
|
if (!BI.isNumber(pix)) { |
|
|
|
@ -59,8 +69,8 @@
|
|
|
|
|
var oldPix = BI.toPix; |
|
|
|
|
BI.toPix = function (pix, border) { |
|
|
|
|
var context = BI.useContext("cssScale"); |
|
|
|
|
if (!context) { |
|
|
|
|
return oldPix.apply(this, arguments); |
|
|
|
|
if (!context || context.model.cssScale <=1) { |
|
|
|
|
return oldFormat.apply(this, arguments); |
|
|
|
|
} |
|
|
|
|
if (!BI.isNumber(pix)) { |
|
|
|
|
return pix; |
|
|
|
@ -130,6 +140,42 @@
|
|
|
|
|
day: 15 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
type: "bi.down_list_combo", |
|
|
|
|
cls: "bi-border", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
popup: { |
|
|
|
|
_store: function () { |
|
|
|
|
return BI.Models.getModel("demo.temp_model"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
value: [{value: 2}, {value: 3, childValue: 4}], |
|
|
|
|
items: [[{ |
|
|
|
|
text: "属于", |
|
|
|
|
value: 1, |
|
|
|
|
cls: "dot-e-font" |
|
|
|
|
}, { |
|
|
|
|
text: "不属于", |
|
|
|
|
value: 2, |
|
|
|
|
cls: "dot-e-font" |
|
|
|
|
}], [{ |
|
|
|
|
el: { |
|
|
|
|
text: "大于", |
|
|
|
|
value: 3, |
|
|
|
|
iconCls1: "dot-e-font" |
|
|
|
|
}, |
|
|
|
|
value: 3, |
|
|
|
|
children: [{ |
|
|
|
|
text: "固定值", |
|
|
|
|
value: 4, |
|
|
|
|
cls: "dot-e-font" |
|
|
|
|
}, { |
|
|
|
|
text: "平均值", |
|
|
|
|
value: 5, |
|
|
|
|
cls: "dot-e-font" |
|
|
|
|
}] |
|
|
|
|
}]] |
|
|
|
|
}] |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|