dvant
Version:
A Vue.js 2.0 Mobile UI at dawnwin modified from Youzan
37 lines (31 loc) • 1.47 kB
JavaScript
;
exports.__esModule = true;
var _utils = require('../utils');
exports.default = (0, _utils.create)({
render: function render() {
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "van-nav-bar van-hairline--top-bottom", class: { 'van-nav-bar--fixed': _vm.fixed }, style: _vm.style }, [_c('div', { staticClass: "van-nav-bar__left", on: { "click": function click($event) {
_vm.$emit('click-left');
} } }, [_vm._t("left", [_vm.leftArrow ? _c('icon', { staticClass: "van-nav-bar__arrow", attrs: { "name": "arrow" } }) : _vm._e(), _vm.leftText ? _c('span', { staticClass: "van-nav-bar__text", domProps: { "textContent": _vm._s(_vm.leftText) } }) : _vm._e()])], 2), _c('div', { staticClass: "van-nav-bar__title" }, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2), _c('div', { staticClass: "van-nav-bar__right", on: { "click": function click($event) {
_vm.$emit('click-right');
} } }, [_vm._t("right", [_vm.rightText ? _c('span', { staticClass: "van-nav-bar__text", domProps: { "textContent": _vm._s(_vm.rightText) } }) : _vm._e()])], 2)]);
},
name: 'van-nav-bar',
props: {
title: String,
leftText: String,
rightText: String,
leftArrow: Boolean,
fixed: Boolean,
zIndex: {
type: Number,
default: 1
}
},
computed: {
style: function style() {
return {
zIndex: this.zIndex
};
}
}
});