@ftjs/core 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export interface FtFormColumnBase<F extends Record<string, any>> {
21
21
  *
22
22
  * 如果是在 TableColumns 中,则默认继承其中的 field
23
23
  */
24
- field?: RecordPath<F>;
24
+ field?: RecordPath<F> | `_${string}`;
25
25
  /**
26
26
  * 字段名数组,当表单需要返回多个值时,使用这个字段
27
27
  *
@@ -1,4 +1,4 @@
1
- import { MaybeRef, Ref } from 'vue';
1
+ import { ComputedRef, MaybeRef, Ref, ShallowRef, WritableComputedRef } from 'vue';
2
2
  /**
3
3
  * 临时工具类型减1
4
4
  */
@@ -23,11 +23,12 @@ export type Unref<T> = T extends MaybeRef<infer U> ? U : T;
23
23
  export type Unrefs<T> = {
24
24
  [K in keyof T]: Unref<T[K]>;
25
25
  };
26
+ export type MaybeRef2<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T> | ComputedRef<T>;
26
27
  /**
27
28
  * 工具类型:将对象的属性值转换为 {@link MaybeRef}
28
29
  */
29
30
  export type Refs<T> = {
30
- [K in keyof T]: T[K] extends Ref<any> ? T[K] : MaybeRef<T[K]>;
31
+ [K in keyof T]: T[K] extends Ref<any> ? T[K] : MaybeRef2<T[K]>;
31
32
  };
32
33
  /**
33
34
  * 工具类型:提取 Column 的类型
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftjs/core",
3
- "version": "1.3.0",
3
+ "version": "2.0.0",
4
4
  "keywords": [],
5
5
  "author": "",
6
6
  "license": "MIT",