docs(Skeleton): use composition api
This commit is contained in:
+10
-5
@@ -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;
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user