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.
 
 
 
 
StackGenVis/frontend/node_modules/bootstrap-vue/src/components/card/card-img-lazy.js

76 lines
1.6 KiB

import Vue from '../../utils/vue'
import { omit } from '../../utils/object'
import { mergeData } from 'vue-functional-data-merge'
import { BImgLazy, props as imgLazyProps } from '../image/img-lazy'
// Copy of `<b-img-lazy>` props, and remove conflicting/non-applicable props
// The `omit()` util creates a new object, so we can just pass the original props
const lazyProps = omit(imgLazyProps, [
'left',
'right',
'center',
'block',
'rounded',
'thumbnail',
'fluid',
'fluidGrow'
])
export const props = {
...lazyProps,
top: {
type: Boolean,
default: false
},
bottom: {
type: Boolean,
default: false
},
start: {
type: Boolean,
default: false
},
left: {
// alias of 'start'
type: Boolean,
default: false
},
end: {
type: Boolean,
default: false
},
right: {
// alias of 'end'
type: Boolean,
default: false
}
}
// @vue/component
export const BCardImgLazy = /*#__PURE__*/ Vue.extend({
name: 'BCardImgLazy',
functional: true,
props,
render(h, { props, data }) {
let baseClass = 'card-img'
if (props.top) {
baseClass += '-top'
} else if (props.right || props.end) {
baseClass += '-right'
} else if (props.bottom) {
baseClass += '-bottom'
} else if (props.left || props.start) {
baseClass += '-left'
}
// False out the left/center/right props before passing to b-img-lazy
const lazyProps = { ...props, left: false, right: false, center: false }
return h(
BImgLazy,
mergeData(data, {
class: [baseClass],
props: lazyProps
})
)
}
})