Skip to content

Commit 4676e9a

Browse files
committed
Fix the import issue
1 parent d54740e commit 4676e9a

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ For example:
2121

2222
```js
2323
// You can import any component you want as a named export from 'vue-virtualised'. e.g.
24-
import { VirtualisedList, VirtualisedTree } from 'vue-virtualised';
24+
import { VirtualisedList, VirtualisedTree } from "vue-virtualised";
2525

2626
// Or you can import the component as a named export. e.g.
27-
import { VirtualisedTree as Tree } from 'vue-virtualised';
27+
import { VirtualisedTree as Tree } from "vue-virtualised";
28+
```
29+
30+
⚠️ The line below should be included when importing the package:
31+
32+
```js
33+
import "vue-virtualised/dist/vue-virtualised.css";
2834
```
2935

3036
## Usage

src/components/VirtualisedTree.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@
3333

3434
<script>
3535
import { defineComponent, defineAsyncComponent, ref, watch } from "vue";
36+
import VirtualisedBaseTree from "./Base/VirtualisedBaseTree.vue";
3637
3738
export default defineComponent({
3839
name: "VirtualisedTree",
39-
components: {
40-
VirtualisedBaseTree: defineAsyncComponent(() =>
41-
import("./Base/VirtualisedBaseTree.vue")
42-
),
43-
},
40+
components: { VirtualisedBaseTree },
4441
props: {
4542
nodes: {
4643
type: Array,

0 commit comments

Comments
 (0)