2018-03-09 05:26:34 +00:00
|
|
|
<cn>
|
|
|
|
#### 预加载的卡片
|
|
|
|
数据读入前会有文本块样式
|
|
|
|
</cn>
|
2018-04-06 12:56:19 +00:00
|
|
|
|
2018-03-09 05:26:34 +00:00
|
|
|
<us>
|
|
|
|
#### Loading card
|
|
|
|
Shows a loading indirector while the contents of the card is being featched
|
|
|
|
</us>
|
|
|
|
|
|
|
|
```html
|
|
|
|
<template>
|
2018-07-27 07:30:24 +00:00
|
|
|
<div>
|
|
|
|
<a-card :loading="loading" title="Card title">
|
|
|
|
whatever content
|
|
|
|
</a-card>
|
|
|
|
<a-button @click="handleClick" style="marginTop: 16px">Toggle loading</a-button>
|
|
|
|
</div>
|
2018-03-09 05:26:34 +00:00
|
|
|
</template>
|
2018-07-27 07:30:24 +00:00
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
loading: true,
|
2019-09-28 12:45:07 +00:00
|
|
|
};
|
2018-07-27 07:30:24 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleClick() {
|
2019-09-28 12:45:07 +00:00
|
|
|
this.loading = !this.loading;
|
|
|
|
},
|
2018-07-27 07:30:24 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
};
|
2018-07-27 07:30:24 +00:00
|
|
|
</script>
|
2018-03-09 05:26:34 +00:00
|
|
|
```
|