docs(Sticky): use composition api

This commit is contained in:
chenjiahan
2020-12-09 10:16:36 +08:00
parent d297807f55
commit a1de44c97a
3 changed files with 15 additions and 26 deletions
+3 -7
View File
@@ -40,13 +40,9 @@ app.use(Sticky);
```js
export default {
data() {
return {
container: null,
};
},
mounted() {
this.container = this.$refs.container;
setup() {
const container = ref(null);
return { container };
},
};
```