support LoadingBar
support LoadingBar @Jetsly
This commit is contained in:
parent
d978690647
commit
f97e5bb01a
7 changed files with 71 additions and 22 deletions
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div :class="classes" :style="outerStyles" v-show="show" transition="fade">
|
||||
<div :class="innerClasses" :style="styles"></div>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div :class="classes" :style="outerStyles" v-show="show">
|
||||
<div :class="innerClasses" :style="styles"></div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import { oneOf } from '../../utils/assist';
|
||||
|
@ -10,10 +12,10 @@
|
|||
|
||||
export default {
|
||||
props: {
|
||||
percent: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// percent: {
|
||||
// type: Number,
|
||||
// default: 0
|
||||
// },
|
||||
color: {
|
||||
type: String,
|
||||
default: 'primary'
|
||||
|
@ -26,17 +28,27 @@
|
|||
type: Number,
|
||||
default: 2
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
validator (value) {
|
||||
return oneOf(value, ['success', 'error']);
|
||||
},
|
||||
default: 'success'
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
// status: {
|
||||
// type: String,
|
||||
// validator (value) {
|
||||
// return oneOf(value, ['success', 'error']);
|
||||
// },
|
||||
// default: 'success'
|
||||
// },
|
||||
// show: {
|
||||
// type: Boolean,
|
||||
// default: false
|
||||
// }
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
percent: 0,
|
||||
// color: 'primary',
|
||||
// failedColor: 'error',
|
||||
// height: 2,
|
||||
status: 'success',
|
||||
show: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
classes () {
|
||||
|
|
|
@ -19,7 +19,7 @@ import Form from './components/form';
|
|||
import Icon from './components/icon';
|
||||
import Input from './components/input';
|
||||
import InputNumber from './components/input-number';
|
||||
// import LoadingBar from './components/loading-bar';
|
||||
import LoadingBar from './components/loading-bar';
|
||||
import Menu from './components/menu';
|
||||
// import Message from './components/message';
|
||||
// import Modal from './components/modal';
|
||||
|
@ -75,7 +75,7 @@ const iview = {
|
|||
// iInput: Input,
|
||||
Input,
|
||||
InputNumber,
|
||||
// LoadingBar,
|
||||
LoadingBar,
|
||||
Menu,
|
||||
MenuGroup: Menu.Group,
|
||||
MenuItem: Menu.Item,
|
||||
|
@ -121,7 +121,7 @@ const install = function (Vue, opts = {}) {
|
|||
Vue.component(key, iview[key]);
|
||||
});
|
||||
|
||||
// Vue.prototype.$Loading = LoadingBar;
|
||||
Vue.prototype.$Loading = LoadingBar;
|
||||
// Vue.prototype.$Message = Message;
|
||||
// Vue.prototype.$Modal = Modal;
|
||||
// Vue.prototype.$Notice = Notice;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue