Source: jsframework/core/internal/init.js

/**
 * Created by zhangmike on 16/10/17.
 */
let uid = 0;
//let viewOptions = ['data', 'el', 'events', 'methods', 'init', 'render'];
export default function initMixin(GMP) {
    /**
     * The main init sequence. This is called for every
     * instance, including ones that are created from extended
     * constructors.
     *
     * @param {Object} options - this options object should be
     *                           the result of merging class
     *                           options and the options passed
     *                           in to the constructor.
     */
    GMP._assignPros({
        _init(options) {

            options = options || {};

            this._uid = uid++;

            Object.assign(this, options);

            this.$options = this;

            this.$options["container"] = this.$options.el || "body";

            ///初始化事件
            this._initEvents();

            this._callHook("init");

            // 初始化data
            this._initState();
            // 扫描模板结构
        }
    });
}