UNPKG

vivo-ui

Version:

vivo ui component lib for vue

52 lines (48 loc) 1.88 kB
import '../../assets/common.css'; import Fade from '../fade/index'; (function () { if (typeof document !== 'undefined') { var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'), css = " .src-components-layer-index--layer--23oKe { position: fixed; z-index: 99999; left: 0; right: 0; top: 0; bottom: 0; } ";style.type = 'text/css';if (style.styleSheet) { style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }head.appendChild(style); } })(); var index = { render: function render() { var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('fade', _vm._b({ scopedSlots: _vm._u([{ key: "default", fn: function fn(slot) { return _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.show, expression: "show" }], class: [_vm.$style.layer, slot.className, _vm.className], style: [slot.styleObj, _vm.styleObj] }, [_vm._t("default", null, { className: slot.className, styleObj: slot.styleObj })], 2); } }]) }, 'fade', _vm.$attrs, false)); }, staticRenderFns: [], cssModules: { "layer": "src-components-layer-index--layer--23oKe" }, name: 'layer', inheritAttrs: false, props: { show: { type: Boolean, default: false }, background: { // 背景色 type: String, default: 'normal' } }, computed: { $style: function $style() { return this.$options.cssModules; }, styleObj: function styleObj() { return ['normal'].indexOf(this.background) === -1 ? { backgroundColor: this.background } : {}; }, className: function className() { return ['normal'].indexOf(this.background) !== -1 ? 'va-layer-' + this.background : ''; } }, components: { Fade: Fade } }; export default index;