Authored by ccbikai

字符截断 Bug 修改

@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 6
7 var $ = require('yoho-jquery'), 7 var $ = require('yoho-jquery'),
8 Swiper = require('yoho-swiper'), 8 Swiper = require('yoho-swiper'),
  9 + ellipsis = require('yoho-mlellipsis'),
9 lazyload = require('yoho-jquery-lazyload'); 10 lazyload = require('yoho-jquery-lazyload');
10 11
11 var search = require('./sale/search'); 12 var search = require('./sale/search');
@@ -14,6 +15,7 @@ require('../common'); @@ -14,6 +15,7 @@ require('../common');
14 15
15 search.start(); 16 search.start();
16 lazyload($('img.lazy')); 17 lazyload($('img.lazy'));
  18 +ellipsis.init();
17 19
18 $('.swiper-container').each(function() { 20 $('.swiper-container').each(function() {
19 if ($(this).find('.swiper-slide').length > 1) { 21 if ($(this).find('.swiper-slide').length > 1) {
@@ -56,6 +58,13 @@ $(function() { @@ -56,6 +58,13 @@ $(function() {
56 if (/good-info/.test(res)) { 58 if (/good-info/.test(res)) {
57 $vipFloor.html(res).addClass('goods-container'); 59 $vipFloor.html(res).addClass('goods-container');
58 lazyload($vipFloor.find('img.lazy')); 60 lazyload($vipFloor.find('img.lazy'));
  61 +
  62 + $('.good-detail-text .name').each(function() {
  63 + var $this = $(this),
  64 + $title = $this.find('a');
  65 +
  66 + $title[0].mlellipsis(2);
  67 + });
59 } 68 }
60 }); 69 });
61 70