{"size": 1030, "ext": "js", "max_stars_repo_path": "examples/event/mip-a.js", "max_stars_repo_name": "mip-project/mip", "max_stars_repo_stars_event_min_datetime": "2018-05-03T11:50:45.000Z", "max_stars_repo_stars_event_max_datetime": "2018-06-01T05:33:11.000Z", "max_issues_repo_path": "examples/event/mip-a.js", "max_issues_repo_name": "mip-project/mip", "max_issues_repo_issues_event_min_datetime": "2018-04-25T05:03:00.000Z", "max_issues_repo_issues_event_max_datetime": "2018-11-07T14:11:05.000Z", "max_forks_repo_path": "examples/event/mip-a.js", "max_forks_repo_name": "mip-project/mip", "max_forks_repo_forks_event_min_datetime": "2018-05-23T10:55:46.000Z", "max_forks_repo_forks_event_max_datetime": "2018-05-23T10:55:46.000Z"}
{"max_stars_count": 10, "max_issues_count": 22, "max_forks_count": 1, "avg_line_length": 25.1219512195, "max_line_length": 97, "alphanum_fraction": 0.4932038835}
/**
 * @file mip-test.js
 * @author huanghuiquan (huanghuiquan@baidu.com)
 */

 /* global mip */



mip.registerVueCustomElement('mip-a', {
    template: `
        <div >
            haha a

            <hr>

            <span @click="onClick">click me</span>
        </div>
    `,
    created() {
        // 绑定事件，其它元素可通过 on='xxx' 触发
        // this.addEventAction('custom_event', function (event /* 对应的事件对象 */ , str /* 事件参数 */ ) {
        //     console.log(str); // undefined or 'test_button' or 'test_button1'
        // });
    },
    // createdVue() {
    //     console.log('createdvue');
    //     // this.addEventAction('customevent', function (event, str) {
    //     //     console.log('get customevent');
    //     // });
    // },
    methods: {
        onClick() {
            console.log('emit customevent');
            this.$emit('customevent', {userInfo: 'huanghuiqun'});
            // console.log('onClick');
            // mip.viewer.eventAction.execute('eventName', null, {form: 'a'});
        }
    }
});
