This commit is contained in:
梁灏 2017-09-19 14:26:46 +08:00
parent 300bd6623e
commit 297648f1e6
9 changed files with 180 additions and 33 deletions

View file

@ -181,6 +181,8 @@
</div>
<br>
切换显示状态<i-switch @on-change="spinShow = !spinShow"></i-switch>
<Button @click="show">show</Button>
<Button @click="hide">hide</Button>
</div>
</template>
<script>
@ -189,6 +191,29 @@
return {
spinShow: true
}
},
methods: {
show () {
this.$Spin.show({
render: (h) => {
return h('div', [
h('Icon', {
props: {
type: 'load-c',
size: 24
}
}),
h('div', 'Loading')
])
}
});
setTimeout(() => {
this.$Spin.hide();
}, 3000)
},
hide () {
this.$Spin.hide();
}
}
}
</script>