drip-ui
Version:
Lightweight Mobile UI Components built on Vue
48 lines (45 loc) • 922 B
JavaScript
import create from '../utils/create';
export default create({
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', [_c('transition', {
attrs: {
"name": "fade"
}
}, [_vm.visible ? _c('div', {
"class": _vm.b(['tips', {
'success': _vm.type === 'success'
}, {
'info': _vm.type === 'info'
}, {
'warning': _vm.type === 'warning'
}, {
'error': _vm.type === 'error'
}])
}, [_c('span', {
domProps: {
"textContent": _vm._s(_vm.content)
}
})]) : _vm._e()])], 1);
},
name: 'notify',
props: {
content: {
type: String
},
visible: {
type: Boolean
},
type: {
type: String,
"default": 'error'
}
},
methods: {
close: function close() {
this.visible = false;
}
}
});