Skip to content

Commit 9115f40

Browse files
committed
2 parents bda7595 + ad54506 commit 9115f40

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ pnpm-debug.log*
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
.history

package.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"name": "light-vue-tree",
33
"version": "1.0.1",
4+
"repository": {
5+
"type": "git",
6+
"url": "https://github.com/Create-Peace/light-vue-tree"
7+
},
8+
"main": "lib/index.js",
49
"scripts": {
510
"lint": "eslint --fix src --ext .js --ext .vue",
611
"dev": "rollup --config ./scripts/rollup.development.js --watch",
@@ -11,13 +16,10 @@
1116
"files": [
1217
"lib"
1318
],
14-
"dependencies": {
15-
"core-js": "^3.6.5",
16-
"less-loader": "^6.0.0",
17-
"rollup-plugin-less": "^1.1.3",
18-
"vue": "^2.6.11",
19-
"vue-router": "^3.5.2"
19+
"peerDependencies": {
20+
"vue": "^2.6.11"
2021
},
22+
"dependencies": {},
2123
"devDependencies": {
2224
"@babel/core": "^7.8.7",
2325
"@babel/preset-env": "^7.8.7",
@@ -41,9 +43,12 @@
4143
"less": "^4.1.1",
4244
"rollup": "^2.1.0",
4345
"rollup-plugin-babel": "^4.4.0",
44-
"vue": "^2.6.11",
4546
"vue-jest": "^3.0.5",
46-
"vue-template-compiler": "^2.6.11"
47+
"vue-template-compiler": "^2.6.11",
48+
"core-js": "^3.6.5",
49+
"less-loader": "^6.0.0",
50+
"rollup-plugin-less": "^1.1.3",
51+
"vue-router": "^3.5.2"
4752
},
4853
"keywords": [
4954
"vue",

src/components/VirtualList/slot.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ export default {
66
mixins: [Wrapper],
77
props: SlotProps,
88

9-
render (h) {
9+
render () {
1010
const { tag, uniqueKey } = this
11+
const Wrapper = tag || 'div'
1112

12-
return h(tag, {
13-
key: uniqueKey,
14-
attrs: {
15-
role: uniqueKey
16-
}
17-
}, this.$slots.default)
13+
14+
return <Wrapper key={uniqueKey} role={uniqueKey} >
15+
{this.$slots.default}
16+
</Wrapper>
1817
}
1918
}

0 commit comments

Comments
 (0)