Authored by ccbikai

Merge branch 'release/1.0' into develop

@@ -29,6 +29,12 @@ Vue.use(lazyload); @@ -29,6 +29,12 @@ Vue.use(lazyload);
29 }); 29 });
30 })(); 30 })();
31 31
  32 +Vue.directive('lazy-html', function(html) {
  33 + html = html.replace(/src\s*=['|"]\s*(.*)['|"]/gi, 'v-lazy="\'$1\'"');
  34 + this.el.innerHTML = html;
  35 + this.vm.$compile(this.el);
  36 +});
  37 +
32 new Vue({ 38 new Vue({
33 el: '#app', 39 el: '#app',
34 components: { 40 components: {
@@ -158,12 +158,10 @@ @@ -158,12 +158,10 @@
158 <h2>商品详情</h2> 158 <h2>商品详情</h2>
159 <i>DETAILS</i> 159 <i>DETAILS</i>
160 160
161 - <p v-if="entity.brand && entity.brand.brandIntro">  
162 - {{{entity.brand.brandIntro}}} 161 + <p v-if="entity.brand && entity.brand.brandIntro" v-lazy-html="entity.brand.brandIntro">
163 </p> 162 </p>
164 163
165 - <p v-if="entity.brand && intro.productIntroBo">  
166 - {{{intro.productIntroBo.productIntro}}} 164 + <p v-if="entity.brand && intro.productIntroBo" v-lazy-html="intro.productIntroBo.productIntro">
167 </p> 165 </p>
168 166
169 </show-box> 167 </show-box>