Commit 92364f6f by caoyanzhi

update: 调整组件引入方式

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