mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Add debounced multiple computed property support.
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
type: Number,
|
||||
notify: true
|
||||
},
|
||||
computedFromMultipleValues: {
|
||||
type: Number,
|
||||
notify: true
|
||||
},
|
||||
camelNotifyingValue: {
|
||||
type: Number,
|
||||
notify: true
|
||||
@@ -25,13 +29,15 @@
|
||||
},
|
||||
computed: {
|
||||
computedvalue: 'computeValue(value)',
|
||||
computednotifyingvalue: 'computeNotifyingValue(notifyingvalue)'
|
||||
computednotifyingvalue: 'computeNotifyingValue(notifyingvalue)',
|
||||
computedFromMultipleValues: 'computeFromMultipleValues(sum1, sum2, divide)'
|
||||
},
|
||||
bind: {
|
||||
value: 'valueChanged',
|
||||
computedvalue: 'computedvalueChanged',
|
||||
notifyingvalue: 'notifyingvalueChanged',
|
||||
readonlyvalue: 'readonlyvalueChanged'
|
||||
readonlyvalue: 'readonlyvalueChanged',
|
||||
computedFromMultipleValues: 'computedFromMultipleValuesChanged'
|
||||
},
|
||||
valueChanged: function() {},
|
||||
computeValue: function(val) {
|
||||
@@ -42,7 +48,11 @@
|
||||
readonlyvalueChanged: function() {},
|
||||
computeNotifyingValue: function(val) {
|
||||
return val + 2;
|
||||
}
|
||||
},
|
||||
computeFromMultipleValues: function(sum1, sum2, divide) {
|
||||
return (sum1 + sum2) / divide;
|
||||
},
|
||||
computedFromMultipleValuesChanged: function() {}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user