{
 "hidden": false,
 "children": [{
  "configs": {
   "head": "<script  src=\"wb/libs/vue/vue.js\"><\/script>\
<link rel=\"stylesheet\" href=\"wb/libs/elementui/element.css\">\
<script  src=\"wb/libs/elementui/element.js\"><\/script>",
   "itemId": "module"
  },
  "expanded": true,
  "children": [{
   "configs": {
    "layout": "fit",
    "itemId": "viewport1"
   },
   "expanded": true,
   "children": [{
    "configs": {
     "itemId": "panel1",
     "padding": "10",
     "html": "<div itemId=\"myDiv\">\
  <table cellpadding=\"10\">\
    <tr><td>\
      <el-input v-model=\"input\" placeholder=\"请输入内容\"><\/el-input>\
      <\/td><\/tr>\
    <tr><td>\
      <el-input-number v-model=\"num\" @change=\"handleChange\" :min=\"1\" :max=\"10\" label=\"描述文字\"><\/el-input-number>\
      <\/td><\/tr>\
    <tr><td>\
      <el-radio v-model=\"radio\" label=\"1\">备选项<\/el-radio>\
      <el-radio v-model=\"radio\" label=\"2\">备选项<\/el-radio>\
      <\/td><\/tr>\
    <tr><td>\
      <el-select v-model=\"selValue\" placeholder=\"请选择\">\
        <el-option\
                   v-for=\"item in options\"\
                   :key=\"item.value\"\
                   :label=\"item.label\"\
                   :value=\"item.value\">\
        <\/el-option>\
      <\/el-select>\
      <\/td><\/tr>\
    <tr><td>\
      <el-switch\
                 v-model=\"switchVal\"\
                 active-color=\"#13ce66\"\
                 inactive-color=\"#ff4949\">\
      <\/el-switch>\
      <\/td><\/tr>\
    <tr><td>\
      <el-button type=\"success\" method=\"getVal\" onclick=\"Wb.invoke(this)\">设置值<\/el-button>\
      <el-button type=\"primary\" method=\"setVal\" onclick=\"Wb.invoke(this)\">取值<\/el-button>\
      <\/td><\/tr>\
  <\/table>\
<\/div>"
    },
    "expanded": false,
    "children": [],
    "type": "panel"
   }],
   "type": "viewport",
   "events": {"afterrender": "app.init();"}
  }],
  "type": "module",
  "events": {"initialize": "Wb.apply(app, {\
  /**\
   * 初始化，渲染到panel设置的html模板中。\
   */\
  init: function() {\
    var Main = {\
      data: function() {\
        return {\
          input: '',\
          num: 1,\
          radio: '1',\
          switchVal: true,\
          options: [{\
            value: '选项1',\
            label: '黄金糕'\
          }, {\
            value: '选项2',\
            label: '双皮奶'\
          }, {\
            value: '选项3',\
            label: '蚵仔煎'\
          }, {\
            value: '选项4',\
            label: '龙须面'\
          }, {\
            value: '选项5',\
            label: '北京烤鸭'\
          }],\
          selValue: ''\
        };\
      },\
      methods: {\
        handleChange: function(value) {\
          Cs.log(value);\
        }\
      }\
    };\
    var Ctor = Vue.extend(Main);\
    app.ctor = new Ctor().$mount(app.panel1.el.down('[itemId=myDiv]', true));\
\
  },\
  /**\
   * 取值方法。由button的method属性指定。\
   */\
  getVal: function() {\
    Wb.info('文本框值：' + app.ctor.input + '，数值框值：' + app.ctor.num);\
  },\
  /**\
   * 设置值方法。由button的method属性指定。\
   */\
  setVal: function() {\
    Wb.apply(app.ctor, {\
      input: 'hello',\
      num: 6\
    });\
    Wb.toast('文本框值已经设置为：hello，数值框值已经设置为：6', true);\
  }\
});"}
 }],
 "roles": {"default": 1},
 "title": "",
 "iconCls": "",
 "inframe": false,
 "pageLink": ""
}