提交 e9064631 作者: Vben

chore: update deps

上级 513823bf
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^12.1.4", "@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4", "@commitlint/config-conventional": "^12.1.4",
"@iconify/json": "^1.1.355", "@iconify/json": "^1.1.356",
"@purge-icons/generated": "^0.7.0", "@purge-icons/generated": "^0.7.0",
"@types/codemirror": "^5.60.0", "@types/codemirror": "^5.60.0",
"@types/crypto-js": "^4.0.1", "@types/crypto-js": "^4.0.1",
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
"@types/qrcode": "^1.4.0", "@types/qrcode": "^1.4.0",
"@types/qs": "^6.9.6", "@types/qs": "^6.9.6",
"@types/sortablejs": "^1.10.6", "@types/sortablejs": "^1.10.6",
"@typescript-eslint/eslint-plugin": "^4.26.1", "@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.26.1", "@typescript-eslint/parser": "^4.27.0",
"@vitejs/plugin-legacy": "^1.4.1", "@vitejs/plugin-legacy": "^1.4.1",
"@vitejs/plugin-vue": "^1.2.3", "@vitejs/plugin-vue": "^1.2.3",
"@vitejs/plugin-vue-jsx": "^1.1.5", "@vitejs/plugin-vue-jsx": "^1.1.5",
...@@ -91,12 +91,12 @@ ...@@ -91,12 +91,12 @@
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-define-config": "^1.0.8", "eslint-define-config": "^1.0.8",
"eslint-plugin-prettier": "^3.4.0", "eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-vue": "^7.11.0", "eslint-plugin-vue": "^7.11.1",
"esno": "^0.7.2", "esno": "^0.7.3",
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"http-server": "^0.12.3", "http-server": "^0.12.3",
"husky": "^6.0.0", "husky": "^6.0.0",
"inquirer": "^8.1.0", "inquirer": "^8.1.1",
"is-ci": "^3.0.0", "is-ci": "^3.0.0",
"less": "^4.1.1", "less": "^4.1.1",
"lint-staged": "^11.0.0", "lint-staged": "^11.0.0",
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
"vite-plugin-style-import": "^0.10.1", "vite-plugin-style-import": "^0.10.1",
"vite-plugin-svg-icons": "^0.7.0", "vite-plugin-svg-icons": "^0.7.0",
"vite-plugin-theme": "^0.8.1", "vite-plugin-theme": "^0.8.1",
"vite-plugin-windicss": "^1.0.3", "vite-plugin-windicss": "^1.0.4",
"vue-eslint-parser": "^7.6.0", "vue-eslint-parser": "^7.6.0",
"vue-tsc": "^0.1.7" "vue-tsc": "^0.1.7"
}, },
......
...@@ -2,13 +2,9 @@ export { default as BasicTable } from './src/BasicTable.vue'; ...@@ -2,13 +2,9 @@ export { default as BasicTable } from './src/BasicTable.vue';
export { default as TableAction } from './src/components/TableAction.vue'; export { default as TableAction } from './src/components/TableAction.vue';
export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue'; export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue';
export { default as TableImg } from './src/components/TableImg.vue'; export { default as TableImg } from './src/components/TableImg.vue';
export * from './src/types/table'; export * from './src/types/table';
export * from './src/types/pagination'; export * from './src/types/pagination';
export * from './src/types/tableAction'; export * from './src/types/tableAction';
export { useTable } from './src/hooks/useTable'; export { useTable } from './src/hooks/useTable';
export type { FormSchema, FormProps } from '/@/components/Form/src/types/form'; export type { FormSchema, FormProps } from '/@/components/Form/src/types/form';
export type { EditRecordRow } from './src/components/editable'; export type { EditRecordRow } from './src/components/editable';
import type { Component } from 'vue'; import type { Component } from 'vue';
import { import {
Input, Input,
Select, Select,
...@@ -9,7 +8,6 @@ import { ...@@ -9,7 +8,6 @@ import {
DatePicker, DatePicker,
TimePicker, TimePicker,
} from 'ant-design-vue'; } from 'ant-design-vue';
import type { ComponentType } from './types/componentType'; import type { ComponentType } from './types/componentType';
import { ApiSelect } from '/@/components/Form'; import { ApiSelect } from '/@/components/Form';
...@@ -17,7 +15,6 @@ const componentMap = new Map<ComponentType, Component>(); ...@@ -17,7 +15,6 @@ const componentMap = new Map<ComponentType, Component>();
componentMap.set('Input', Input); componentMap.set('Input', Input);
componentMap.set('InputNumber', InputNumber); componentMap.set('InputNumber', InputNumber);
componentMap.set('Select', Select); componentMap.set('Select', Select);
componentMap.set('ApiSelect', ApiSelect); componentMap.set('ApiSelect', ApiSelect);
componentMap.set('Switch', Switch); componentMap.set('Switch', Switch);
......
...@@ -8,13 +8,9 @@ ...@@ -8,13 +8,9 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { FormOutlined } from '@ant-design/icons-vue'; import { FormOutlined } from '@ant-design/icons-vue';
import { propTypes } from '/@/utils/propTypes';
export default defineComponent({ export default defineComponent({
name: 'EditTableHeaderIcon', name: 'EditTableHeaderIcon',
components: { FormOutlined }, components: { FormOutlined },
props: { props: { title: { type: String, default: '' } },
title: propTypes.string.def(''),
},
}); });
</script> </script>
...@@ -8,12 +8,11 @@ ...@@ -8,12 +8,11 @@
<script lang="ts"> <script lang="ts">
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import type { BasicColumn } from '../types/table'; import type { BasicColumn } from '../types/table';
import { defineComponent, computed } from 'vue'; import { defineComponent, computed } from 'vue';
import BasicHelp from '/@/components/Basic/src/BasicHelp.vue'; import BasicHelp from '/@/components/Basic/src/BasicHelp.vue';
import EditTableHeaderCell from './EditTableHeaderIcon.vue'; import EditTableHeaderCell from './EditTableHeaderIcon.vue';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
export default defineComponent({ export default defineComponent({
name: 'TableHeaderCell', name: 'TableHeaderCell',
components: { components: {
......
...@@ -32,16 +32,13 @@ ...@@ -32,16 +32,13 @@
import { defineComponent, PropType, computed, toRaw } from 'vue'; import { defineComponent, PropType, computed, toRaw } from 'vue';
import { MoreOutlined } from '@ant-design/icons-vue'; import { MoreOutlined } from '@ant-design/icons-vue';
import { Divider } from 'ant-design-vue'; import { Divider } from 'ant-design-vue';
import Icon from '/@/components/Icon/index'; import Icon from '/@/components/Icon/index';
import { ActionItem, TableActionType } from '/@/components/Table'; import { ActionItem, TableActionType } from '/@/components/Table';
import { PopConfirmButton } from '/@/components/Button'; import { PopConfirmButton } from '/@/components/Button';
import { Dropdown } from '/@/components/Dropdown'; import { Dropdown } from '/@/components/Dropdown';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { useTableContext } from '../hooks/useTableContext'; import { useTableContext } from '../hooks/useTableContext';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import { isBoolean, isFunction } from '/@/utils/is'; import { isBoolean, isFunction } from '/@/utils/is';
import { propTypes } from '/@/utils/propTypes'; import { propTypes } from '/@/utils/propTypes';
import { ACTION_COLUMN_FLAG } from '../const'; import { ACTION_COLUMN_FLAG } from '../const';
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import { defineComponent, unref, computed, toRaw } from 'vue'; import { defineComponent, unref, computed, toRaw } from 'vue';
import { Table } from 'ant-design-vue'; import { Table } from 'ant-design-vue';
import { cloneDeep } from 'lodash-es'; import { cloneDeep } from 'lodash-es';
......
...@@ -16,12 +16,10 @@ ...@@ -16,12 +16,10 @@
<script lang="ts"> <script lang="ts">
import type { TableSetting, ColumnChangeParam } from '../types/table'; import type { TableSetting, ColumnChangeParam } from '../types/table';
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { Divider } from 'ant-design-vue'; import { Divider } from 'ant-design-vue';
import TableSettingComponent from './settings/index.vue'; import TableSettingComponent from './settings/index.vue';
import TableTitle from './TableTitle.vue'; import TableTitle from './TableTitle.vue';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
export default defineComponent({ export default defineComponent({
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
import type { CSSProperties } from 'vue'; import type { CSSProperties } from 'vue';
import { defineComponent, computed } from 'vue'; import { defineComponent, computed } from 'vue';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { Image, Badge } from 'ant-design-vue'; import { Image, Badge } from 'ant-design-vue';
import { propTypes } from '/@/utils/propTypes'; import { propTypes } from '/@/utils/propTypes';
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, PropType } from 'vue'; import { computed, defineComponent, PropType } from 'vue';
import { BasicTitle } from '/@/components/Basic/index'; import { BasicTitle } from '/@/components/Basic/index';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { isFunction } from '/@/utils/is'; import { isFunction } from '/@/utils/is';
export default defineComponent({ export default defineComponent({
name: 'BasicTableTitle', name: 'BasicTableTitle',
components: { BasicTitle }, components: { BasicTitle },
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
</Tooltip> </Tooltip>
</template> </template>
<script lang="ts"> <script lang="ts">
import type { BasicColumn, ColumnChangeParam } from '../../types/table';
import { import {
defineComponent, defineComponent,
ref, ref,
...@@ -104,18 +105,14 @@ ...@@ -104,18 +105,14 @@
import { SettingOutlined, DragOutlined } from '@ant-design/icons-vue'; import { SettingOutlined, DragOutlined } from '@ant-design/icons-vue';
import { Icon } from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { ScrollContainer } from '/@/components/Container'; import { ScrollContainer } from '/@/components/Container';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useTableContext } from '../../hooks/useTableContext'; import { useTableContext } from '../../hooks/useTableContext';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { useSortable } from '/@/hooks/web/useSortable'; import { useSortable } from '/@/hooks/web/useSortable';
import { isNullAndUnDef } from '/@/utils/is'; import { isNullAndUnDef } from '/@/utils/is';
import { getPopupContainer } from '/@/utils'; import { getPopupContainer } from '/@/utils';
import { omit } from 'lodash-es'; import { omit } from 'lodash-es';
import type { BasicColumn, ColumnChangeParam } from '../../types/table';
interface State { interface State {
checkAll: boolean; checkAll: boolean;
checkedList: string[]; checkedList: string[];
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { Tooltip } from 'ant-design-vue'; import { Tooltip } from 'ant-design-vue';
import { FullscreenOutlined, FullscreenExitOutlined } from '@ant-design/icons-vue'; import { FullscreenOutlined, FullscreenExitOutlined } from '@ant-design/icons-vue';
import { useFullscreen } from '@vueuse/core'; import { useFullscreen } from '@vueuse/core';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useTableContext } from '../../hooks/useTableContext'; import { useTableContext } from '../../hooks/useTableContext';
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { Tooltip } from 'ant-design-vue'; import { Tooltip } from 'ant-design-vue';
import { RedoOutlined } from '@ant-design/icons-vue'; import { RedoOutlined } from '@ant-design/icons-vue';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useTableContext } from '../../hooks/useTableContext'; import { useTableContext } from '../../hooks/useTableContext';
......
...@@ -24,11 +24,9 @@ ...@@ -24,11 +24,9 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import type { SizeType } from '../../types/table'; import type { SizeType } from '../../types/table';
import { defineComponent, ref } from 'vue'; import { defineComponent, ref } from 'vue';
import { Tooltip, Dropdown, Menu } from 'ant-design-vue'; import { Tooltip, Dropdown, Menu } from 'ant-design-vue';
import { ColumnHeightOutlined } from '@ant-design/icons-vue'; import { ColumnHeightOutlined } from '@ant-design/icons-vue';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useTableContext } from '../../hooks/useTableContext'; import { useTableContext } from '../../hooks/useTableContext';
import { getPopupContainer } from '/@/utils'; import { getPopupContainer } from '/@/utils';
......
...@@ -9,14 +9,11 @@ ...@@ -9,14 +9,11 @@
<script lang="ts"> <script lang="ts">
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import type { TableSetting, ColumnChangeParam } from '../../types/table'; import type { TableSetting, ColumnChangeParam } from '../../types/table';
import { defineComponent, computed } from 'vue'; import { defineComponent, computed } from 'vue';
import ColumnSetting from './ColumnSetting.vue'; import ColumnSetting from './ColumnSetting.vue';
import SizeSetting from './SizeSetting.vue'; import SizeSetting from './SizeSetting.vue';
import RedoSetting from './RedoSetting.vue'; import RedoSetting from './RedoSetting.vue';
import FullScreenSetting from './FullScreenSetting.vue'; import FullScreenSetting from './FullScreenSetting.vue';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
export default defineComponent({ export default defineComponent({
......
...@@ -22,5 +22,7 @@ export const DEFAULT_FILTER_FN = defaultFilterFn; ...@@ -22,5 +22,7 @@ export const DEFAULT_FILTER_FN = defaultFilterFn;
// Default layout of table cells // Default layout of table cells
export const DEFAULT_ALIGN = 'center'; export const DEFAULT_ALIGN = 'center';
export const INDEX_COLUMN_FLAG = 'INDEX'; export const INDEX_COLUMN_FLAG = 'INDEX';
export const ACTION_COLUMN_FLAG = 'ACTION'; export const ACTION_COLUMN_FLAG = 'ACTION';
import type { BasicColumn, BasicTableProps, CellFormat, GetColumnsParams } from '../types/table'; import type { BasicColumn, BasicTableProps, CellFormat, GetColumnsParams } from '../types/table';
import type { PaginationProps } from '../types/pagination'; import type { PaginationProps } from '../types/pagination';
import type { ComputedRef } from 'vue'; import type { ComputedRef } from 'vue';
import { unref, Ref, computed, watch, ref, toRaw } from 'vue'; import { unref, Ref, computed, watch, ref, toRaw } from 'vue';
import { renderEditCell } from '../components/editable'; import { renderEditCell } from '../components/editable';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { isBoolean, isArray, isString, isObject, isFunction } from '/@/utils/is'; import { isBoolean, isArray, isString, isObject, isFunction } from '/@/utils/is';
import { isEqual, cloneDeep } from 'lodash-es'; import { isEqual, cloneDeep } from 'lodash-es';
import { formatToDate } from '/@/utils/dateUtil'; import { formatToDate } from '/@/utils/dateUtil';
import { DEFAULT_ALIGN, PAGE_SIZE, INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG } from '../const'; import { DEFAULT_ALIGN, PAGE_SIZE, INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG } from '../const';
function handleItem(item: BasicColumn, ellipsis: boolean) { function handleItem(item: BasicColumn, ellipsis: boolean) {
......
import type { BasicTableProps, FetchParams, SorterResult } from '../types/table'; import type { BasicTableProps, FetchParams, SorterResult } from '../types/table';
import type { PaginationProps } from '../types/pagination'; import type { PaginationProps } from '../types/pagination';
import { import {
ref, ref,
unref, unref,
...@@ -12,13 +11,10 @@ import { ...@@ -12,13 +11,10 @@ import {
Ref, Ref,
watchEffect, watchEffect,
} from 'vue'; } from 'vue';
import { useTimeoutFn } from '/@/hooks/core/useTimeout'; import { useTimeoutFn } from '/@/hooks/core/useTimeout';
import { buildUUID } from '/@/utils/uuid'; import { buildUUID } from '/@/utils/uuid';
import { isFunction, isBoolean } from '/@/utils/is'; import { isFunction, isBoolean } from '/@/utils/is';
import { get, cloneDeep } from 'lodash-es'; import { get, cloneDeep } from 'lodash-es';
import { FETCH_SETTING, ROW_KEY, PAGE_SIZE } from '../const'; import { FETCH_SETTING, ROW_KEY, PAGE_SIZE } from '../const';
interface ActionType { interface ActionType {
...@@ -179,7 +175,10 @@ export function useDataSource( ...@@ -179,7 +175,10 @@ export function useDataSource(
if (!api || !isFunction(api)) return; if (!api || !isFunction(api)) return;
try { try {
setLoading(true); setLoading(true);
const { pageField, sizeField, listField, totalField } = fetchSetting || FETCH_SETTING; const { pageField, sizeField, listField, totalField } = Object.assign(
FETCH_SETTING,
fetchSetting
);
let pageParams: Recordable = {}; let pageParams: Recordable = {};
const { current = 1, pageSize = PAGE_SIZE } = unref(getPaginationInfo) as PaginationProps; const { current = 1, pageSize = PAGE_SIZE } = unref(getPaginationInfo) as PaginationProps;
......
import type { PaginationProps } from '../types/pagination'; import type { PaginationProps } from '../types/pagination';
import type { BasicTableProps } from '../types/table'; import type { BasicTableProps } from '../types/table';
import { computed, unref, ref, ComputedRef } from 'vue'; import { computed, unref, ref, ComputedRef } from 'vue';
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue'; import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
import { isBoolean } from '/@/utils/is'; import { isBoolean } from '/@/utils/is';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const'; import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
......
import type { BasicTableProps, TableRowSelection } from '../types/table'; import type { BasicTableProps, TableRowSelection } from '../types/table';
import { computed, ref, unref, ComputedRef, Ref, toRaw } from 'vue'; import { computed, ref, unref, ComputedRef, Ref, toRaw } from 'vue';
import { ROW_KEY } from '../const'; import { ROW_KEY } from '../const';
......
...@@ -3,7 +3,6 @@ import type { PaginationProps } from '../types/pagination'; ...@@ -3,7 +3,6 @@ import type { PaginationProps } from '../types/pagination';
import type { DynamicProps } from '/#/utils'; import type { DynamicProps } from '/#/utils';
import type { FormActionType } from '/@/components/Form'; import type { FormActionType } from '/@/components/Form';
import type { WatchStopHandle } from 'vue'; import type { WatchStopHandle } from 'vue';
import { getDynamicProps } from '/@/utils'; import { getDynamicProps } from '/@/utils';
import { ref, onUnmounted, unref, watch, toRaw } from 'vue'; import { ref, onUnmounted, unref, watch, toRaw } from 'vue';
import { isProdMode } from '/@/utils/env'; import { isProdMode } from '/@/utils/env';
......
import type { Ref } from 'vue'; import type { Ref } from 'vue';
import type { BasicTableProps, TableActionType } from '../types/table'; import type { BasicTableProps, TableActionType } from '../types/table';
import { provide, inject, ComputedRef } from 'vue'; import { provide, inject, ComputedRef } from 'vue';
const key = Symbol('basic-table'); const key = Symbol('basic-table');
......
import type { ComputedRef, Ref } from 'vue'; import type { ComputedRef, Ref } from 'vue';
import type { BasicTableProps } from '../types/table'; import type { BasicTableProps } from '../types/table';
import { computed, unref, ref, toRaw } from 'vue'; import { computed, unref, ref, toRaw } from 'vue';
import { ROW_KEY } from '../const'; import { ROW_KEY } from '../const';
......
...@@ -3,6 +3,7 @@ import type { BasicTableProps, FetchParams } from '../types/table'; ...@@ -3,6 +3,7 @@ import type { BasicTableProps, FetchParams } from '../types/table';
import { unref, computed } from 'vue'; import { unref, computed } from 'vue';
import type { FormProps } from '/@/components/Form'; import type { FormProps } from '/@/components/Form';
import { isFunction } from '/@/utils/is'; import { isFunction } from '/@/utils/is';
export function useTableForm( export function useTableForm(
propsRef: ComputedRef<BasicTableProps>, propsRef: ComputedRef<BasicTableProps>,
slots: Slots, slots: Slots,
......
import type { ComputedRef, Slots } from 'vue'; import type { ComputedRef, Slots } from 'vue';
import type { BasicTableProps, InnerHandlers } from '../types/table'; import type { BasicTableProps, InnerHandlers } from '../types/table';
import { unref, computed, h } from 'vue'; import { unref, computed, h } from 'vue';
import TableHeader from '../components/TableHeader.vue'; import TableHeader from '../components/TableHeader.vue';
import { isString } from '/@/utils/is'; import { isString } from '/@/utils/is';
import { getSlot } from '/@/utils/helper/tsxHelper'; import { getSlot } from '/@/utils/helper/tsxHelper';
......
import type { BasicTableProps, TableRowSelection, BasicColumn } from '../types/table'; import type { BasicTableProps, TableRowSelection, BasicColumn } from '../types/table';
import type { Ref, ComputedRef } from 'vue'; import type { Ref, ComputedRef } from 'vue';
import { computed, unref, ref, nextTick, watch } from 'vue'; import { computed, unref, ref, nextTick, watch } from 'vue';
import { getViewportOffset } from '/@/utils/domUtils'; import { getViewportOffset } from '/@/utils/domUtils';
import { isBoolean } from '/@/utils/is'; import { isBoolean } from '/@/utils/is';
import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn';
import { useModalContext } from '/@/components/Modal'; import { useModalContext } from '/@/components/Modal';
import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'; import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated';
......
import type { ComputedRef } from 'vue'; import type { ComputedRef } from 'vue';
import type { BasicTableProps, TableCustomRecord } from '../types/table'; import type { BasicTableProps, TableCustomRecord } from '../types/table';
import { unref } from 'vue'; import { unref } from 'vue';
import { isFunction } from '/@/utils/is'; import { isFunction } from '/@/utils/is';
export function useTableStyle(propsRef: ComputedRef<BasicTableProps>, prefixCls: string) { export function useTableStyle(propsRef: ComputedRef<BasicTableProps>, prefixCls: string) {
function getRowClassName(record: TableCustomRecord, index: number) { function getRowClassName(record: TableCustomRecord, index: number) {
const { striped, rowClassName } = unref(propsRef); const { striped, rowClassName } = unref(propsRef);
...@@ -13,7 +13,5 @@ export function useTableStyle(propsRef: ComputedRef<BasicTableProps>, prefixCls: ...@@ -13,7 +13,5 @@ export function useTableStyle(propsRef: ComputedRef<BasicTableProps>, prefixCls:
return (index || 0) % 2 === 1 ? `${prefixCls}-row__striped` : ''; return (index || 0) % 2 === 1 ? `${prefixCls}-row__striped` : '';
} }
return { return { getRowClassName };
getRowClassName,
};
} }
...@@ -165,7 +165,7 @@ export interface BasicTableProps<T = any> { ...@@ -165,7 +165,7 @@ export interface BasicTableProps<T = any> {
// 查询条件请求之前处理 // 查询条件请求之前处理
handleSearchInfoFn?: Fn; handleSearchInfoFn?: Fn;
// 请求接口配置 // 请求接口配置
fetchSetting?: FetchSetting; fetchSetting?: Partial<FetchSetting>;
// 立即请求接口 // 立即请求接口
immediate?: boolean; immediate?: boolean;
// 在开起搜索表单的时候,如果没有数据是否显示表格 // 在开起搜索表单的时候,如果没有数据是否显示表格
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论