drip-ui
Version:
Lightweight Mobile UI Components built on Vue
62 lines (59 loc) • 1.4 kB
JavaScript
import create from '../utils/create-basic';
export default create({
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('transition', {
attrs: {
"name": "loading"
}
}, [_vm.show ? _c('div', {
staticClass: "loading"
}, [_vm.type === 'line' ? _c('div', {
staticClass: "spinner"
}, [_c('div', {
staticClass: "rect1"
}), _c('div', {
staticClass: "rect2"
}), _c('div', {
staticClass: "rect3"
}), _c('div', {
staticClass: "rect4"
}), _c('div', {
staticClass: "rect5"
})]) : _c('div', [_c('div', {
staticClass: "loading-mark"
}), _c('div', {
staticClass: "loading-toast",
style: {
position: _vm.position
}
}, [_c('i', {
staticClass: "loading-loading"
}), _vm.text ? _c('p', {
staticClass: "loading-text"
}, [_vm._v("\n " + _vm._s(_vm.text || 'loading')), _vm._t("default")], 2) : _vm._e()])])]) : _vm._e()]);
},
name: 'loading',
props: {
show: Boolean,
text: {
type: String,
"default": '请求中..'
},
type: {
type: String,
"default": 'circle'
},
position: String,
transition: {
type: String
}
},
watch: {
show: function show(val) {
this.$emit('update:show', val);
}
}
});