Comments (4)
预编译类前端模板应该是isJsLike
from fis-kernel.
我试过换成isJsLike,但模板里<img src="xxx"/>
的资源定位识别不了
from fis-kernel.
你用的是underscore模板吧,设置为isJsLike之后,模板这样写:
<img src="<%=__uri('xxx.png')%>"/>
由于文件已经变成js了,所以可以直接调用js中的资源定位函数 __uri(path)
来实现资源定位。或者在使用这个模板的变量中传递图片资源路径:
<img src="<%=icon%>"/>
var tpl = __inline('a.tpl');
var html = tpl({
icon: __uri('xxx.png')
});
from fis-kernel.
明白了~已解决,THX
from fis-kernel.
Related Issues (10)
- fis release 默认忽略了所有 .xxx 点开头的文件 HOT 12
- 记录 bug 一枚 HOT 3
- fis 是否有好用的支持requirejs的插件 HOT 1
- file.js的代码
- _.find 的性能问题
- Trying to get in touch regarding a security issue
- 不兼容高版本 node HOT 1
- npm test报错 HOT 1
- 关于缓存的一个问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fis-kernel.