mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-04 05:32:26 +08:00
15
.eslintrc.js
15
.eslintrc.js
@@ -38,19 +38,12 @@ module.exports = defineConfig({
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '.*', args: 'none' }],
|
||||
'no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
},
|
||||
// we are only using this rule to check for unused arguments since TS
|
||||
// catches unused variables but not args.
|
||||
{ varsIgnorePattern: '.*', args: 'none' },
|
||||
],
|
||||
'space-before-function-paren': 'off',
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { TableBaseColumn } from 'naive-ui/lib/data-table/src/interface';
|
||||
import type { InternalRowData, TableBaseColumn } from 'naive-ui/lib/data-table/src/interface';
|
||||
import { ComponentType } from './componentType';
|
||||
export interface BasicColumn extends TableBaseColumn {
|
||||
export interface BasicColumn<T = InternalRowData> extends TableBaseColumn<T> {
|
||||
//编辑表格
|
||||
edit?: boolean;
|
||||
editRow?: boolean;
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import { h } from 'vue';
|
||||
import { NAvatar } from 'naive-ui';
|
||||
|
||||
export const columns = [
|
||||
import { BasicColumn } from '@/components/Table';
|
||||
export interface ListData {
|
||||
id: string;
|
||||
name: string;
|
||||
avatar: string;
|
||||
address: string;
|
||||
beginTime: string;
|
||||
endTime: string;
|
||||
date: string;
|
||||
}
|
||||
export const columns: BasicColumn<ListData>[] = [
|
||||
{
|
||||
title: 'id',
|
||||
key: 'id',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<BasicTable
|
||||
:columns="columns"
|
||||
:request="loadDataTable"
|
||||
:row-key="(row) => row.id"
|
||||
:row-key="(row:ListData) => row.id"
|
||||
ref="actionRef"
|
||||
:actionColumn="actionColumn"
|
||||
@update:checked-row-keys="onCheckedRow"
|
||||
@@ -67,7 +67,7 @@
|
||||
import { BasicTable, TableAction } from '@/components/Table';
|
||||
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
|
||||
import { getTableList } from '@/api/table/list';
|
||||
import { columns } from './columns';
|
||||
import { columns, ListData } from './columns';
|
||||
import { PlusOutlined } from '@vicons/antd';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { type FormRules } from 'naive-ui';
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
"dom",
|
||||
"esnext"
|
||||
],
|
||||
"types": [
|
||||
"vite/client"
|
||||
],
|
||||
"typeRoots": [
|
||||
"./node_modules/@types/",
|
||||
"./types"
|
||||
|
||||
1
types/modules.d.ts
vendored
1
types/modules.d.ts
vendored
@@ -1,3 +1,4 @@
|
||||
/// <reference types="vite/client" />
|
||||
declare module '*.vue' {
|
||||
import { DefineComponent } from 'vue';
|
||||
const Component: DefineComponent<{}, {}, any>;
|
||||
|
||||
Reference in New Issue
Block a user