model.js 623 Bytes
define(function () {
    'use strict';

    function IModel(type) {
        this.id = "";
        this.type = type;
        this.runtimeCss = false; // 是否加载运行时css, 无作用域约束,可能会与设计器样式冲突(慎用)
        this.store = {
            id: "",
            compType: type
        };
    }

    IModel.prototype = {
        transferToVM: function (dm) {
            return dm || {};
        },
        set: function (key, value) {
            this.store[key] = value;
        },
        get: function (key) {
            return this.store[key];
        }
    };

    return IModel;
});