Browse Source

tableForm组件,其他组件小修改

master
zhangli 1 year ago
parent
commit
f63aa1b931
  1. 2
      src/components/Annex/src/Annex.vue
  2. 4
      src/components/ChangeRecord/src/ChangeRecord.vue
  3. 13
      src/components/Detail/src/Detail.vue
  4. 2
      src/components/Remarks/src/Remarks.vue
  5. 226
      src/components/TableForm/src/TableForm.vue
  6. 2
      src/components/Tabs/src/Tabs.vue
  7. 2
      src/store/modules/app.ts
  8. 2
      src/utils/disposition/tableColumns.ts
  9. 179
      src/views/detail/detail/index.vue
  10. 2
      src/views/infra/customInterface/index.vue
  11. 7
      src/views/wms/itembasic/ItembasicForm.vue

2
src/components/Annex/src/Annex.vue

@ -32,7 +32,7 @@ defineComponent({
name: 'Annex'
})
//
const { data } = defineProps({
const props = defineProps({
data: {
type: Object,
required: true

4
src/components/ChangeRecord/src/ChangeRecord.vue

@ -52,10 +52,10 @@
<script lang="ts" setup>
import download from '@/utils/download'
defineComponent({
name: 'Annex'
name: 'ChangeRecord'
})
//
const { data } = defineProps({
const props = defineProps({
data: {
type: Object,
required: true

13
src/components/Detail/src/Detail.vue

@ -6,13 +6,13 @@
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions :data="detailData" labelClassName="label-class-name" label-align="left" direction="vertical" :column="8" :schema="detailSchema" :columns="2" width="200px"/>
<Descriptions :data="detailData" labelClassName="label-class-name" label-align="left" direction="vertical" :column="8" :schema="allSchemas.detailSchema" :columns="2" width="200px"/>
</ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" />
<div class="flex" v-if="current == 0">
<!-- 详情 -->
<ContentWrap class="w-[73%]">
<Descriptions :data="detailData" :schema="detailSchema" :columns="2" />
<Descriptions :data="detailData" :schema="allSchemas.detailSchema" :columns="2" />
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
@ -25,7 +25,7 @@
</div>
<ContentWrap v-else>
<Table
:columns="tableColumns"
:columns="allSchemas.tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{total: tableObject.total}"
@ -83,20 +83,17 @@ const props = defineProps({
})
const isShowDrawer = ref(false)
const isBasic = ref(props.isBasic)
const tableColumns = ref(props.allSchemas.tableColumns)
const detailSchema = ref(props.allSchemas.detailSchema)
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs?props.tabs:'')))
if (tabsList.value) {
if (tabsList.value&& tabsList.value.length>0) {
tabsList.value.unshift({
label: '详情',
prop: 'Detail'
})
} else {
tabsList.value = [{
label: '详情',
label: '明细',
prop: 'Detail'
}]
}

2
src/components/Remarks/src/Remarks.vue

@ -37,7 +37,7 @@ defineComponent({
const remark = ref('')
//
const { data } = defineProps({
const props = defineProps({
data: {
type: Object,
required: true

226
src/components/TableForm/src/TableForm.vue

@ -1,107 +1,214 @@
<!-- 附件组件 -->
<template>
<div class="table-form">
<el-table class="multipleTableComponents" ref="TableBaseComponents_Ref" v-loading="tableLoading" :data="tableData"
max-height="maxHeight" row-key="id" :border="border" @selection-change="tableSelectionChange"
@sort-change="tableSortChange" @row-click="handleTableSelect">
<el-table class="multipleTableComponents"
ref="TableBaseComponents_Ref"
v-loading="tableLoading"
:data="tableData"
max-height="maxHeight"
row-key="id"
:border="border"
@selection-change="tableSelectionChange"
@sort-change="tableSortChange"
@row-click="handleTableSelect"
>
<!-- 删除按钮 -->
<el-table-column fixed="left" :width="50" v-if="isShowButton" v-slot="{ row, $index }">
<el-table-column
fixed="left"
:width="50"
v-if="isShowButton"
v-slot="{ row, $index }"
>
<Icon icon="ep:remove" color="#409eff" size="26" style="cursor: pointer;margin-top: -16px;" @click="handleDelete(row, $index)" />
</el-table-column>
<!-- 多选 -->
<el-table-column fixed="left" :reserve-selection="true" type="selection" :width="50" v-if="selectionTable" />
<el-table-column
fixed="left"
:reserve-selection="true"
type="selection"
:width="50"
v-if="selectionTable"
/>
<!-- 序号 -->
<el-table-column type="index" fixed="left" label="序号" width="80" :align="'center'" v-if="isShowIndex" />
<el-table-column v-slot="{ row }" v-for="headerItem in tableFields" :key="headerItem"
:fixed="headerItem.tableForm?.fixed" :label="headerItem.label" :prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'" :sortable="headerItem?.tableForm?.sortable || ''"
:width="headerItem?.tableForm?.width || 'auto'" :min-width="headerItem?.tableForm?.minWidth || 'auto'">
<el-form ref="TableBaseForm_Ref" :model="row" style="width: 100%;" :rules="tableFormRules"
<el-table-column
type="index"
fixed="left"
label="序号"
width="80"
:align="'center'"
v-if="isShowIndex"
/>
<el-table-column
v-slot="{ row }"
v-for="headerItem in tableFields"
:key="headerItem"
:fixed="headerItem.tableForm?.fixed"
:label="headerItem.label" :prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || ''"
:width="headerItem?.tableForm?.width || 'auto'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'">
<el-form ref="TableBaseForm_Ref"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<!-- 字符串输入框 -->
<el-form-item v-if="!headerItem?.tableForm?.type || headerItem?.tableForm?.type == 'InputString'"
<el-form-item
v-if="!headerItem?.tableForm?.type || headerItem?.tableForm?.type == 'InputString'"
:prop="headerItem.field">
<el-input v-model="row[headerItem.field]"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="itemIsDisabled(headerItem, row)" style="width: 100%;" />
:disabled="itemIsDisabled(headerItem, row)"
style="width: 100%;"
/>
</el-form-item>
<!-- 数字输入框 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'InputNumber'" :prop="headerItem.field">
<el-input-number style="width: 100%;" v-model="row[headerItem.field]" :max="headerItem?.tableForm?.max"
:min="headerItem?.tableForm?.min" :disabled="itemIsDisabled(headerItem, row)" />
<el-form-item
v-if="headerItem?.tableForm?.type == 'InputNumber'"
:prop="headerItem.field">
<el-input-number
style="width: 100%;"
v-model="row[headerItem.field]"
:max="headerItem?.tableForm?.max"
:min="headerItem?.tableForm?.min"
:disabled="itemIsDisabled(headerItem, row)"
@focus="inpuFocus(headerItem)"/>
</el-form-item>
<!-- 下拉框 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'Select'" :prop="headerItem.field">
<el-select v-model="row[headerItem.field]" :clearable="headerItem?.tableForm.clearable"
:multiple="headerItem?.tableForm.multiple" :disabled="itemIsDisabled(headerItem, row)"
:filterable="headerItem?.tableForm.filterable" :allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%" :placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
<el-form-item
v-if="headerItem?.tableForm?.type == 'Select'"
:prop="headerItem.field">
<el-select
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable"
:multiple="headerItem?.tableForm.multiple"
:disabled="itemIsDisabled(headerItem, row)"
:filterable="headerItem?.tableForm.filterable"
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(row[headerItem.field], $event)">
<el-option v-for="op in initSelectOptions(headerItem)" :label="op.label" :value="op.value"
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="op.label"
:value="op.value"
:key="op.value" />
</el-select>
</el-form-item>
<!-- 时间选择器 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'FormTime'" :prop="headerItem.field">
<el-time-picker v-model="row[headerItem.field]" :placeholder="headerItem?.tableForm?.placeholder || '选择时间'"
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTime'"
:prop="headerItem.field">
<el-time-picker
v-model="row[headerItem.field]"
:placeholder="headerItem?.tableForm?.placeholder || '选择时间'"
style="width: 100%" :disabled="itemIsDisabled(headerItem, row)"
:format="headerItem?.tableForm?.format || 'HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'HH:mm:ss'" />
</el-form-item>
<!-- 日期选择器 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'FormDate'" :prop="headerItem.field">
<el-date-picker v-model="row[headerItem.field]" style="width: 100%"
:disabled="itemIsDisabled(headerItem, row)" :placeholder="headerItem?.tableForm?.placeholder || '选择日期'"
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDate'"
:prop="headerItem.field">
<el-date-picker
v-model="row[headerItem.field]"
style="width: 100%"
:disabled="itemIsDisabled(headerItem, row)"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期'"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DD'" />
</el-form-item>
<!-- 日期时间选择器 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'FormDateTime'" :prop="headerItem.field">
<el-date-picker type="datetime" v-model="row[headerItem.field]"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期时间'" style="width: 100%"
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDateTime'"
:prop="headerItem.field">
<el-date-picker
type="datetime"
v-model="row[headerItem.field]"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期时间'"
style="width: 100%"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'"
:disabled="itemIsDisabled(headerItem, row)" />
</el-form-item>
<!--开始时间结束时间选择器 (原类型datetimerange已弃用 使用type+timeType结合方式)-->
<el-form-item v-if="headerItem?.tableForm?.type == 'FormTimerange'" :prop="headerItem.field">
<el-date-picker v-model="row[headerItem.field]" :disabled="itemIsDisabled(headerItem, row)"
:type="headerItem?.tableForm?.timeType || 'datetimerange'" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" :format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTimerange'"
:prop="headerItem.field">
<el-date-picker
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:type="headerItem?.tableForm?.timeType || 'datetimerange'"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'" />
</el-form-item>
<!-- Switch 开关 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'Switch'" :prop="headerItem.field">
<el-switch v-model="row[headerItem.field]" :disabled="itemIsDisabled(headerItem, row)"
:loading="headerItem?.tableForm?.loading" :size="headerItem?.tableForm?.size"
:active-icon="headerItem?.tableForm?.activeIcon" :inactive-icon="headerItem?.tableForm?.inactiveIcon"
:active-text="headerItem?.tableForm?.activeText" :inactive-text="headerItem?.tableForm?.inactiveText"
:active-value="headerItem?.tableForm?.activeValue" :inactive-value="headerItem?.tableForm?.inactiveValue"
<el-form-item
v-if="headerItem?.tableForm?.type == 'Switch'"
:prop="headerItem.field">
<el-switch
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:loading="headerItem?.tableForm?.loading"
:size="headerItem?.tableForm?.size"
:active-icon="headerItem?.tableForm?.activeIcon"
:inactive-icon="headerItem?.tableForm?.inactiveIcon"
:active-text="headerItem?.tableForm?.activeText"
:inactive-text="headerItem?.tableForm?.inactiveText"
:active-value="headerItem?.tableForm?.activeValue"
:inactive-value="headerItem?.tableForm?.inactiveValue"
:active-color="headerItem?.tableForm?.inactiveColor"
:inactive-color="headerItem?.tableForm?.inactiveColor" />
</el-form-item>
<!-- Radio 单选-->
<el-form-item v-if="headerItem?.tableForm?.type == 'Radio'" :prop="headerItem.field">
<el-radio-group v-model="row[headerItem.field]" :size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)" :text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill" :name="headerItem?.tableForm?.name" :id="headerItem?.tableForm?.id">
<el-radio v-for="(item, index) in initSelectOptions(headerItem)" :key="index" :label="item.value"
:size="headerItem?.tableForm?.size" :disabled="itemIsDisabled(headerItem, row)"
<el-form-item
v-if="headerItem?.tableForm?.type == 'Radio'"
:prop="headerItem.field">
<el-radio-group
v-model="row[headerItem.field]"
:size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill"
:name="headerItem?.tableForm?.name"
:id="headerItem?.tableForm?.id">
<el-radio
v-for="(item, index) in initSelectOptions(headerItem)"
:key="index"
:label="item.value"
:size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)"
:border="headerItem?.tableForm?.border">
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- Checkbox 多选-->
<el-form-item v-if="headerItem?.tableForm?.type == 'Checkbox'" :prop="headerItem.field">
<el-checkbox-group v-model="row[headerItem.field]" :disabled="itemIsDisabled(headerItem, row)"
:size="headerItem?.tableForm?.size" :min="headerItem?.tableForm?.min" :max="headerItem?.tableForm?.max"
:text-color="headerItem?.tableForm?.textColor" :fill="headerItem?.tableForm?.fill">
<el-checkbox v-for="(item, index) in initSelectOptions(headerItem)" :key="index" :label="item.value"
:disabled="itemIsDisabled(headerItem, row)" :true-label="headerItem?.tableForm?.trueLabel"
:false-label="headerItem?.tableForm?.falseLabel" :border="headerItem?.tableForm?.border"
:size="headerItem?.tableForm?.size" :name="headerItem?.tableForm?.name"
<el-form-item
v-if="headerItem?.tableForm?.type == 'Checkbox'"
:prop="headerItem.field">
<el-checkbox-group
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:size="headerItem?.tableForm?.size"
:min="headerItem?.tableForm?.min"
:max="headerItem?.tableForm?.max"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill">
<el-checkbox
v-for="(item, index) in initSelectOptions(headerItem)"
:key="index"
:label="item.value"
:disabled="itemIsDisabled(headerItem, row)"
:true-label="headerItem?.tableForm?.trueLabel"
:false-label="headerItem?.tableForm?.falseLabel"
:border="headerItem?.tableForm?.border"
:size="headerItem?.tableForm?.size"
:name="headerItem?.tableForm?.name"
:checked="headerItem?.tableForm?.checked">
{{ item.label }}
</el-checkbox>
@ -192,7 +299,8 @@ const emit = defineEmits([
'selectCallback',
'handleTableSelect',
'handleDelete',
'handleAdd'
'handleAdd',
'inpuFocus'
])
// | type = radio | type = select
const initSelectOptions = (item) => {
@ -257,6 +365,12 @@ const handleDelete = (row, index) => {
const handleAdd = () => {
emit('handleAdd')
}
//
const inpuFocus = (headerItem)=>{
if(headerItem.isInpuFocusShow){
emit('inpuFocus')
}
}
// setup
defineExpose({
TableBaseComponents_Ref,

2
src/components/Tabs/src/Tabs.vue

@ -26,8 +26,6 @@ const props = defineProps({
default: 0
},
})
const tabsList = props.tabsList
const current = ref(props.current);
const change = (item, index) => {
current.value = index

2
src/store/modules/app.ts

@ -59,7 +59,7 @@ export const useAppStore = defineStore('app', {
tagsViewIcon: true, // 是否显示标签图标
logo: true, // logo
fixedHeader: true, // 固定toolheader
footer: true, // 显示页脚
footer: false, // 显示页脚
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
fixedMenu: wsCache.get('fixedMenu') || false, // 是否固定菜单

2
src/utils/disposition/tableColumns.ts

@ -9,7 +9,7 @@ export const ItemBasic = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code',
sort: 'custom',
table: {
width:700
width: 150
},
tableForm:{
minWidth:200,

179
src/views/detail/detail/index.vue

@ -1,179 +0,0 @@
<template>
<!-- 搜索工作栏 -->
<ContentWrap>
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
<el-form-item label="部门名称" prop="title">
<el-input v-model="queryParams.name" placeholder="请输入部门名称" clearable class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> 搜索
</el-button>
<el-button type="info" plain @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> 重置
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[73%]">
<Form ref="formRef" v-loading="formLoading" :rules="rules" :schema="ItemBasic.allSchemas.formSchema" :is-col="true"/>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
<Annex :data="annexData" @handleImport="handleImport" @deleteAnnex="deleteAnnexSuccess" />
<!-- 备注组件 -->
<Remarks :data="remarksData" class="mt-20px" @submitSucss="remarksSubmitSucss"/>
<!-- 变更记录组件 -->
<ChangeRecord :data="changeRecordData" class="mt-20px" />
</ContentWrap>
<!-- 用户导入对话框 -->
<ImportForm ref="importFormRef" :importTemplateData="importTemplateData" @success="importSuccess" />
</div>
</template>
<script lang="ts" setup>
defineOptions({ name: 'Detail' })
import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
import { ItemBasic } from '@/utils/disposition/tableColumns.ts'
import * as UserApi from '@/api/system/user'
//
const queryParams = reactive({
title: '',
name: undefined,
status: undefined,
pageNo: 1,
pageSize: 100
})
const queryFormRef = ref() //
// const formLabel = ref(ItemBasic)//formlabel
//
const annexData = reactive({
annexList: [{
title: '文件名文件名2023-12-12.docx',
size: '150.02KB',
people: '贾先生',
time: '2023年5月6日 17:16:00',
}, {
title: '文件名文件名2023-12-15.docx',
size: '242KB',
people: '张张',
time: '2022年12月12日 17:16:00',
}]
})
//
const remarksData = reactive({
remarksList: [{
name: '诸葛亮',
text: '转朱阁,低绮户,照无眠。不应有恨,何事长向别时圆?人有悲欢离合,月有阴晴圆缺,此事古难全。但愿人长久,千里共婵娟。',
time: '2023年5月6日 17:16:00',
}, {
name: '刘备',
text: '转朱阁,低绮户,照无眠。不应有恨,何事长向别时圆?人有悲欢离合,月有阴晴圆缺,此事古难全。但愿人长久,千里共婵娟。',
time: '2022年12月12日 17:16:00',
}]
})
//
const changeRecordData = reactive({
changeRecordList: [{
name: '诸葛亮',
type: 1,
time: '2023年5月6日 17:16:00',
}, {
name: '刘备',
type: 2,
time: '2023年5月6日 17:16:00',
}, {
name: '曹操',
type: 3,
time: '2023年5月6日 17:16:00',
file: [{
name: '这是个附件的名字.docx',
url: 'http://localhost:12080/admin-api/system/user/get-import-template'
}, {
name: '这是个附件的名字.docx',
url: 'http://localhost:12080/admin-api/system/user/get-import-template'
}]
}]
})
//
const importTemplateData = reactive({
templateUrl: UserApi.importUserTemplate(),
templateTitle: '导入模版99.xls'
})
//
const importSuccess = () => {
}
/** 搜索按钮操作 */
const handleQuery = () => {
}
/** 重置按钮操作 */
const resetQuery = () => {
queryParams.pageNo = 1
queryFormRef.value.resetFields()
}
/** 用户导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const deleteAnnexSuccess = async () => {
console.log('删除成功');
}
//
const remarksSubmitSucss=()=>{
console.log('提交陈工');
}
import * as MailAccountApi from '@/api/system/mail/account'
import { allSchemas, rules } from '@/views/system/mail/account/account.data'
const { t } = useI18n() //
const message = useMessage() //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formRef = ref() // Ref
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef) return
const valid = await formRef.value.getElFormRef().validate()
if (!valid) return
//
formLoading.value = true
try {
const data = formRef.value.formModel as MailAccountApi.MailAccountVO
if (formType.value === 'create') {
await MailAccountApi.createMailAccount(data)
message.success(t('common.createSuccess'))
} else {
await MailAccountApi.updateMailAccount(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
</script>

2
src/views/infra/customInterface/index.vue

@ -1,7 +1,5 @@
<template>
<ContentWrap>
<IFrame :src="src"/>
</ContentWrap>
</template>
<script lang="ts" setup name="CustomInterface">
// import { getAccessToken, getTenantId } from '@/utils/auth'

7
src/views/wms/itembasic/ItembasicForm.vue

@ -4,7 +4,7 @@
<Form ref="formRef" v-loading="formLoading" :rules="ItemBasicRules" :schema="ItemBasic.allSchemas.formSchema"
:model="formData" :is-col="true" />
<div class="table">
<TableForm ref="tableFormRef" :tableFields="ItemBasic.allSchemas.tableFormColumns" :tableData="tableData" class="w-[100%]" @handleAdd="handleAdd" :tableFormRules="ItemBasicRules" @handleDelete="handleDelete"/>
<TableForm ref="tableFormRef" :tableFields="ItemBasic.allSchemas.tableFormColumns" :tableData="tableData" class="w-[100%]" @handleAdd="handleAdd" :tableFormRules="ItemBasicRules" @handleDelete="handleDelete" @inpuFocus="inpuFocus"/>
</div>
</div>
<template #footer>
@ -164,6 +164,11 @@ const handleAdd = ()=>{
const handleDelete =(item,index)=>{
tableData.value.splice(index,1)
}
// input
const inpuFocus = () => {
console.log(1);
}
</script>
<style scoped>
.table {

Loading…
Cancel
Save