diff --git a/frontend/crawlab-ui/src/components/core/autoprobe/AutoProbeResultsContainer.vue b/frontend/crawlab-ui/src/components/core/autoprobe/AutoProbeResultsContainer.vue index 47b92732..295b05c2 100644 --- a/frontend/crawlab-ui/src/components/core/autoprobe/AutoProbeResultsContainer.vue +++ b/frontend/crawlab-ui/src/components/core/autoprobe/AutoProbeResultsContainer.vue @@ -3,6 +3,7 @@ import { computed, ref } from 'vue'; import { ClTag } from '@/components'; import { translate, getIconByItemType } from '@/utils'; import { TAB_NAME_RESULTS, TAB_NAME_PREVIEW } from '@/constants'; +import { CellStyle } from 'element-plus'; const t = translate; @@ -10,6 +11,7 @@ const t = translate; const props = defineProps<{ data?: PageData | PageData[]; fields?: AutoProbeNavItem[]; + activeFieldName?: string; }>(); // Refs @@ -39,6 +41,7 @@ const tableColumns = computed>(() => { return { key: field.name, label: field.name, + minWidth: '200', value: (row: PageData) => { switch (field.type) { case 'list': @@ -65,6 +68,16 @@ const tableData = computed>(() => { return [data]; }); +const tableCellStyle: CellStyle = ({ column }) => { + const { activeFieldName } = props; + if (column.columnKey === activeFieldName) { + return { + backgroundColor: 'var(--el-color-primary-light-9)', + }; + } + return {}; +}; + // Methods const onTabSelect = (id: string) => { if (activeTabName.value === id) { @@ -125,8 +138,11 @@ defineOptions({ name: 'ClAutoProbeResultsContainer' });
diff --git a/frontend/crawlab-ui/src/interfaces/models/autoprobe.d.ts b/frontend/crawlab-ui/src/interfaces/models/autoprobe.d.ts index 9ea0ff6d..1173a328 100644 --- a/frontend/crawlab-ui/src/interfaces/models/autoprobe.d.ts +++ b/frontend/crawlab-ui/src/interfaces/models/autoprobe.d.ts @@ -80,4 +80,10 @@ export declare global { parent?: AutoProbeNavItem; fieldCount?: number; } + + interface AutoProbeResults { + data?: PageData | PageData[]; + fields?: AutoProbeNavItem[]; + activeField?: AutoProbeNavItem; + } } diff --git a/frontend/crawlab-ui/src/interfaces/models/treeNode.d.ts b/frontend/crawlab-ui/src/interfaces/models/treeNode.d.ts index 445960ac..802314a1 100644 --- a/frontend/crawlab-ui/src/interfaces/models/treeNode.d.ts +++ b/frontend/crawlab-ui/src/interfaces/models/treeNode.d.ts @@ -3,4 +3,5 @@ interface TreeNode { value?: any; children?: T[]; path?: string; + level?: number; } diff --git a/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue b/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue index 8d23e0cc..c386a786 100644 --- a/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue +++ b/frontend/crawlab-ui/src/layouts/content/detail/DetailLayout.vue @@ -125,7 +125,8 @@ defineOptions({ name: 'ClDetailLayout' }); overflow: hidden; .nav-actions { - height: fit-content; + height: 53px; + flex: 0 0 53px; } .nav-select { @@ -143,7 +144,7 @@ defineOptions({ name: 'ClDetailLayout' }); .content-container { flex: 1; - height: calc(100% - 41px - 50px); + height: calc(100% - 41px - 53px); } } } diff --git a/frontend/crawlab-ui/src/utils/store.ts b/frontend/crawlab-ui/src/utils/store.ts index 098224ba..bf6e24d4 100644 --- a/frontend/crawlab-ui/src/utils/store.ts +++ b/frontend/crawlab-ui/src/utils/store.ts @@ -316,7 +316,6 @@ export const getDefaultStoreActions = ( state, commit, }: StoreActionContext>) => { - console.debug('getList'); const { page, size } = state.tablePagination; try { commit('setTableLoading', true); diff --git a/frontend/crawlab-ui/src/views/autoprobe/detail/tabs/AutoProbeDetailTabPatterns.vue b/frontend/crawlab-ui/src/views/autoprobe/detail/tabs/AutoProbeDetailTabPatterns.vue index 12191c15..03d2ff52 100644 --- a/frontend/crawlab-ui/src/views/autoprobe/detail/tabs/AutoProbeDetailTabPatterns.vue +++ b/frontend/crawlab-ui/src/views/autoprobe/detail/tabs/AutoProbeDetailTabPatterns.vue @@ -1,8 +1,9 @@