mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-12 04:58:42 +08:00
refactor: 调整 eslint.config.js,优化代码格式
This commit is contained in:
@@ -34,7 +34,7 @@ const formRef = ref<InstanceType<typeof GiForm>>()
|
||||
|
||||
const options: Options = {
|
||||
form: { size: 'large' },
|
||||
btns: { hide: true }
|
||||
btns: { hide: true },
|
||||
}
|
||||
|
||||
const columns: Columns = reactive([
|
||||
@@ -55,9 +55,9 @@ const columns: Columns = reactive([
|
||||
return nodeData.title.toLowerCase().includes(searchKey.toLowerCase())
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
rules: [{ required: true, message: '请选择上级部门' }]
|
||||
rules: [{ required: true, message: '请选择上级部门' }],
|
||||
},
|
||||
{
|
||||
label: '名称',
|
||||
@@ -65,8 +65,8 @@ const columns: Columns = reactive([
|
||||
type: 'input',
|
||||
rules: [{ required: true, message: '请输入名称' }],
|
||||
props: {
|
||||
maxLength: 30
|
||||
}
|
||||
maxLength: 30,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '排序',
|
||||
@@ -74,8 +74,8 @@ const columns: Columns = reactive([
|
||||
type: 'input-number',
|
||||
props: {
|
||||
min: 1,
|
||||
mode: 'button'
|
||||
}
|
||||
mode: 'button',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
@@ -83,8 +83,8 @@ const columns: Columns = reactive([
|
||||
type: 'textarea',
|
||||
props: {
|
||||
maxLength: 200,
|
||||
autoSize: { minRows: 3, maxRows: 5 }
|
||||
}
|
||||
autoSize: { minRows: 3, maxRows: 5 },
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
@@ -95,14 +95,14 @@ const columns: Columns = reactive([
|
||||
checkedValue: 1,
|
||||
uncheckedValue: 2,
|
||||
checkedText: '启用',
|
||||
uncheckedText: '禁用'
|
||||
}
|
||||
}
|
||||
uncheckedText: '禁用',
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
const { form, resetForm } = useForm({
|
||||
sort: 999,
|
||||
status: 1
|
||||
status: 1,
|
||||
})
|
||||
|
||||
// 重置
|
||||
|
||||
@@ -81,14 +81,14 @@ const {
|
||||
tableData,
|
||||
loading,
|
||||
search,
|
||||
handleDelete
|
||||
handleDelete,
|
||||
} = useTable(() => listDept(queryForm), {
|
||||
immediate: true,
|
||||
onSuccess: () => {
|
||||
nextTick(() => {
|
||||
tableRef.value?.tableRef?.expandAll(true)
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
// 过滤树
|
||||
@@ -104,7 +104,7 @@ const searchData = (name: string) => {
|
||||
if (filterData.length) {
|
||||
result.push({
|
||||
...item,
|
||||
children: filterData
|
||||
children: filterData,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -135,8 +135,8 @@ const columns: TableInstanceColumns[] = [
|
||||
width: 180,
|
||||
align: 'center',
|
||||
fixed: !isMobile() ? 'right' : undefined,
|
||||
show: has.hasPermOr(['system:dept:update', 'system:dept:delete', 'system:dept:add'])
|
||||
}
|
||||
show: has.hasPermOr(['system:dept:update', 'system:dept:delete', 'system:dept:add']),
|
||||
},
|
||||
]
|
||||
|
||||
// 重置
|
||||
@@ -148,7 +148,7 @@ const reset = () => {
|
||||
const onDelete = (record: DeptResp) => {
|
||||
return handleDelete(() => deleteDept(record.id), {
|
||||
content: `是否确定删除 [${record.name}]?`,
|
||||
showModal: true
|
||||
showModal: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user