From 4ab1361beab5e1e84323a69e3d8312b98ea6fd45 Mon Sep 17 00:00:00 2001 From: wuchao <253055426@qq.com> Date: Thu, 18 Aug 2022 19:28:12 +0800 Subject: [PATCH] remove babel plugin,don't use jsx syntax --- package.json | 13 +---- src/components/tree-node.vue | 4 +- src/components/virtual-tree-node.vue | 83 ++++++++++------------------ 3 files changed, 32 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index 0c40b2e..492c121 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@wchbrad/vue-easy-tree", "description": "A Vue.js project", - "version": "1.0.8", + "version": "1.0.9", "author": "wchbrad ", "license": "MIT", "private": false, @@ -35,17 +35,6 @@ "vue-virtual-scroller": "^1.0.10" }, "devDependencies": { - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-loader": "^7.1.5", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-plugin-istanbul": "^4.1.1", - "babel-plugin-module-resolver": "^2.2.0", - "babel-plugin-syntax-jsx": "^6.18.0", - "babel-plugin-transform-vue-jsx": "^3.7.0", - "babel-preset-env": "^1.7.0", - "babel-preset-stage-2": "^6.24.1", - "babel-regenerator-runtime": "^6.5.0", "core-js": "^3.6.5", "cross-env": "^3.1.3", "css-loader": "^2.1.0", diff --git a/src/components/tree-node.vue b/src/components/tree-node.vue index 5c92ff7..ca67e5f 100644 --- a/src/components/tree-node.vue +++ b/src/components/tree-node.vue @@ -109,7 +109,9 @@ export default { ) : tree.$scopedSlots.default ? ( tree.$scopedSlots.default({ node, data }) ) : ( - {node.label} + h("span", { + class: "el-tree-node__label" + }, node.label) ); } } diff --git a/src/components/virtual-tree-node.vue b/src/components/virtual-tree-node.vue index 7d0ff5b..92377a3 100644 --- a/src/components/virtual-tree-node.vue +++ b/src/components/virtual-tree-node.vue @@ -1,59 +1,30 @@