docs(Skeleton): use composition api

This commit is contained in:
chenjiahan
2020-12-13 12:51:02 +08:00
parent 71d5a27dc4
commit f93e21a099
3 changed files with 44 additions and 27 deletions
+10 -5
View File
@@ -33,15 +33,20 @@ app.use(Skeleton);
```
```js
import { ref, onMounted } from 'vue';
export default {
data() {
setup() {
const loading = ref(true);
onMounted(() => {
loading.value = false;
});
return {
loading: true,
loading,
};
},
mounted() {
this.loading = false;
},
};
```