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>
|
|
|
|
|
|
2019-10-09 10:32:23 +00:00
|
|
|
|
```tpl
|
2018-03-11 07:27:34 +00:00
|
|
|
|
<style scoped>
|
2019-09-28 12:45:07 +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 {
|
2019-09-28 12:45:07 +00:00
|
|
|
|
data() {
|
2018-02-09 09:09:50 +00:00
|
|
|
|
return {
|
2019-09-28 12:45:07 +00:00
|
|
|
|
spinning: false,
|
|
|
|
|
};
|
2018-02-09 09:09:50 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2019-09-28 12:45:07 +00:00
|
|
|
|
changeSpinning() {
|
|
|
|
|
this.spinning = !this.spinning;
|
|
|
|
|
},
|
2018-02-09 09:09:50 +00:00
|
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
|
};
|
2018-02-09 09:09:50 +00:00
|
|
|
|
</script>
|
|
|
|
|
```
|