[Improvement] Sku: optimize DOM (#704)
This commit is contained in:
@@ -57,6 +57,7 @@ export default create({
|
||||
currentNum(num) {
|
||||
this.skuEventBus.$emit('sku:numChange', num);
|
||||
},
|
||||
|
||||
stepperLimit(limit) {
|
||||
if (limit < this.currentNum) {
|
||||
this.currentNum = limit;
|
||||
@@ -71,6 +72,7 @@ export default create({
|
||||
}
|
||||
return this.skuStockNum;
|
||||
},
|
||||
|
||||
quotaText() {
|
||||
const { quotaText } = this.customStepperConfig;
|
||||
let text = '';
|
||||
@@ -83,6 +85,7 @@ export default create({
|
||||
|
||||
return text;
|
||||
},
|
||||
|
||||
stepperLimit() {
|
||||
const quotaLimit = this.quota - this.quotaUsed;
|
||||
let limit;
|
||||
@@ -105,6 +108,7 @@ export default create({
|
||||
setCurrentNum(num) {
|
||||
this.currentNum = num;
|
||||
},
|
||||
|
||||
onOverLimit(action) {
|
||||
this.skuEventBus.$emit('sku:overLimit', {
|
||||
action,
|
||||
@@ -113,6 +117,7 @@ export default create({
|
||||
quotaUsed: this.quotaUsed
|
||||
});
|
||||
},
|
||||
|
||||
onChange(currentValue) {
|
||||
const { handleStepperChange } = this.customStepperConfig;
|
||||
handleStepperChange && handleStepperChange(currentValue);
|
||||
|
||||
Reference in New Issue
Block a user