File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { NO_DEPENDENCY_ID } from ' ~/composables/usePackageComparison'
33import { useRouteQuery } from ' @vueuse/router'
4- import { NPMX_SITE } from ' #shared/utils/constants'
54
65definePageMeta ({
76 name: ' compare' ,
@@ -88,7 +87,8 @@ const gridHeaders = computed(() =>
8887function exportComparisonDataAsMarkdown() {
8988 const mdData: Array <Array <string >> = []
9089 mdData .push ([' ' , ... gridHeaders .value ])
91- const maxLengths = gridHeaders .value .map (header => header .length )
90+ const maxLengths = [0 , ... gridHeaders .value .map (header => header .length )]
91+ console .log (maxLengths )
9292
9393 selectedFacets .value .forEach ((facet , index ) => {
9494 const label = facet .label
@@ -108,6 +108,7 @@ function exportComparisonDataAsMarkdown() {
108108 mdData ?.[index + 1 ]?.forEach ((item , index ) => {
109109 if (item .length > (maxLengths ?.[index ] || 0 )) {
110110 maxLengths [index ] = item .length
111+ console .log (maxLengths , index , item .length , item )
111112 }
112113 })
113114 })
You can’t perform that action at this time.
0 commit comments