Commit 92364f6f by caoyanzhi

update: 调整组件引入方式

parent 8ba8eb57
......@@ -33,10 +33,11 @@ module.exports = {
: config.dev.assetsPublicPath
},
externals: {
'vue': 'Vue',
vue: 'Vue',
axios: 'axios',
vuex: 'Vuex',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'element-ui':'ELEMENT'
'element-ui': 'ELEMENT',
},
resolve: {
extensions: ['.js', '.vue', '.json'],
......
......@@ -13,7 +13,7 @@
<meta charset="utf-8">
<link rel="shortcut icon" href="./favicon.ico" />
<title>好办管理平台</title>
<!-- <link rel="stylesheet" type="text/css" href="//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.58.4.css" /> -->
<link rel="stylesheet" type="text/css" href="//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.69.css" />
</head>
......@@ -22,14 +22,12 @@
<!-- built files will be auto injected -->
<!-- 公共库引用 cdn -->
<script>
// (function() {
// var host = window.location.host;
// document.write('<script src="//'+ (host.indexOf('localhost')>-1?'four.gicdev.com':host) + '/component-library/static/import-component.js?timestrap='+ new Date().getTime() +'"><\/script>')
// })()
(function() {
var host = window.location.host;
document.write('<script src="//'+ (host == 'ideal.demogic.com' ? host : 'four.gicdev.com') + '/component-library/static/import-component.js?timestrap='+ new Date().getTime() +'"><\/script>')
})()
var src = '/component/static/import-component.js?timestrap='+ new Date().getTime();
var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host;
document.write('<script src="//'+ host + src +'"><\/script>')
})()
</script>
</body>
......
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