StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.3 KiB
57 lines
1.3 KiB
import Vue from '../../utils/vue'
|
|
import { requestAF } from '../../utils/dom'
|
|
import normalizeSlotMixin from '../../mixins/normalize-slot'
|
|
import { BLink, propsFactory as linkPropsFactory } from '../link/link'
|
|
|
|
export const props = linkPropsFactory()
|
|
|
|
// @vue/component
|
|
export const BDropdownItem = /*#__PURE__*/ Vue.extend({
|
|
name: 'BDropdownItem',
|
|
mixins: [normalizeSlotMixin],
|
|
inheritAttrs: false,
|
|
inject: {
|
|
bvDropdown: {
|
|
default: null
|
|
}
|
|
},
|
|
props: {
|
|
...props,
|
|
variant: {
|
|
type: String,
|
|
default: null
|
|
}
|
|
},
|
|
methods: {
|
|
closeDropdown() {
|
|
// Close on next animation frame to allow <b-link> time to process
|
|
requestAF(() => {
|
|
if (this.bvDropdown) {
|
|
this.bvDropdown.hide(true)
|
|
}
|
|
})
|
|
},
|
|
onClick(evt) {
|
|
this.$emit('click', evt)
|
|
this.closeDropdown()
|
|
}
|
|
},
|
|
render(h) {
|
|
return h('li', { attrs: { role: 'presentation' } }, [
|
|
h(
|
|
BLink,
|
|
{
|
|
props: this.$props,
|
|
staticClass: 'dropdown-item',
|
|
class: {
|
|
[`text-${this.variant}`]: this.variant && !(this.active || this.disabled)
|
|
},
|
|
attrs: { ...this.$attrs, role: 'menuitem' },
|
|
on: { click: this.onClick },
|
|
ref: 'item'
|
|
},
|
|
this.normalizeSlot('default')
|
|
)
|
|
])
|
|
}
|
|
})
|
|
|