Ver Fonte

style: reformat code

layhuts há 1 mês atrás
pai
commit
08e4bb40b4

+ 2 - 5
packages/effects/plugins/src/vxe-table/use-vxe-grid.vue

@@ -92,11 +92,8 @@ watch(
 
     if (!cfg) return;
 
-    const keyField =
-      (gridOptions.value?.rowConfig as any)?.keyField || 'id';
-    const resolved = isBoolean(cfg)
-      ? {keyField}
-      : {keyField, ...cfg};
+    const keyField = (gridOptions.value?.rowConfig as any)?.keyField || 'id';
+    const resolved = isBoolean(cfg) ? {keyField} : {keyField, ...cfg};
     gridApi.viewedRowHelper = useViewedRow(resolved);
   },
   {immediate: true},

+ 3 - 2
playground/src/views/examples/vxe-table/viewed.vue

@@ -164,8 +164,9 @@ function onClassNameSet() {
   gridApi.setState({
     viewedRowOptions: {
       rowClassName: () => {
-
-        return isClassName.value ? 'bg-red-100 vxe-row--viewed' : 'vxe-row--viewed';
+        return isClassName.value
+          ? 'bg-red-100 vxe-row--viewed'
+          : 'vxe-row--viewed';
       },
     },
   });