wlwy-package 4.0.0-beta.21 → 4.0.0-beta.22

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.
@@ -18,3 +18,5 @@ export type { WPageProps } from './type';
18
18
  export { default as WPage } from './src/page.vue';
19
19
  export type { WCopyableProps } from './type';
20
20
  export { default as WCopyable } from './src/copyable.vue';
21
+ export type { WImagePreviewProps } from './type';
22
+ export { default as WImagePreview } from './src/image-preview.vue';
@@ -0,0 +1,5 @@
1
+ import type { WImagePreviewProps } from '../type';
2
+ declare const _default: import("vue").DefineComponent<WImagePreviewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WImagePreviewProps> & Readonly<{}>, {
3
+ width: number;
4
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -239,4 +239,17 @@ export type WCopyableProps = {
239
239
  */
240
240
  tooltip?: boolean;
241
241
  };
242
+ /**
243
+ * w-image-preview 组件属性
244
+ */
245
+ export type WImagePreviewProps = {
246
+ /**
247
+ * 图片地址
248
+ */
249
+ images?: string | string[];
250
+ /**
251
+ * 图片宽度(正方形)
252
+ */
253
+ width?: number;
254
+ };
242
255
  export type { FooterButtonType, WButtonProps, WCardProps, WDatePickerProps, WDescriptionsProps, WDescriptionsItemProps, WModalProps, WRangePickerProps, WStatisticProps, WUploadProps } from '../antd';
@@ -7,7 +7,8 @@
7
7
  * 其字段由 MultiItem 自身上报全部 `option.model` 兜底
8
8
  *
9
9
  * @param getKeys 返回本控件占用的 form 字段名(如 `[model, startKey, endKey, labelModel]`)
10
+ * @param getActiveKeys 「有值」判定字段,默认取 getKeys(label 等切换器字段可排除)
10
11
  * @see WSearchRegisterFieldKey
11
12
  */
12
- export declare function useFormFieldRegister(getKeys: () => string[]): void;
13
+ export declare function useFormFieldRegister(getKeys: () => string[], getActiveKeys?: () => string[]): void;
13
14
  export default useFormFieldRegister;
@@ -12,7 +12,7 @@ export * from './keys';
12
12
  export { useService, type ServiceType } from './axios';
13
13
  export { type Config } from './config';
14
14
  export { getTitle, createFormRules, type FormRule, type FormRules, type CreateFormRulesOptions, type CreateFormRulesField, type CreateFormRulesPrompt } from './utils';
15
- export { getWarehouseId, getWarehouseCode, getWarehouseName, getPlatformCode, type WarehouseProp } from './utils/localStorage';
15
+ export { getWarehouseId, getWarehouseCode, getWarehouseName, getWarehouseInfo, setWarehouseInfo, removeWarehouseInfo, getPlatformCode, type WarehouseProp } from './utils/localStorage';
16
16
  export declare const install: (app: App) => App<any>;
17
17
  declare const _default: {
18
18
  install: (app: App<any>) => App<any>;
@@ -10,14 +10,18 @@ export declare const WSearchRegisterResetKey: InjectionKey<WSearchRegisterReset>
10
10
  /**
11
11
  * WSearch 字段注册(表单控件自报本控件占用的 form 字段名)。
12
12
  * 传入 getter(而非快照),字段名随 props 变化时无需重新注册。
13
+ *
14
+ * @param getKeys 本控件占用的全部字段(「重置」时清空)
15
+ * @param getActiveKeys 参与「折叠区有值」判定的字段,默认同 getKeys;
16
+ * 仅切换 UI 的字段(如 `labelModel` 下拉默认值)可排除,避免被算作有值
13
17
  */
14
- export type WSearchRegisterField = (getKeys: () => string[]) => () => void;
18
+ export type WSearchRegisterField = (getKeys: () => string[], getActiveKeys?: () => string[]) => () => void;
15
19
  export declare const WSearchRegisterFieldKey: InjectionKey<WSearchRegisterField>;
16
20
  /** WSearch 字段注册域:首行(main)/ 折叠区(more) */
17
21
  export type WSearchFieldScope = 'main' | 'more';
18
22
  /** WSearch 内部字段注册表(供内部作用域组件切换注册域) */
19
23
  export interface WSearchFieldRegistry {
20
- add: (getKeys: () => string[], scope: WSearchFieldScope) => () => void;
24
+ add: (getKeys: () => string[], scope: WSearchFieldScope, getActiveKeys?: () => string[]) => () => void;
21
25
  }
22
26
  export declare const WSearchFieldRegistryKey: InjectionKey<WSearchFieldRegistry>;
23
27
  /**
@@ -15,15 +15,15 @@ type WarehouseIdsProp = {
15
15
  */
16
16
  export declare function getWarehouseIdObj(): WarehouseIdsProp;
17
17
  /**
18
- * 根据当前仓库 ID,从仓库选择字典取仓库编码
18
+ * 获取当前仓库编码,优先取本地缓存的仓库信息,未命中时从仓库选择字典取
19
19
  * @returns 仓库编码;无当前仓库或字典无匹配项时为 `undefined`
20
20
  */
21
21
  export declare function getWarehouseCode(): WarehouseProp['warehouseCode'] | undefined;
22
22
  /**
23
- * 根据当前仓库 ID,从仓库选择字典取仓库名称
23
+ * 获取当前仓库名称(当前语言),优先取本地缓存的仓库信息,未命中时从仓库选择字典取
24
24
  * @returns 仓库名称;无当前仓库或字典无匹配项时为 `undefined`
25
25
  */
26
- export declare function getWarehouseName(): string | undefined;
26
+ export declare function getWarehouseName(): WarehouseProp['nameZh'] | undefined;
27
27
  /**
28
28
  * 获取当前 platformCode 对应的仓库 ID
29
29
  * @returns 仓库 ID;无 platformCode 或未配置时为 `undefined`
@@ -32,11 +32,24 @@ export declare function getWarehouseId(): WarehouseProp['warehouseId'] | undefin
32
32
  /**
33
33
  * 写入当前 platformCode 对应的仓库 ID
34
34
  * @param id 仓库 ID
35
- * @remarks 无 platformCode 时提示错误并刷新页面
35
+ * @remarks 按 id 从仓库选择字典取仓库信息一并缓存,便于脱离字典同步读取仓库编码 / 名称;无 platformCode 时提示错误并刷新页面
36
36
  */
37
37
  export declare function setWarehouseId(id: WarehouseProp['warehouseId']): void;
38
38
  /** 清除 localStorage 中全部仓库 ID 映射 */
39
39
  export declare function removeWarehouseId(): void;
40
+ /**
41
+ * 读取当前仓库信息
42
+ * @returns 仓库信息;未写入或解析失败时为 `undefined`
43
+ */
44
+ export declare function getWarehouseInfo(): WarehouseProp | undefined;
45
+ /**
46
+ * 写入当前仓库信息
47
+ * @param info 仓库信息
48
+ * @remarks 仅缓存仓库信息,不改变当前仓库 ID、不刷新页面
49
+ */
50
+ export declare function setWarehouseInfo(info: WarehouseProp): void;
51
+ /** 清除 localStorage 中的仓库信息 */
52
+ export declare function removeWarehouseInfo(): void;
40
53
  /**
41
54
  * 写入平台编码
42
55
  * @param code 平台编码