<template>
<a-form-model :model="form"  class="yo-form" ref="form">
  <a-descriptions bordered>
    <a-descriptions-item label="方法名称" :span="1">
      {{form.methodName}}
    </a-descriptions-item>
    <a-descriptions-item label="地址" :span="2">
      {{form.location}}
    </a-descriptions-item>
    <a-descriptions-item label="浏览器">
      {{form.browser}}
    </a-descriptions-item>
    <a-descriptions-item label="操作系统" :span="2">
      {{form.os}}
    </a-descriptions-item>
    <a-descriptions-item label="类名称" :span="3">
      {{form.className}}
    </a-descriptions-item>
    <a-descriptions-item label="返回结果" :span="3">
      {{form.result}}
    </a-descriptions-item>
      <a-descriptions-item label="请求参数" :span="3">
      {{form.param}}
    </a-descriptions-item>
        <a-descriptions-item label="具体消息" :span="3">
      {{form.message}}
    </a-descriptions-item>
  </a-descriptions>
  </a-form-model> 
  <!-- <a-form-model :model="form"  class="yo-form" ref="form">
    <a-row :gutter="16">
      <a-col :span="10">
        <div class="yo-form-group">
          <a-form-model-item label="方法名称" prop="methodName">
            <a-input v-model="form.methodName" />
          </a-form-model-item>
          <a-form-model-item label="地址" prop="location">
            <a-input v-model="form.location" />
          </a-form-model-item>
                    <a-form-model-item label="类名称" prop="className">
            <a-textarea :rows="4" v-model="form.className" />
          </a-form-model-item>
          <a-form-model-item label="返回结果" prop="result">
            <a-textarea :rows="4" v-model="form.result" />
          </a-form-model-item>
        </div>
      </a-col>
      <a-col :span="14">
        <div class="yo-form-group">
          <a-form-model-item label="浏览器" prop="browser">
            <a-input v-model="form.browser" />
          </a-form-model-item>
          <a-form-model-item label="操作系统" prop="os">
            <a-input v-model="form.os" />
          </a-form-model-item>
          <a-form-model-item label="请求参数" prop="param">
            <a-textarea :rows="4" v-model="form.param" />
          </a-form-model-item>
          <a-form-model-item label="具体消息" prop="message">
            <a-textarea :rows="4" v-model="form.message" />
          </a-form-model-item>
        </div>
      </a-col>
    </a-row>
  </a-form-model> -->
</template>
<script>
export default {
  data() {
    return {
      form: {
        active: "N",
      },
    };
  },
  methods: {
    /**
     * 必要的方法
     * 在打开编辑页时允许填充数据
     */
    onFillData(record) {
      this.form = this.$_.cloneDeep(record);
    },

    /**
     * 必要的方法
     * 在外部窗口进行保存时调用表单验证
     */
    onValidate(callback) {
      this.$refs.form.validate(callback);
    },

    /**
     * 必要的方法
     * 在外部窗口关闭或重置时对表单验证进行初始化
     */
    onResetFields() {
      setTimeout(() => {
        this.form = {};
        this.$refs.form.resetFields();
      }, 300);
    },
  },
};
</script>