Skip to content

Commit

Permalink
[Improve] FE style improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Sep 18, 2024
1 parent 2bd4293 commit f97a45b
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
height: 18px;
background-color: #fff;
border-radius: 50%;
transition: transform 0.5s, background-color 0.5s;
transition:
transform 0.5s,
background-color 0.5s;
will-change: transform;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@
background-color: @component-background;
border: 1px solid rgb(0 0 0 / 8%);
border-radius: 0.25rem;
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%),
box-shadow:
0 2px 2px 0 rgb(0 0 0 / 14%),
0 3px 1px -2px rgb(0 0 0 / 10%),
0 1px 5px 0 rgb(0 0 0 / 6%);
background-clip: padding-box;
user-select: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
});
const getBindValue = computed(
() => ({ ...attrs, ...props, ...unref(getProps) } as Recordable),
() => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable,
);
const getSchema = computed((): FormSchema[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
line-height: 44px;
background-color: @component-background;
border-top: 1px solid @border-color-base;
box-shadow: 0 -6px 16px -8px rgb(0 0 0 / 8%), 0 -9px 28px 0 rgb(0 0 0 / 5%),
box-shadow:
0 -6px 16px -8px rgb(0 0 0 / 8%),
0 -9px 28px 0 rgb(0 0 0 / 5%),
0 -12px 48px 16px rgb(0 0 0 / 3%);
transition: width 0.2s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
props: {
column: {
type: Object as PropType<BasicColumn>,
default: () => ({} as BasicColumn),
default: () => ({}) as BasicColumn,
},
},
setup(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ export function useLockPage() {
}
clear();

timeId = setTimeout(() => {
lockPage();
}, lockTime * 60 * 1000);
timeId = setTimeout(
() => {
lockPage();
},
lockTime * 60 * 1000,
);
}

function lockPage(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default {
resourceGroup: 'Resource Group',
groupName: 'Group Name',
resourceNamePlaceholder: 'Please input resource name',
searchByResourceName: 'Search by resource name',
engineTypePlaceholder: 'Please select compute engine type',
resourceGroupPlaceholder: 'Please choose resource',
groupNamePlaceholder: 'Please input the group name',
Expand All @@ -46,6 +47,7 @@ export default {
title: 'Resource List',
resourceName: 'Resource Name',
resourceNamePlaceholder: 'Please enter the resource name',
searchByResourceName: 'Search by resource name',
descriptionPlaceholder: 'Please enter description',
createUser: 'Create User',
createTime: 'Create Time',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
groupName: '资源组名称',
resourceGroupPlaceholder: '请选择组资源',
resourceNamePlaceholder: '请输入资源名称',
searchByResourceName: '根据资源名搜索',
groupNamePlaceholder: '请输入资源组名称',
groupNameIsRequiredMessage: '资源组名称必填',
engineTypePlaceholder: '请选择引擎类型',
Expand All @@ -46,6 +47,7 @@ export default {
title: '资源列表',
resourceName: '资源名称',
resourceNamePlaceholder: '输入资源名查询',
searchByResourceName: '根据资源名搜索',
descriptionPlaceholder: '输入描述',
createUser: '创建者',
createTime: '创建时间',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const buildProps = <
: never;
};

export const definePropType = <T>(val: any) => ({ [wrapperKey]: val } as PropWrapper<T>);
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>;

export const keyOf = <T extends Object>(arr: T) => Object.keys(arr) as Array<keyof T>;
export const mutable = <T extends readonly any[] | Record<string, unknown>>(val: T) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
import { useAppTableColumns } from './hooks/useAppTableColumns';
import AppTableResize from './components/AppResize.vue';
import { useRouter } from 'vue-router';
import Icon from '/@/components/Icon';
defineOptions({
name: 'AppView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
limitations under the License.
-->
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button
id="e2e-upload-create-btn"
type="primary"
@click="handleCreate"
v-auth="'resource:add'"
>
<Icon icon="ant-design:plus-outlined" />
{{ t('common.add') }}
</a-button>
<PageWrapper contentFullHeight fixed-height>
<BasicTable @register="registerTable" class="flex flex-col">
<template #form-formFooter>
<Col :span="4" :offset="14" class="text-right">
<a-button
id="e2e-upload-create-btn"
type="primary"
@click="handleCreate"
v-auth="'resource:add'"
>
<Icon icon="ant-design:plus-outlined" />
{{ t('common.add') }}
</a-button>
</Col>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'engineType'">
Expand Down Expand Up @@ -111,7 +113,7 @@
@register="registerDrawer"
@success="handleSuccess"
/>
</div>
</PageWrapper>
</template>
<script lang="ts">
export default defineComponent({
Expand All @@ -133,7 +135,7 @@
fetchResourceList,
fetchTeamResource,
} from '/@/api/resource/upload';
import { Tag } from 'ant-design-vue';
import { Col, Tag } from 'ant-design-vue';
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
import flinkAppSvg from '/@/assets/icons/flink2.svg';
Expand All @@ -143,18 +145,22 @@
import udxfSvg from '/@/assets/icons/fx.svg';
import jarSvg from '/@/assets/icons/jar.svg';
import groupSvg from '/@/assets/icons/group.svg';
import { PageWrapper } from '/@/components/Page';
const teamResource = ref<Array<any>>([]);
const [registerDrawer, { openDrawer }] = useDrawer();
const { createMessage } = useMessage();
const { t } = useI18n();
const [registerTable, { reload }] = useTable({
title: t('flink.resource.table.title'),
api: fetchResourceList,
columns,
formConfig: {
baseColProps: { style: { paddingRight: '30px' } },
schemas: searchFormSchema,
rowProps: {
gutter: 14,
},
submitOnChange: true,
showActionButtonGroup: false,
},
sortFn: (sortInfo: SorterResult) => {
const { field, order } = sortInfo;
Expand All @@ -172,7 +178,7 @@
rowKey: 'id',
pagination: true,
useSearchForm: true,
showTableSetting: true,
showTableSetting: false,
showIndexColumn: false,
canResize: false,
actionColumn: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,12 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'resourceName',
label: t('flink.resource.table.resourceName'),
label: '',
component: 'Input',
componentProps: { placeholder: t('flink.resource.table.resourceNamePlaceholder') },
colProps: { span: 8 },
},
{
field: 'description',
label: t('common.description'),
component: 'Input',
componentProps: { placeholder: t('flink.resource.table.descriptionPlaceholder') },
colProps: { span: 8 },
componentProps: {
placeholder: t('flink.resource.table.searchByResourceName'),
allowClear: true,
},
colProps: { span: 6 },
},
];

0 comments on commit f97a45b

Please sign in to comment.