소스 검색

style: reformat code

layhuts 1 개월 전
부모
커밋
08e4bb40b4
2개의 변경된 파일5개의 추가작업 그리고 7개의 파일을 삭제
  1. 2 5
      packages/effects/plugins/src/vxe-table/use-vxe-grid.vue
  2. 3 2
      playground/src/views/examples/vxe-table/viewed.vue

+ 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';
       },
     },
   });