ant-design-vue/components/spin/demo/nested.md

44 lines
818 B
Markdown
Raw Normal View History

2018-02-09 09:09:50 +00:00
<cn>
#### 卡片加载中
可以直接把内容内嵌到 `Spin` 中,将现有容器变为加载状态。
</cn>
<us>
#### Embedded mode
Embedding content into `Spin` will alter it into loading state.
</us>
```html
2018-03-11 07:27:34 +00:00
<style scoped>
2018-02-09 09:18:51 +00:00
.spin-content{
2018-02-09 09:09:50 +00:00
border: 1px solid #91d5ff;
background-color: #e6f7ff;
padding: 30px;
}
</style>
<template>
<div>
<a-spin :spinning="spinning">
2018-02-09 09:18:51 +00:00
<div class="spin-content">
2018-02-09 09:09:50 +00:00
可以点击切换按钮控制本区域的spin展示。
</div>
</a-spin>
2018-02-27 04:14:29 +00:00
Loading state<a-switch v-model="spinning"></a-switch>
2018-02-09 09:09:50 +00:00
</div>
</template>
<script>
export default {
data () {
return {
spinning: false
}
},
methods: {
changeSpinning(){
this.spinning = !this.spinning
}
},
}
</script>
```