jgy-public-component 0.0.24 → 0.0.25
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.
- package/dist/components/JProductDetail/JSkuLink.d.ts +9 -0
- package/dist/components/JProductDetail/ProductDetailHost.d.ts +3 -0
- package/dist/components/JProductDetail/index.d.ts +3 -0
- package/dist/components/JProductDetail/store.d.ts +36 -0
- package/dist/components/JProductDetail/useProductDetailDialog.d.ts +2 -21
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1433 -1362
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -2
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,28 @@
|
|
|
1
|
+
import { ProductDetailType } from './store';
|
|
1
2
|
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
|
|
3
|
+
|
|
2
4
|
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
5
|
code?: string | null;
|
|
4
6
|
emptyText?: string;
|
|
7
|
+
/** sku 或 spu,默认 sku */
|
|
8
|
+
type?: ProductDetailType;
|
|
5
9
|
}>, {
|
|
6
10
|
emptyText: string;
|
|
11
|
+
type: string;
|
|
7
12
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
13
|
open: (code: string) => void;
|
|
9
14
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
15
|
code?: string | null;
|
|
11
16
|
emptyText?: string;
|
|
17
|
+
/** sku 或 spu,默认 sku */
|
|
18
|
+
type?: ProductDetailType;
|
|
12
19
|
}>, {
|
|
13
20
|
emptyText: string;
|
|
21
|
+
type: string;
|
|
14
22
|
}>>> & Readonly<{
|
|
15
23
|
onOpen?: ((code: string) => any) | undefined;
|
|
16
24
|
}>, {
|
|
25
|
+
type: ProductDetailType;
|
|
17
26
|
emptyText: string;
|
|
18
27
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
19
28
|
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { default as JProductDetailDialog } from './JProductDetailDialog';
|
|
2
2
|
export { default as JSkuLink } from './JSkuLink';
|
|
3
|
+
export { default as ProductDetailHost } from './ProductDetailHost';
|
|
3
4
|
export { useProductDetailDialog } from './useProductDetailDialog';
|
|
5
|
+
export { useProductDetailStore } from './store';
|
|
6
|
+
export type { ProductDetailType } from './store';
|
|
4
7
|
export { provideProductRequest, resolveProductRequest, useInjectedProductRequest, J_PRODUCT_REQUEST_KEY, } from './request';
|
|
5
8
|
export type { JProductDetailDialogProps, JSkuLinkProps, JProductRequestFn, JProductRequestConfig, } from './types';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export type ProductDetailType = 'sku' | 'spu';
|
|
4
|
+
/**
|
|
5
|
+
* 全局产品详情状态
|
|
6
|
+
* 业务页:JSkuLink / store.open(code)
|
|
7
|
+
* 宿主:ProductDetailHost 渲染 JProductDetailDialog
|
|
8
|
+
*/
|
|
9
|
+
export declare const useProductDetailStore: StoreDefinition<"jgyProductDetail", Pick<{
|
|
10
|
+
visible: Ref<boolean, boolean>;
|
|
11
|
+
code: Ref<string, string>;
|
|
12
|
+
type: Ref<ProductDetailType, ProductDetailType>;
|
|
13
|
+
open: (skuCode: string, opts?: {
|
|
14
|
+
type?: ProductDetailType;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
close: () => void;
|
|
17
|
+
reset: () => void;
|
|
18
|
+
}, "type" | "code" | "visible">, Pick<{
|
|
19
|
+
visible: Ref<boolean, boolean>;
|
|
20
|
+
code: Ref<string, string>;
|
|
21
|
+
type: Ref<ProductDetailType, ProductDetailType>;
|
|
22
|
+
open: (skuCode: string, opts?: {
|
|
23
|
+
type?: ProductDetailType;
|
|
24
|
+
}) => Promise<void>;
|
|
25
|
+
close: () => void;
|
|
26
|
+
reset: () => void;
|
|
27
|
+
}, never>, Pick<{
|
|
28
|
+
visible: Ref<boolean, boolean>;
|
|
29
|
+
code: Ref<string, string>;
|
|
30
|
+
type: Ref<ProductDetailType, ProductDetailType>;
|
|
31
|
+
open: (skuCode: string, opts?: {
|
|
32
|
+
type?: ProductDetailType;
|
|
33
|
+
}) => Promise<void>;
|
|
34
|
+
close: () => void;
|
|
35
|
+
reset: () => void;
|
|
36
|
+
}, "close" | "open" | "reset">>;
|
|
@@ -1,26 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```ts
|
|
7
|
-
* const {
|
|
8
|
-
* productDetailDialogVisible,
|
|
9
|
-
* productDetailDialogCode,
|
|
10
|
-
* openProductDetailDialog,
|
|
11
|
-
* } = useProductDetailDialog()
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* ```vue
|
|
15
|
-
* <JSkuLink :code="row.sku" @open="openProductDetailDialog" />
|
|
16
|
-
* <JProductDetailDialog
|
|
17
|
-
* v-model:visible="productDetailDialogVisible"
|
|
18
|
-
* :code="productDetailDialogCode"
|
|
19
|
-
* type="sku"
|
|
20
|
-
* />
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* 注意:列表中每行只用 JSkuLink,Dialog 放页面底部只挂一次,不要每行一个 Dialog。
|
|
3
|
+
* @deprecated 推荐 MainLayout 挂载 ProductDetailHost,页面只用 JSkuLink。
|
|
4
|
+
* 保留兼容:内部转调全局 store。
|
|
24
5
|
*/
|
|
25
6
|
export declare function useProductDetailDialog(): {
|
|
26
7
|
productDetailDialogVisible: Ref<boolean, boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { JSearchHeader } from './components/JSearchHeader';
|
|
|
6
6
|
import { JImportExcel } from './components/JImportExcel';
|
|
7
7
|
import { JSidebar, JSideMenuItem } from './components/JSidebar';
|
|
8
8
|
import { JAdminLayout } from './components/JAdminLayout';
|
|
9
|
-
import { JProductDetailDialog, JSkuLink } from './components/JProductDetail';
|
|
9
|
+
import { JProductDetailDialog, JSkuLink, ProductDetailHost } from './components/JProductDetail';
|
|
10
10
|
import { JSearchInputDialog } from './components/JSearchInputDialog';
|
|
11
11
|
import { DocNoLink, DocDetailHost } from './components/JDocDetail';
|
|
12
12
|
|
|
@@ -14,8 +14,8 @@ declare const _default: {
|
|
|
14
14
|
install: (app: App) => void;
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
|
-
export { JButton, JUploadImg, JIconRender, JSearchHeader, JImportExcel, JSidebar, JSideMenuItem, JAdminLayout, JProductDetailDialog, JSkuLink, JSearchInputDialog, DocNoLink, DocDetailHost, };
|
|
18
|
-
export { useProductDetailDialog, provideProductRequest, resolveProductRequest, useInjectedProductRequest, J_PRODUCT_REQUEST_KEY, } from './components/JProductDetail';
|
|
17
|
+
export { JButton, JUploadImg, JIconRender, JSearchHeader, JImportExcel, JSidebar, JSideMenuItem, JAdminLayout, JProductDetailDialog, JSkuLink, ProductDetailHost, JSearchInputDialog, DocNoLink, DocDetailHost, };
|
|
18
|
+
export { useProductDetailDialog, useProductDetailStore, provideProductRequest, resolveProductRequest, useInjectedProductRequest, J_PRODUCT_REQUEST_KEY, } from './components/JProductDetail';
|
|
19
19
|
export { createDocDetail, registerDocDetail, getDocDetailAdapters, getDocDetailEntry, getDocDetailRegistry, isDocDetailInitialized, useDocDetailStore, wmsDocDetailComponents, ReceiptOrderDetailView, QcOrderDetailView, InboundOrderDetailView, PutawayOrderDetailView, DeliveryOrderDetailView, TransferOrderDetailView, WorkOrderDetailView, } from './components/JDocDetail';
|
|
20
20
|
export { toSnakeCase, toCamelCase, pick, omit, deepClone, filterEmpty, flatten, unflatten, toTableColumns } from './utils';
|
|
21
21
|
export { createRouterGuard, buildRouteTree, transformBackendRoutes, findFirstAllowedRoute, getComponentImport } from './router';
|