diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 45c2b45e..9eaac4fc 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -22,12 +22,14 @@ - 添加部分注释 - pwa 图标补充 - types 类型调整 +- 升级`ant-design-vue`到`beta.11`,并修改带来的已知问题 ### 🐛 Bug Fixes - 修复本地代理 post 接口到 https 地址超时错误 - 修复 modal 在不显示 footer 的时候全屏高度计算问题 - 修复表单重置未删除校验信息错误 +- 修复顶部菜单分割模式样式问题 ## 2.0.0-rc.6 (2020-10-28) diff --git a/package.json b/package.json index 176f2e79..d6959881 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@iconify/iconify": "^2.0.0-rc.1", - "ant-design-vue": "^2.0.0-beta.10", + "ant-design-vue": "^2.0.0-beta.11", "apexcharts": "^3.22.0", "axios": "^0.21.0", "echarts": "^4.9.0", diff --git a/src/components/Drawer/src/BasicDrawer.tsx b/src/components/Drawer/src/BasicDrawer.tsx index 37cddfb2..e3966759 100644 --- a/src/components/Drawer/src/BasicDrawer.tsx +++ b/src/components/Drawer/src/BasicDrawer.tsx @@ -1,17 +1,6 @@ import { Drawer, Row, Col, Button } from 'ant-design-vue'; -import { - defineComponent, - ref, - computed, - watchEffect, - watch, - unref, - // getCurrentInstance, - nextTick, - toRaw, -} from 'vue'; +import { defineComponent, ref, computed, watchEffect, watch, unref, nextTick, toRaw } from 'vue'; import { BasicTitle } from '/@/components/Basic'; -// import { ScrollContainer, ScrollContainerOptions } from '/@/components/Container/index'; import { FullLoading } from '/@/components/Loading/index'; import { getSlot } from '/@/utils/helper/tsxHelper'; @@ -21,8 +10,6 @@ import { DrawerInstance, DrawerProps } from './types'; import { basicProps } from './props'; import { isFunction, isNumber } from '/@/utils/is'; import { LeftOutlined } from '@ant-design/icons-vue'; -// import { appStore } from '/@/store/modules/app'; -// import { useRouter } from 'vue-router'; import { buildUUID } from '/@/utils/uuid'; import { deepMerge } from '/@/utils'; import './index.less'; @@ -38,7 +25,6 @@ export default defineComponent({ const visibleRef = ref(false); const propsRef = ref | null>(null); - // 自定义title组件:获得title const getMergeProps = computed((): any => { return deepMerge(toRaw(props), unref(propsRef)); }); @@ -68,9 +54,11 @@ export default defineComponent({ } return opt; }); + watchEffect(() => { visibleRef.value = props.visible; }); + watch( () => visibleRef.value, (visible) => { @@ -83,6 +71,15 @@ export default defineComponent({ } ); + // 底部按钮自定义实现, + const getFooterHeight = computed(() => { + const { footerHeight, showFooter }: DrawerProps = unref(getProps); + if (showFooter && footerHeight) { + return isNumber(footerHeight) ? `${footerHeight}px` : `${footerHeight.replace('px', '')}px`; + } + return `0px`; + }); + // 取消事件 async function onClose(e: any) { const { closeFunc } = unref(getProps); @@ -103,14 +100,6 @@ export default defineComponent({ } } - // 底部按钮自定义实现, - const getFooterHeight = computed(() => { - const { footerHeight, showFooter }: DrawerProps = unref(getProps); - if (showFooter && footerHeight) { - return isNumber(footerHeight) ? `${footerHeight}px` : `${footerHeight.replace('px', '')}px`; - } - return `0px`; - }); function renderFooter() { const { showCancelBtn, @@ -171,11 +160,13 @@ export default defineComponent({ )} )} + {title && ( {() => title} )} + {getSlot(slots, 'titleToolbar')} )} @@ -208,22 +199,22 @@ export default defineComponent({ title: () => renderHeader(), default: () => ( <> -
+ {getSlot(slots, 'default')}
{renderFooter()} diff --git a/src/components/Drawer/src/types.ts b/src/components/Drawer/src/types.ts index c3eb9bfb..38957d22 100644 --- a/src/components/Drawer/src/types.ts +++ b/src/components/Drawer/src/types.ts @@ -1,4 +1,4 @@ -import type { Button } from 'ant-design-vue/types/button/button'; +import type { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes'; import type { CSSProperties, VNodeChild } from 'vue'; import type { ScrollContainerOptions } from '/@/components/Container/index'; @@ -47,13 +47,13 @@ export interface DrawerFooterProps { * The ok button props, follow jsx rules * @type object */ - okButtonProps: { props: Button; on: {} }; + okButtonProps: { props: ButtonProps; on: {} }; /** * The cancel button props, follow jsx rules * @type object */ - cancelButtonProps: { props: Button; on: {} }; + cancelButtonProps: { props: ButtonProps; on: {} }; /** * Whether to apply loading visual effect for OK button or not * @default false diff --git a/src/components/Form/src/hooks/useForm.ts b/src/components/Form/src/hooks/useForm.ts index 0b2cbe78..e856faf4 100644 --- a/src/components/Form/src/hooks/useForm.ts +++ b/src/components/Form/src/hooks/useForm.ts @@ -4,8 +4,9 @@ import { isInSetup } from '/@/utils/helper/vueHelper'; import { isProdMode } from '/@/utils/env'; import type { FormProps, FormActionType, UseFormReturnType, FormSchema } from '../types/form'; -import type { NamePath } from 'ant-design-vue/types/form/form-item'; -import type { ValidateFields } from 'ant-design-vue/types/form/form'; +import type { NamePath } from 'ant-design-vue/lib/form/interface'; + +export declare type ValidateFields = (nameList?: NamePath[]) => Promise; export function useForm(props?: Partial): UseFormReturnType { isInSetup(); diff --git a/src/components/Form/src/hooks/useFormAction.ts b/src/components/Form/src/hooks/useFormAction.ts index 5185aa57..f8eafda1 100644 --- a/src/components/Form/src/hooks/useFormAction.ts +++ b/src/components/Form/src/hooks/useFormAction.ts @@ -1,7 +1,6 @@ import type { ComputedRef, Ref } from 'vue'; -import type { FormProps, FormSchema } from '../types/form'; -import type { Form as FormType } from 'ant-design-vue/types/form/form'; -import type { NamePath } from 'ant-design-vue/types/form/form-item'; +import type { FormProps, FormSchema, FormActionType } from '../types/form'; +import type { NamePath } from 'ant-design-vue/lib/form/interface'; import { unref, toRaw } from 'vue'; @@ -17,7 +16,7 @@ interface UseFormActionContext { getSchema: ComputedRef; formModel: any; defaultValueRef: Ref; - formElRef: Ref; + formElRef: Ref; schemaRef: Ref; handleFormValues: Fn; actionState: { diff --git a/src/components/Form/src/types/form.ts b/src/components/Form/src/types/form.ts index 5fab498f..1ad73d4f 100644 --- a/src/components/Form/src/types/form.ts +++ b/src/components/Form/src/types/form.ts @@ -1,4 +1,4 @@ -import type { Form, NamePath, ValidationRule } from 'ant-design-vue/types/form/form'; +import type { NamePath, RuleObject } from 'ant-design-vue/lib/form/interface'; import type { VNode } from 'vue'; import type { BasicButtonProps } from '/@/components/Button/types'; import type { FormItem } from './formItem'; @@ -17,7 +17,7 @@ export interface ButtonProps extends BasicButtonProps { text?: string; } -export interface FormActionType extends Form { +export interface FormActionType { submit: () => Promise; setFieldsValue: (values: T) => void; resetFields: () => Promise; @@ -29,6 +29,7 @@ export interface FormActionType extends Form { appendSchemaByField: (schema: FormSchema, prefixField?: string) => void; validateFields: (nameList?: NamePath[]) => Promise; validate: (nameList?: NamePath[]) => Promise; + scrollToField: (name: NamePath, options?: ScrollOptions) => void; } export type RegisterFn = (formInstance: FormActionType) => void; @@ -113,7 +114,7 @@ export interface FormSchema { componentProps?: any; // 校验规则 - rules?: ValidationRule[]; + rules?: RuleObject[]; // 校验信息是否加入label rulesMessageJoinLabel?: boolean; @@ -150,7 +151,7 @@ export interface FormSchema { dynamicDisabled?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean); - dynamicRules?: (renderCallbackParams: RenderCallbackParams) => ValidationRule[]; + dynamicRules?: (renderCallbackParams: RenderCallbackParams) => RuleObject[]; } export interface HelpComponentProps { maxWidth: string; diff --git a/src/components/Form/src/types/formItem.ts b/src/components/Form/src/types/formItem.ts index f573d92b..ba050a65 100644 --- a/src/components/Form/src/types/formItem.ts +++ b/src/components/Form/src/types/formItem.ts @@ -1,5 +1,5 @@ -import type { NamePath } from 'ant-design-vue/types/form/form-item'; -import type { Col } from 'ant-design-vue/types/grid/col'; +import type { NamePath } from 'ant-design-vue/lib/form/interface'; +import type { ColProps } from 'ant-design-vue/lib/grid/Col'; import type { VNodeChild } from 'vue'; export interface FormItem { @@ -39,7 +39,7 @@ export interface FormItem { * The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with * @type Col */ - labelCol?: Col; + labelCol?: ColProps; /** * Whether provided or not, it will be generated by the validation rule. @@ -58,7 +58,7 @@ export interface FormItem { * The layout for input controls, same as labelCol * @type Col */ - wrapperCol?: Col; + wrapperCol?: ColProps; /** * Set sub label htmlFor. */ diff --git a/src/components/Form/src/types/index.ts b/src/components/Form/src/types/index.ts index 960b376c..c9607c97 100644 --- a/src/components/Form/src/types/index.ts +++ b/src/components/Form/src/types/index.ts @@ -1,5 +1,4 @@ -import { ColSpanType } from 'ant-design-vue/types/grid/col'; - +type ColSpanType = number | string; export interface ColEx { style?: any; /** diff --git a/src/components/Menu/src/SearchInput.vue b/src/components/Menu/src/SearchInput.vue index 43dec809..7c504fe7 100644 --- a/src/components/Menu/src/SearchInput.vue +++ b/src/components/Menu/src/SearchInput.vue @@ -69,8 +69,7 @@ margin: 12px 9px; &__search--dark { - // .setPlaceholder('.ant-input',#fff); - + .ant-input-affix-wrapper, .ant-input { .set-bg(); @@ -91,6 +90,7 @@ } &__search--light { + .ant-input-affix-wrapper, .ant-input { color: @text-color-base; background: #fff; diff --git a/src/components/Menu/src/index.less b/src/components/Menu/src/index.less index 74fce6c2..7e57fd05 100644 --- a/src/components/Menu/src/index.less +++ b/src/components/Menu/src/index.less @@ -105,8 +105,8 @@ &.ant-menu-light { .ant-menu-item { &.basic-menu-item__level1 { - height: 46px; - line-height: 46px; + height: 38px; + line-height: 38px; } } diff --git a/src/components/Modal/src/provideModal.ts b/src/components/Modal/src/provideModal.ts index ced013fd..6c24b8cc 100644 --- a/src/components/Modal/src/provideModal.ts +++ b/src/components/Modal/src/provideModal.ts @@ -7,5 +7,5 @@ export function provideModal(redoHeight: Fn) { } export function injectModal(): Fn { - return inject(key) as Fn; + return inject(key, () => {}) as Fn; } diff --git a/src/components/Table/src/components/renderFooter.tsx b/src/components/Table/src/components/renderFooter.tsx index 67acc322..b0592b31 100644 --- a/src/components/Table/src/components/renderFooter.tsx +++ b/src/components/Table/src/components/renderFooter.tsx @@ -1,9 +1,9 @@ import { Table } from 'ant-design-vue'; -import { TableRowSelection } from 'ant-design-vue/types/table/table'; import { cloneDeep } from 'lodash-es'; import { unref, ComputedRef } from 'vue'; -import { BasicColumn } from '../types/table'; import { isFunction } from '/@/utils/is'; +import type { BasicColumn, TableRowSelection } from '../types/table'; + export default ({ scroll = {}, columnsRef, @@ -17,7 +17,7 @@ export default ({ summaryFunc: any; rowKey?: string; dataSourceRef: ComputedRef; - rowSelectionRef: ComputedRef | null>; + rowSelectionRef: ComputedRef; }) => { if (!summaryFunc) { return; diff --git a/src/components/Table/src/const.ts b/src/components/Table/src/const.ts index 07c11157..9947a14a 100644 --- a/src/components/Table/src/const.ts +++ b/src/components/Table/src/const.ts @@ -1,4 +1,4 @@ -import { SorterResult } from 'ant-design-vue/types/table/table'; +import type { SorterResult } from './types/table'; export const ROW_KEY = 'key'; diff --git a/src/components/Table/src/hooks/useRowSelection.ts b/src/components/Table/src/hooks/useRowSelection.ts index 3fab5d8e..e5f47f19 100644 --- a/src/components/Table/src/hooks/useRowSelection.ts +++ b/src/components/Table/src/hooks/useRowSelection.ts @@ -1,6 +1,5 @@ import { computed, ref, unref, ComputedRef } from 'vue'; -import { BasicTableProps } from '../types/table'; -import { TableRowSelection } from 'ant-design-vue/types/table/table'; +import type { BasicTableProps, TableRowSelection } from '../types/table'; import { useProps } from './useProps'; /* eslint-disable */ @@ -10,7 +9,7 @@ export function useRowSelection(refProps: ComputedRef, emit: Em const selectedRowKeysRef = ref([]); const selectedRowRef = ref([]); - const getRowSelectionRef = computed((): TableRowSelection | null => { + const getRowSelectionRef = computed((): TableRowSelection | null => { const rowSelection = unref(propsRef).rowSelection; if (!rowSelection) { return null; diff --git a/src/components/Table/src/props.ts b/src/components/Table/src/props.ts index c78e5017..96144a3b 100644 --- a/src/components/Table/src/props.ts +++ b/src/components/Table/src/props.ts @@ -1,11 +1,13 @@ import type { PropType } from 'vue'; import type { PaginationProps } from './types/pagination'; -import type { BasicColumn, FetchSetting, TableSetting } from './types/table'; import type { + BasicColumn, + FetchSetting, + TableSetting, SorterResult, TableCustomRecord, TableRowSelection, -} from 'ant-design-vue/types/table/table'; +} from './types/table'; import type { FormProps } from '/@/components/Form/index'; import { DEFAULT_SORT_FN, FETCH_SETTING } from './const'; @@ -127,7 +129,7 @@ export const basicProps = { default: 0, }, rowSelection: { - type: Object as PropType | null>, + type: Object as PropType, default: null, }, title: { diff --git a/src/components/Table/src/types/column.ts b/src/components/Table/src/types/column.ts new file mode 100644 index 00000000..80d2b131 --- /dev/null +++ b/src/components/Table/src/types/column.ts @@ -0,0 +1,198 @@ +import { VNodeChild } from 'vue'; + +export interface ColumnFilterItem { + text?: string; + value?: string; + children?: any; +} + +export declare type SortOrder = 'ascend' | 'descend'; + +export interface RecordProps { + text: any; + record: T; + index: number; +} + +export interface FilterDropdownProps { + prefixCls?: string; + setSelectedKeys?: (selectedKeys: string[]) => void; + selectedKeys?: string[]; + confirm?: () => void; + clearFilters?: () => void; + filters?: ColumnFilterItem[]; + getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; + visible?: boolean; +} + +export declare type CustomRenderFunction = (record: RecordProps) => VNodeChild | JSX.Element; + +export interface ColumnProps { + /** + * specify how content is aligned + * @default 'left' + * @type string + */ + align?: 'left' | 'right' | 'center'; + + /** + * ellipsize cell content, not working with sorter and filters for now. + * tableLayout would be fixed when ellipsis is true. + * @default false + * @type boolean + */ + ellipsis?: boolean; + + /** + * Span of this column's title + * @type number + */ + colSpan?: number; + + /** + * Display field of the data record, could be set like a.b.c + * @type string + */ + dataIndex?: string; + + /** + * Default filtered values + * @type string[] + */ + defaultFilteredValue?: string[]; + + /** + * Default order of sorted values: 'ascend' 'descend' null + * @type string + */ + defaultSortOrder?: SortOrder; + + /** + * Customized filter overlay + * @type any (slot) + */ + filterDropdown?: + | VNodeChild + | JSX.Element + | ((props: FilterDropdownProps) => VNodeChild | JSX.Element); + + /** + * Whether filterDropdown is visible + * @type boolean + */ + filterDropdownVisible?: boolean; + + /** + * Whether the dataSource is filtered + * @default false + * @type boolean + */ + filtered?: boolean; + + /** + * Controlled filtered value, filter icon will highlight + * @type string[] + */ + filteredValue?: string[]; + + /** + * Customized filter icon + * @default false + * @type any + */ + filterIcon?: boolean | VNodeChild | JSX.Element; + + /** + * Whether multiple filters can be selected + * @default true + * @type boolean + */ + filterMultiple?: boolean; + + /** + * Filter menu config + * @type object[] + */ + filters?: ColumnFilterItem[]; + + /** + * Set column to be fixed: true(same as left) 'left' 'right' + * @default false + * @type boolean | string + */ + fixed?: boolean | 'left' | 'right'; + + /** + * Unique key of this column, you can ignore this prop if you've set a unique dataIndex + * @type string + */ + key?: string; + + /** + * Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config + * @type Function | ScopedSlot + */ + customRender?: CustomRenderFunction | VNodeChild | JSX.Element; + + /** + * Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true + * @type boolean | Function + */ + sorter?: boolean | Function; + + /** + * Order of sorted values: 'ascend' 'descend' false + * @type boolean | string + */ + sortOrder?: boolean | SortOrder; + + /** + * supported sort way, could be 'ascend', 'descend' + * @default ['ascend', 'descend'] + * @type string[] + */ + sortDirections?: SortOrder[]; + + /** + * Title of this column + * @type any (string | slot) + */ + title?: VNodeChild | JSX.Element; + + /** + * Width of this column + * @type string | number + */ + width?: string | number; + + /** + * Set props on per cell + * @type Function + */ + customCell?: (record: T, rowIndex: number) => object; + + /** + * Set props on per header cell + * @type object + */ + customHeaderCell?: (column: ColumnProps) => object; + + /** + * Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx + * @type Function + */ + onFilter?: (value: any, record: T) => boolean; + + /** + * Callback executed when filterDropdownVisible is changed, Use as a filterDropdownVisible event when using template or jsx + * @type Function + */ + onFilterDropdownVisibleChange?: (visible: boolean) => void; + + /** + * When using columns, you can use this property to configure the properties that support the slot, + * such as slots: { filterIcon: 'XXX'} + * @type object + */ + slots?: Record; +} diff --git a/src/components/Table/src/types/pagination.ts b/src/components/Table/src/types/pagination.ts index 448bbc4d..6e27e5a8 100644 --- a/src/components/Table/src/types/pagination.ts +++ b/src/components/Table/src/types/pagination.ts @@ -1,5 +1,15 @@ +import Pagination from 'ant-design-vue/lib/pagination'; import { VNodeChild } from 'vue'; -import { PaginationRenderProps } from 'ant-design-vue/types/pagination'; + +interface PaginationRenderProps { + page: number; + type: 'page' | 'prev' | 'next'; + originalElement: any; +} + +export declare class PaginationConfig extends Pagination { + position?: 'top' | 'bottom' | 'both'; +} export interface PaginationProps { /** * total number of data items diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index 0760f712..7b094958 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -1,23 +1,67 @@ -import { VNodeChild } from 'vue'; -import { PaginationProps } from './pagination'; -import { FormProps } from '/@/components/Form/index'; -import { - ExpandedRowRenderRecord, - PaginationConfig, - SorterResult, - TableCurrentDataSource, - TableCustomRecord, - TableRowSelection, -} from 'ant-design-vue/types/table/table'; -import { ColumnProps } from 'ant-design-vue/types/table/column'; +import type { VNodeChild } from 'vue'; +import type { PaginationProps } from './pagination'; +import type { FormProps } from '/@/components/Form/index'; +import type { IColumnProps, ITableRowSelection } from 'ant-design-vue/lib/table/interface'; import { ComponentType } from './componentType'; +import { ColumnProps } from './column'; export declare type SortOrder = 'ascend' | 'descend'; +export interface TableCurrentDataSource { + currentDataSource: T[]; +} + +export interface TableRowSelection extends ITableRowSelection { + /** + * Callback executed when selected rows change + * @type Function + */ + onChange?: (selectedRowKeys: string[] | number[], selectedRows: T[]) => any; + + /** + * Callback executed when select/deselect one row + * @type FunctionT + */ + onSelect?: (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => any; + + /** + * Callback executed when select/deselect all rows + * @type Function + */ + onSelectAll?: (selected: boolean, selectedRows: T[], changeRows: T[]) => any; + + /** + * Callback executed when row selection is inverted + * @type Function + */ + onSelectInvert?: (selectedRows: string[] | number[]) => any; +} + +export interface TableCustomRecord { + record?: T; + index?: number; +} + +export interface ExpandedRowRenderRecord extends TableCustomRecord { + indent?: number; + expanded?: boolean; +} export interface ColumnFilterItem { text?: string; value?: string; children?: any; } +export interface TableCustomRecord { + record?: T; + index?: number; +} + +export interface SorterResult { + column: ColumnProps; + order: SortOrder; + field: string; + columnKey: string; +} + export interface RenderEditableCellParams { dataIndex: string; component?: ComponentType; @@ -231,7 +275,7 @@ export interface BasicTableProps { * Row selection config * @type object */ - rowSelection?: TableRowSelection; + rowSelection?: TableRowSelection; /** * Set horizontal or vertical scrolling, can also be used to specify the width and height of the scroll area. @@ -265,7 +309,7 @@ export interface BasicTableProps { * Set props on per header row * @type Function */ - customHeaderRow?: (column: ColumnProps, index: number) => object; + customHeaderRow?: (column: IColumnProps, index: number) => object; /** * Set props on per row @@ -305,12 +349,7 @@ export interface BasicTableProps { * @param sorter * @param currentDataSource */ - onChange?: ( - pagination: PaginationConfig, - filters: Partial>, - sorter: SorterResult, - extra: TableCurrentDataSource - ) => void; + onChange?: (pagination: any, filters: any, sorter: any, extra: any) => void; /** * Callback executed when the row expand icon is clicked @@ -327,7 +366,7 @@ export interface BasicTableProps { onExpandedRowsChange?: (expandedRows: string[] | number[]) => void; } -export interface BasicColumn extends ColumnProps { +export interface BasicColumn extends IColumnProps { children?: BasicColumn[]; // flag?: 'INDEX' | 'DEFAULT' | 'CHECKBOX' | 'RADIO' | 'ACTION'; diff --git a/src/design/ant/index.less b/src/design/ant/index.less index e02fba64..17e24c19 100644 --- a/src/design/ant/index.less +++ b/src/design/ant/index.less @@ -2,6 +2,10 @@ @import './input.less'; @import './btn.less'; +.ant-col { + width: 100%; +} + // ================================= // ==============descriptions======= // ================================= diff --git a/src/setup/ant-design-vue/index.ts b/src/setup/ant-design-vue/index.ts index 90d52b6c..e6c7ead0 100644 --- a/src/setup/ant-design-vue/index.ts +++ b/src/setup/ant-design-vue/index.ts @@ -3,7 +3,7 @@ import type { App } from 'vue'; import { Form, Input } from 'ant-design-vue'; -import 'ant-design-vue/dist/antd.css'; +import 'ant-design-vue/dist/antd.less'; import './spin'; diff --git a/src/views/dashboard/analysis/components/FlowAnalysis.tsx b/src/views/dashboard/analysis/components/FlowAnalysis.tsx index 81563570..f450d5c4 100644 --- a/src/views/dashboard/analysis/components/FlowAnalysis.tsx +++ b/src/views/dashboard/analysis/components/FlowAnalysis.tsx @@ -11,7 +11,7 @@ export default defineComponent({ return ( {() => ( -
+ <> {() => ( )} -
+ )}
); diff --git a/src/views/dashboard/workbench/components/ProdTotal.vue b/src/views/dashboard/workbench/components/ProdTotal.vue index b9949fe5..13ef3f64 100644 --- a/src/views/dashboard/workbench/components/ProdTotal.vue +++ b/src/views/dashboard/workbench/components/ProdTotal.vue @@ -29,7 +29,7 @@ &__item { display: inline-block; - width: calc(25% - 8px); + flex: 0 0 calc(25% - 8px); padding: 20px 10px; margin-right: 8px; border-radius: 4px; diff --git a/src/views/demo/feat/i18n/index.vue b/src/views/demo/feat/i18n/index.vue index cf549b5e..a5f3a2c0 100644 --- a/src/views/demo/feat/i18n/index.vue +++ b/src/views/demo/feat/i18n/index.vue @@ -4,10 +4,10 @@ 国际化信息: {{ t('hello') }} - + 中文 - + 英文 diff --git a/src/views/demo/permission/front/Btn.vue b/src/views/demo/permission/front/Btn.vue index e8d293d0..84c5399e 100644 --- a/src/views/demo/permission/front/Btn.vue +++ b/src/views/demo/permission/front/Btn.vue @@ -14,10 +14,10 @@
权限切换(请先切换权限模式为前端角色权限模式): - + {{ RoleEnum.SUPER }} - + {{ RoleEnum.TEST }} diff --git a/src/views/demo/permission/front/index.vue b/src/views/demo/permission/front/index.vue index 760707d2..542489c9 100644 --- a/src/views/demo/permission/front/index.vue +++ b/src/views/demo/permission/front/index.vue @@ -14,10 +14,10 @@
权限切换(请先切换权限模式为前端角色权限模式): - + {{ RoleEnum.SUPER }} - + {{ RoleEnum.TEST }} diff --git a/src/views/sys/login/Login.vue b/src/views/sys/login/Login.vue index 5b84d3c5..7966c898 100644 --- a/src/views/sys/login/Login.vue +++ b/src/views/sys/login/Login.vue @@ -29,7 +29,7 @@ type="primary" size="large" class="rounded-sm" - block + :block="true" @click="login" :loading="formState.loading" >登录