8000 Update form-rating.js · bootstrap-vue/bootstrap-vue@5f39a22 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f39a22

Browse files
committed
Update form-rating.js
1 parent 3d6b935 commit 5f39a22

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/components/form-rating/form-rating.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import {
99
PROP_TYPE_STRING
1010
} from '../../constants/props'
1111
import { CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_DOWN } from '../../constants/key-codes'
12+
import {
13+
SLOT_NAME_ICON_CLEAR,
14+
SLOT_NAME_ICON_EMPTY,
15+
SLOT_NAME_ICON_FULL,
16+
SLOT_NAME_ICON_HALF
17+
} from '../../constants/slots'
1218
import { arrayIncludes, concat } from '../../utils/array'
1319
import { attemptBlur, attemptFocus } from '../../utils/dom'
1420
import { stopEvent } from '../../utils/events'
@@ -295,7 +301,7 @@ export const BFormRating = /*#__PURE__*/ Vue.extend({
295301

296302
if (showClear && !disabled && !readonly) {
297303
const $icon = h('span', { staticClass: 'b-rating-icon' }, [
298-
($scopedSlots['icon-clear'] || this.iconClearFn)()
304+
($scopedSlots[SLOT_NAME_ICON_CLEAR] || this.iconClearFn)()
299305
])
300306
$content.push(
301307
h(
@@ -329,9 +335,9 @@ export const BFormRating = /*#__PURE__*/ Vue.extend({
329335
},
330336
on: { selected: this.onSelected },
331337
scopedSlots: {
332-
empty: $scopedSlots['icon-empty'] || this.iconEmptyFn,
333-
half: $scopedSlots['icon-half'] || this.iconHalfFn,
334-
full: $scopedSlots['icon-full'] || this.iconFullFn
338+
empty: $scopedSlots[SLOT_NAME_ICON_EMPTY] || this.iconEmptyFn,
339+
half: $scopedSlots[SLOT_NAME_ICON_HALF] || this.iconHalfFn,
340+
full: $scopedSlots[SLOT_NAME_ICON_FULL] || this.iconFullFn
335341
},
336342
key: index
337343
})

0 commit comments

Comments
 (0)
0