@@ -69,7 +69,7 @@ export default {
},
mounted: function() {
this.$nextTick(function() {
- if (this.shape === "circle") {
+ if (this.shape == "circle") {
var radius = this.$el.offsetHeight / 2;
this.$set(this.sizeStyle, "paddingLeft", radius / 2 + "px");
this.$set(this.sizeStyle, "paddingRight", radius / 2 + "px");
@@ -96,12 +96,12 @@ export default {
},
colorStyle: function() {
var style = {};
- if (this.type === "fill") {
+ if (this.type == "fill") {
// eslint-disable-next-line
this.fillColor && (style.background = this.fillColor);
}
if (this.fontColor) {
- if (this.type === "ghost") {
+ if (this.type == "ghost") {
style.borderColor = this.fontColor;
}
style.color = this.fontColor;
@@ -127,10 +127,10 @@ export default {
};
},
showQuarter: function() {
- return this.shape === "quarter";
+ return this.shape == "quarter";
},
showCoupon: function() {
- return this.shape === "coupon";
+ return this.shape == "coupon";
}
},
methods: {
@@ -139,6 +139,11 @@ export default {
return str.replace(re, function($0, $1) {
return $1.toUpperCase();
});
+ },
+ onClick: function() {
+ if (this.$listeners['click']) {
+ this.$emit('click');
+ }
}
}
};
--
libgit2 0.21.0