博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Vue 中的图片加载(采坑)
阅读量:4091 次
发布时间:2019-05-25

本文共 262 字,大约阅读时间需要 1 分钟。

1、import

import remarkIcon from './redflag.png';

L.icon 中使用  iconUrl 用 import 的图片

let icon = L.icon({    iconUrl: remarkIcon,    iconSize: [16, 16]});

2、require

3、url

css 使用 url

.remark-icon {    width: 16px;    height: 16px;    background: url('./redflag.png');}

 

 

 

转载地址:http://ganii.baihongyu.com/

你可能感兴趣的文章
剑指_复杂链表的复制
查看>>
FTP 常见问题
查看>>
shell 快捷键
查看>>
MODULE_DEVICE_TABLE的理解
查看>>
No devices detected. Fatal server error: no screens found
查看>>
db db2_monitorTool IBM Rational Performace Tester
查看>>
postgresql监控工具pgstatspack的安装及使用
查看>>
swift中单例的创建及销毁
查看>>
IE不支持option的display:none属性
查看>>
[分享]mysql内置用于字符串型ip地址和整数型ip地址转换函数
查看>>
【JAVA数据结构】双向链表
查看>>
【JAVA数据结构】先进先出队列
查看>>
移植Vim配色方案到Eclipse
查看>>
谈谈加密和混淆吧[转]
查看>>
乘法逆元
查看>>
Objective-C 基础入门(一)
查看>>
SpringCloud学习之PassCloud——(一)PassCloud源代码下载
查看>>
Nginx篇-springCloud配置Gateway+Nginx进行反向代理和负载均衡
查看>>
缓存篇-Redis缓存失效以及解决方案
查看>>
phpquery抓取网站内容简单介绍
查看>>