fis-plus icon indicating copy to clipboard operation
fis-plus copied to clipboard

怎样在tpl里把参数或值所到JS里或js文件里

Open yangbys opened this issue 10 years ago • 1 comments

一直搞不太明白

yangbys avatar Jun 12 '15 10:06 yangbys

这个早在 FIS1 时代就有类似的功能了,稍等,我给你找一下; https://github.com/fex-team/fis-plus-i18n-demo/blob/master/common/static/F.js 用这个数据中心;

在模板里面

...
<script type="text/javascript">
F.context('a', '{%$data%}');
</script>
...

在某个 js 里面

var a = F.context('a');

注意 js 加载的顺序

oxUnd avatar Jun 12 '15 10:06 oxUnd