SOURCE

console 命令行工具 X clear

                    
>
console
var Main = {
  data () {
    return {
      tableColumn: [
        { field: 'name', title: 'Name', treeNode: true },
        { field: 'size', title: 'Size' },
        { field: 'type', title: 'Type' },
        { field: 'date', title: 'Date' }
      ],
      tableData: [
          {itemName: ''}
      ],
      editRules: {
        itemName: [{ required: true, message: '请输入条款名称', }],
    
      },
    }
  },
  methods: {
      xxx() {
          console.log('111')
          this.$refs.xTree.fullValidate().then(() => {

          })
      }
  }
};
var Ctor = Vue.extend(Main);
new Ctor().$mount('#app')
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/xe-utils"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/vxe-table@2.9.11"></script> -->
<!-- <script src="https://unpkg.com/vxe-table@2.9.11"></script> -->
<script src="https://unpkg.com/vxe-table@2.9.17"></script>
<script src="https://cdn.jsdelivr.net/npm/vxe-table-plugin-virtual-tree"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">

<!-- 使用 umd 引用方式需要注意是否锁定版本,默认指向最新版本 -->

<div id="app">
  <template>
    <div>
        <el-button @click=xxx>校验</el-button>
     <vxe-table
        row-id="0"
        resizable
        border
        ref="xTree"
        :data="tableData"
        :auto-resize="true"
    
        :edit-rules="editRules"
        >
         <vxe-table-column field="itemName" title="条款名称">
          <template v-slot="{ row }">
            <el-input v-model="row.itemName" show-word-limit></el-input>
          </template>
        </vxe-table-column>
     </vxe-table>

    </div>
  </template>
</div>
@import url("//unpkg.com/vxe-table/lib/index.css");