mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-05 10:13:17 +08:00
fix: 修复一些代码warning(不影响实际运行)
This commit is contained in:
@@ -80,7 +80,7 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
|||||||
gridOptions,
|
gridOptions,
|
||||||
gridEvents: {
|
gridEvents: {
|
||||||
checkboxChange: (e) => {
|
checkboxChange: (e) => {
|
||||||
const records = e.$grid.getCheckboxRecords();
|
const records = e.$grid?.getCheckboxRecords?.() ?? [];
|
||||||
canUnlock.value = records.length === 1 && records[0]!.status === '1';
|
canUnlock.value = records.length === 1 && records[0]!.status === '1';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const formOptions: VbenFormProps = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const gridOptions: VxeGridProps<OperationLog> = {
|
const gridOptions: VxeGridProps = {
|
||||||
checkboxConfig: {
|
checkboxConfig: {
|
||||||
// 高亮
|
// 高亮
|
||||||
highlight: true,
|
highlight: true,
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ const gridOptions: VxeGridProps = {
|
|||||||
// 默认请求接口后展开全部 不需要可以删除这段
|
// 默认请求接口后展开全部 不需要可以删除这段
|
||||||
querySuccess: () => {
|
querySuccess: () => {
|
||||||
// 默认展开 需要加上标记
|
// 默认展开 需要加上标记
|
||||||
// eslint-disable-next-line no-use-before-define
|
|
||||||
eachTree(tableApi.grid.getData(), (item) => (item.expand = true));
|
eachTree(tableApi.grid.getData(), (item) => (item.expand = true));
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setExpandOrCollapse(true);
|
setExpandOrCollapse(true);
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ const formOptions: VbenFormProps = {
|
|||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
handleReset: async () => {
|
handleReset: async () => {
|
||||||
selectDeptId.value = [];
|
selectDeptId.value = [];
|
||||||
// eslint-disable-next-line no-use-before-define
|
|
||||||
const { formApi, reload } = tableApi;
|
const { formApi, reload } = tableApi;
|
||||||
await formApi.resetForm();
|
await formApi.resetForm();
|
||||||
const formValues = formApi.form.values;
|
const formValues = formApi.form.values;
|
||||||
|
|||||||
Reference in New Issue
Block a user