aui / art-template

High performance JavaScript templating engine
https://aui.github.io/art-template/
MIT License
9.86k stars 2.67k forks source link

在将artTemplate用户chrome插件制作是出现语法错误。 #281

Open zuoliang0 opened 8 years ago

zuoliang0 commented 8 years ago

经过测试 以下格式数据用在chrome开发中会出现语法错误。

{"title":"namxxx","list":[{"name":"华","lastTime":"15:04:00","zxjz":"2.4460","dwjz":"2.4331","ljjz":"3.1361","kk":"0.0368","zdf":"0.5302","time":"2016-04-12"}]}

模板

<script id="test" type="text/html">
        {{title}}
        {{each list as value i}}
        <li class="collection-item">
            <div class="row">
                <div class="col s2">{{i+1}}</div>
                <div class="col s4">{{value.name}}</div>
                <div class="col s4">{{value.lastTime}}</div>
                <div class="col s2">{{value.zxjz}}</div>
            </div>
        </li>
        {{/each}}
    </script>

为什说用在chrome插件开发中出现问题,因为这个问题我专门写了一个测试html发现不会报错能显示,在chrome插件的环境下就报语法错误。十分无解 请开发帮忙

toohamster commented 7 years ago

我也遇到此问题,解决不了