🌐 AI搜索 & 代理 主页
Skip to content

Commit 0875ba1

Browse files
authored
Update form-spinbutton.js
1 parent 7a18550 commit 0875ba1

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/components/form-spinbutton/form-spinbutton.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
440440
const hasValue = !isNull(value)
441441
const formatter = isFunction(this.formatterFn) ? this.formatterFn : this.defaultFormatter
442442

443-
const makeButton = (stepper, label, IconCmp, keyRef, shortcut, btnDisabled, slotname) => {
443+
const makeButton = (stepper, label, IconCmp, keyRef, shortcut, btnDisabled, slotName) => {
444444
const $icon = h(IconCmp, {
445445
props: { scale: this.hasFocus ? 1.5 : 1.25 },
446446
attrs: { 'aria-hidden': 'true' }
@@ -478,14 +478,26 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
478478
touchstart: handler
479479
}
480480
},
481-
[h('div', {}, [this.normalizeSlot(slotname, scope) || $icon])]
481+
[h('div', {}, [this.normalizeSlot(slotName, scope) || $icon])]
482482
)
483483
}
484484
// TODO: Add button disabled state when `wrap` is `false` and at value max/min
485-
const $increment =
486-
makeButton(this.stepUp, this.labelIncrement, BIconPlus, 'inc', 'ArrowUp', 'increment')
487-
const $decrement =
488-
makeButton(this.stepDown, this.labelDecrement, BIconDash, 'dec', 'ArrowDown', 'decrement')
485+
const $increment = makeButton(
486+
this.stepUp,
487+
this.labelIncrement,
488+
BIconPlus,
489+
'inc',
490+
'ArrowUp',
491+
'increment'
492+
)
493+
const $decrement = makeButton(
494+
this.stepDown,
495+
this.labelDecrement,
496+
BIconDash,
497+
'dec',
498+
'ArrowDown',
499+
'decrement'
500+
)
489501

490502
let $hidden = h()
491503
if (this.name && !isDisabled) {

0 commit comments

Comments
 (0)