Skip to content

Commit

Permalink
Merge pull request #4 from FallingCeilingS/v0.0.5/inline-css
Browse files Browse the repository at this point in the history
Set inline CSS and update document
  • Loading branch information
jchen042 authored Apr 4, 2021
2 parents 8ed8438 + 8c6bd71 commit 56200b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.vscode
public
examples
.editorconfig
babel.config.js
.eslintrc.js
*.gif
*.log
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm](https://img.shields.io/npm/v/vue-virtualised.svg)](https://www.npmjs.com/package/vue-virtualised)
[![license](https://img.shields.io/npm/l/vue-virtualised.svg?style=flat)](LICENSE)
[![vue3](https://img.shields.io/badge/vue-3.x-brightgreen.svg)](https://v3.vuejs.org/)

> Vue components developed by [Vue.js 3.0](https://v3.vuejs.org/) for efficiently rendering large scrollable lists and hierarchical data. `vue-virtualised` is able to render and update 1 million nodes within a few seconds in front-end.
Expand Down Expand Up @@ -30,12 +31,6 @@ import { VirtualisedList, VirtualisedTree } from "vue-virtualised";
import { VirtualisedTree as Tree } from "vue-virtualised";
```

⚠️ The line below should be included when importing the package:

```js
import "vue-virtualised/dist/vue-virtualised.css";
```

## Usage

### `VirtualisedList` usage
Expand Down
16 changes: 4 additions & 12 deletions src/components/Base/VirtualisedBaseScroller.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<div
ref="virtualScroller"
class="virtual-scroller-container"
:style="{ height: `${viewportHeight}px` }"
:style="{ height: `${viewportHeight}px`, overflow: 'auto' }"
@scroll.passive="handleScroll"
>
<div
class="virtual-scroller-content"
:style="{
height: `${totalHeight}px`,
willChange: 'transform',
position: 'relative',
overflow: 'hidden',
}"
>
<div
Expand Down Expand Up @@ -410,12 +410,4 @@ export default defineComponent({
});
</script>
<style>
.virtual-scroller-container {
overflow: auto;
}
.virtual-scroller-content {
overflow: hidden;
position: relative;
}
</style>
<style></style>

0 comments on commit 56200b1

Please sign in to comment.