Browse Source

add vue install js

zhuxc 5 years ago
parent
commit
33a1cc24c6
2 changed files with 25 additions and 0 deletions
  1. 24 0
      src/index.js
  2. 1 0
      src/views/tree/index.vue

+ 24 - 0
src/index.js

@@ -0,0 +1,24 @@
+import Vtree from './views/tree'
+
+const components = [
+	Vtree
+]
+
+const install = function(Vue, opts = {}) {
+
+  components.forEach(component => {
+    Vue.component(component.name, component);
+  });
+};
+
+/* istanbul ignore if */
+if (typeof window !== 'undefined' && window.Vue) {
+  install(window.Vue);
+}
+
+module.exports={
+	Vtree
+}
+
+
+module.exports.default = module.exports;

+ 1 - 0
src/views/tree/index.vue

@@ -16,6 +16,7 @@
 
 <script>
 export default {
+  name:'Vtree',
 
   data() {
     return {