export const defaultProps = { children: 'children', label: 'label' } export const columns = (_this) => [ { prop: 'aircaftCatalogCode', label: '飞机编号', width: '150px' }, { prop: 'mechanician', label: '机械师' }, { prop: 'aircaftModelName', label: '所属机型' }, { prop: 'army', label: '所属部队' }, { prop: 'warZone', label: '所属战区' }, { prop: 'station', label: '驻地' }, { prop: 'assemblyTime', label: '装列时间' }, { prop: 'manufacturer', label: '厂家', width: '240px' }, { prop: 'factoryNumber', label: '出厂编号', width: '150px' }, { prop: 'status', label: '状态', render: (h, params) => { if (params.row.status == 0) { return h('span', { class: 'success-state' }, '服役') } else { return h('span', { class: 'warning-state' }, '退役') } } }, { button: true, label: '操作', width: '200px', group: [ { name: '编辑', type: 'text', round: false, plain: false, onClick: (row, index, scope) => { _this.handUpdate(row) } }, { name: '删除', type: 'text', round: false, plain: false, onClick: (row, index, scope) => { _this.remove([row]) } } ] } ] export const options = { stripe: true, // 斑马纹 mutiSelect: true, // 多选框 index: false, // 显示序号, 多选则 mutiSelect loading: false, // 表格动画 initTable: true, // 是否一挂载就加载数据 border: true, height: 'calc(100vh - 300px)' }