Commit 681a0b20 authored by 何虹's avatar 何虹 💬

测试

parent 2d5e5905
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"name": "hs-sky-ui", "name": "hs-sky-ui",
"version": "1.0.19", "version": "1.0.19",
"description": "hs组件库", "description": "hs组件库",
"main": "lib/hs-sky-ui.common.js", "mainYY": "lib/hs-sky-ui.common.js",
"main": "./src/package/index.js",
"keyword": "hscomponent hs-sky-ui", "keyword": "hscomponent hs-sky-ui",
"private": false, "private": false,
"files": [ "files": [
......
import Vue from 'vue' import Vue from 'vue'
window.Vue=Vue window.Vue=Vue
import App from './App.vue' import App from './App.vue'
import './packages/index'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
import './packages/index'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(ElementUI) Vue.use(ElementUI)
new Vue({ new Vue({
......
import Vue from 'vue' // import Vue from 'vue'
// const requireComponent_ = require.context('./', true, /index.vue$/) // const requireComponent_ = require.context('./', true, /index.vue$/)
// const obj={} // const obj={}
// requireComponent_.keys().forEach(fileName => { // requireComponent_.keys().forEach(fileName => {
...@@ -59,15 +59,15 @@ const components = [ ...@@ -59,15 +59,15 @@ const components = [
hsAction hsAction
] ]
const install = function(Vue) { const install = function(Vue,, opts = {}) {
components.forEach(component => { components.forEach(component => {
Vue.component(component.name, component); Vue.component(component.name, component);
}); });
} }
/* 支持使用标签的方式引入 */ /* 支持使用标签的方式引入 */
if (typeof window !== 'undefined' && window.Vue||Vue) { if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue||Vue); install(window.Vue);
} }
export default { export default {
install, install,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment