Skip to content

Commit 3134fb2

Browse files
committed
chore: removed prop itemClass
1 parent 5b40b7f commit 3134fb2

File tree

8 files changed

+235
-249
lines changed

8 files changed

+235
-249
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# vue-virtual-draglist
1+
# vue-virtual-sortable
22

3-
[![npm](https://img.shields.io/npm/v/vue-virtual-draglist.svg)](https://www.npmjs.com/package/vue-virtual-draglist) [![npm](https://img.shields.io/npm/dm/vue-virtual-draglist.svg)](https://www.npmjs.com/package/vue-virtual-draglist) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
3+
[![npm](https://img.shields.io/npm/v/vue-virtual-sortable.svg)](https://www.npmjs.com/package/vue-virtual-sortable) [![npm](https://img.shields.io/npm/dm/vue-virtual-sortable.svg)](https://www.npmjs.com/package/vue-virtual-sortable) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
44

55
A virtual scrolling list component that can be sorted by dragging
66

7-
For Vue 3 support, see [here](https://github.com/mfuu/vue3-virtual-drag-list)
7+
For Vue 3 support, see [here](https://github.com/mfuu/vue3-virtual-sortable)
88

9-
### [Live demo](https://mfuu.github.io/vue-virtual-drag-list/)
9+
### [Live demo](https://mfuu.github.io/vue-virtual-sortable/)
1010

1111
## Simple usage
1212

1313
```bash
14-
npm i vue-virtual-draglist
14+
npm i vue-virtual-sortable
1515
```
1616

1717
Root component:
@@ -40,7 +40,7 @@ Root component:
4040
</template>
4141
4242
<script>
43-
import virtualList from 'vue-virtual-draglist';
43+
import virtualList from 'vue-virtual-sortable';
4444
4545
export default {
4646
name: 'root',
@@ -96,8 +96,7 @@ export default {
9696
| **Prop** | **Type** | **Default** | **Description** |
9797
| ------------------ | --------- | ------------------------ | ------------------------------------------------------------ |
9898
| `sortable` | `Boolean` | `true` | Whether the current list can be sorted by dragging |
99-
| `draggable` | `String` | `.virtual-dnd-list-item` | Specifies which items inside the element should be draggable |
100-
| `itemClass` | `String` | `virtual-dnd-list-item` | Default list item class |
99+
| `draggable` | `String` | `[role="item"]` | Specifies which items inside the element should be draggable |
101100
| `disabled` | `Boolean` | `false` | Disables the sortable if set to true |
102101
| `animation` | `Number` | `150` | Animation speed moving items when sorting |
103102
| `autoScroll` | `Boolean` | `true` | Automatic scrolling when moving to the edge of the container |

dist/virtual-drag-list.min.js

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 205 additions & 213 deletions
Large diffs are not rendered by default.

dist/virtual-list.min.js

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
2-
"name": "vue-virtual-draglist",
3-
"version": "2.9.7",
2+
"name": "vue-virtual-sortable",
3+
"version": "2.0.0",
44
"description": "A virtual scrolling list component that can be sorted by dragging",
5-
"main": "dist/virtual-drag-list.min.js",
5+
"main": "dist/virtual-list.min.js",
66
"files": [
77
"dist"
88
],
99
"scripts": {
10-
"lint": "eslint --fix src --ext .js",
1110
"build": "rollup --config",
1211
"core:update": "git submodule update --remote",
1312
"docs:dev": "vuepress dev docs --temp .temp",
1413
"docs:build": "vuepress build docs"
1514
},
1615
"repository": {
1716
"type": "git",
18-
"url": "git+https://github.com/mfuu/vue-virtual-drag-list.git"
17+
"url": "git+https://github.com/mfuu/vue-virtual-sortable.git"
1918
},
2019
"keywords": [
2120
"vue",
@@ -34,11 +33,11 @@
3433
"license": "MIT",
3534
"private": false,
3635
"bugs": {
37-
"url": "https://github.com/mfuu/vue-virtual-drag-list/issues"
36+
"url": "https://github.com/mfuu/vue-virtual-sortable/issues"
3837
},
39-
"homepage": "https://github.com/mfuu/vue-virtual-drag-list#readme",
38+
"homepage": "https://github.com/mfuu/vue-virtual-sortable#readme",
4039
"dependencies": {
41-
"sortable-dnd": "^0.6.20"
40+
"sortable-dnd": "^0.6.22"
4241
},
4342
"devDependencies": {
4443
"@babel/core": "^7.8.7",

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const homepage = packageJson.homepage;
1010
const extensions = ['.js', '.jsx', '.ts', '.tsx'];
1111
const banner = `
1212
/*!
13-
* vue-virtual-drag-list v${version}
13+
* vue-virtual-sortable v${version}
1414
* open source under the MIT license
1515
* ${homepage}
1616
*/
@@ -22,7 +22,7 @@ export default {
2222
output: [
2323
{
2424
format: 'umd',
25-
file: 'dist/virtual-drag-list.js',
25+
file: 'dist/virtual-list.js',
2626
name: 'VirtualList',
2727
sourcemap: false,
2828
globals: {
@@ -32,7 +32,7 @@ export default {
3232
},
3333
{
3434
format: 'umd',
35-
file: 'dist/virtual-drag-list.min.js',
35+
file: 'dist/virtual-list.min.js',
3636
name: 'VirtualList',
3737
sourcemap: false,
3838
globals: {

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ const VirtualList = Vue.component('virtual-list', {
338338
{
339339
key: dataKey,
340340
attrs: {
341+
role: 'item',
341342
'data-key': dataKey,
342343
},
343344
props: {
@@ -348,7 +349,6 @@ const VirtualList = Vue.component('virtual-list', {
348349
resized: this._onItemResized,
349350
},
350351
style: itemStyle,
351-
class: this.itemClass,
352352
},
353353
this.$scopedSlots.item({ record, index, dataKey })
354354
)

src/props.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ export const VirtualProps = {
3333
},
3434
draggable: {
3535
type: String,
36-
default: '.virtual-dnd-list-item',
37-
},
38-
itemClass: {
39-
type: String,
40-
default: 'virtual-dnd-list-item',
36+
default: '[role="item"]',
4137
},
4238
sortable: {
4339
type: Boolean,

0 commit comments

Comments
 (0)