图片路径问题
module.exports = { // 根据环境区分 生产服务器production比如php服务器的地址 和 开发服务器dev的地址 // npm run serve是开发环境develope npm run build是生产环境production publicPath: process.env.NODE_ENV === "production" ? "/mail/" : "/", configureWebpack: { resolve: { alias: { assets: "@/assets", components: '@/components', views: '@/views', common: '@/common' } } } }
图片和文字居中对齐。并且绑定:src属性
<div class="title-info-item link-ratio"> <span class="name-msg">{{name3}}</span> <img style="widht:18px;height:18px;vertical-align:middle;" :src="data3>0?require('assets/imgs/v2/icon-up.png'):require('assets/imgs/v2/icon-down.png')" /> <span :class="[data3>0?'red':'green','demo']">{{data3}}%</span> </div>