{"size": 695, "ext": "js", "max_stars_repo_path": "mip-ppkao-changeicon/mip-ppkao-changeicon.js", "max_stars_repo_name": "lxhmm921/mip-extensions-platform", "max_stars_repo_stars_event_min_datetime": "2017-07-07T01:15:46.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-28T06:26:57.000Z", "max_issues_repo_path": "mip-ppkao-changeicon/mip-ppkao-changeicon.js", "max_issues_repo_name": "izzhip/mip-extensions-platform", "max_issues_repo_issues_event_min_datetime": "2017-02-15T11:01:58.000Z", "max_issues_repo_issues_event_max_datetime": "2019-05-22T03:05:38.000Z", "max_forks_repo_path": "mip-ppkao-changeicon/mip-ppkao-changeicon.js", "max_forks_repo_name": "izzhip/mip-extensions-platform", "max_forks_repo_forks_event_min_datetime": "2017-03-02T06:39:22.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-02T06:49:31.000Z"}
{"max_stars_count": 35, "max_issues_count": 48, "max_forks_count": 86, "avg_line_length": 24.8214285714, "max_line_length": 64, "alphanum_fraction": 0.5021582734}
/**
 * @file mip-ppkao-changeicon 组件
 * @author
 */

define(function (require) {
    var $ = require('zepto');
    var customElement = require('customElement').create();

    /**
     * 第一次进入可视区回调，只会执行一次
     */
    customElement.prototype.firstInviewCallback = function () {
        var ele = $(this.element);
        var textT = ele.find('.toggle_text span');
        var zkIcon = ele.find('.toggle_text i');
        textT.on('click', function () {
            if (textT.text() === '收起') {
                zkIcon.removeClass('ss_icon');
            } else {
                zkIcon.addClass('ss_icon');
            }
        });
    };

    return customElement;
});
