vuikit
Version:
A responsive Vue UI library for web site interfaces based on UIkit
69 lines (61 loc) • 1.55 kB
JavaScript
/**
* Vuikit 0.8.10
* (c) 2018 Miljan Aleksic
* @license MIT
**/
/* Substantial part of the code is adapted from UIkit,
Copyright (c) 2013-2018 YOOtheme GmbH, getuikit.com */
import { mergeData } from './util/vue';
import { isUndefined } from './util/lang';
var ElementBreadcrumb = {
functional: true,
render: function (h, ref) {
var props = ref.props;
var data = ref.data;
var children = ref.children;
return h('ul', mergeData(data, {
class: 'uk-breadcrumb'
}), children)
}
}
var ElementBreadcrumbItem = {
functional: true,
props: {
href: String,
target: String,
disabled: {
type: Boolean,
default: false
}
},
render: function (h, ref) {
var props = ref.props;
var data = ref.data;
var children = ref.children;
var disabled = props.disabled;
var href = props.href;
var target = props.target;
return h('li', mergeData(data, {
class: {
'uk-disabled': disabled
}
}), [
(isUndefined(href) || disabled)
? h('span', children)
: h('a', { attrs: { href: href, target: target } }, children)
])
}
}
var breadcrumb = {
name: 'VkBreadcrumb',
functional: true,
props: ElementBreadcrumb.props,
render: ElementBreadcrumb.render
}
var breadcrumb_Item = {
name: 'VkBreadcrumbItem',
functional: true,
props: ElementBreadcrumbItem.props,
render: ElementBreadcrumbItem.render
}
export { ElementBreadcrumb, ElementBreadcrumbItem, breadcrumb as Breadcrumb, breadcrumb_Item as BreadcrumbItem };