no message

Former-commit-id: 5a22a82c51e48f3840c5259fcda64a817103838d
Former-commit-id: 6f2c87cf9cab82f481e3672964fbd58fded178c7
Former-commit-id: 5e9d226a20a71c4203beb5874765e14332fedbe8
This commit is contained in:
李杨
2018-02-22 13:54:33 +08:00
parent 6b40e73548
commit 73b59a7f60
5 changed files with 8 additions and 3 deletions

View File

@@ -63,6 +63,7 @@ module.exports = {
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
exclude: [resolve('src/assets/icons/svg')],
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')

View File

@@ -27,7 +27,6 @@
"particles.js": "^2.0.0",
"quill": "^1.3.4",
"simplemde": "^1.11.2",
"svg-sprite-loader": "^3.6.2",
"timeago.js": "^3.0.2",
"vue": "^2.5.2",
"vue-grid-layout": "^2.1.11",
@@ -74,6 +73,7 @@
"postcss-loader": "^2.0.8",
"rimraf": "^2.6.0",
"sass-loader": "^6.0.6",
"svg-sprite-loader": "^3.6.2",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",

View File

@@ -1,3 +1,7 @@
import alarm from './svg/alarm.svg'
console.log(alarm)
const requireAll = requireContext => requireContext.keys().map(requireContext)
const req = require.context('./svg', false, /\.svg$/)
const iconMap = requireAll(req)

View File

@@ -13,7 +13,7 @@ export default {
}
},
computed: {
iconName() {
iconName () {
return `#icon-${this.name}`
}
}

View File

@@ -1,5 +1,5 @@
<template>
<Container>
Hello
<IconSvg name="alarm"></IconSvg>
</Container>
</template>