@brushes/component-core 0.0.32 → 0.1.3
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/package.json +1 -1
- package/scripts/build.sh +4 -0
- package/src/components/code.tsx +3 -3
- package/src/components/image.tsx +3 -3
- package/src/setting/basic.tsx +1 -1
- package/src/store/commonStore.tsx +2 -2
- package/dist/basic-component/container/index.d.ts +0 -23
- package/dist/basic-component/default/index.d.ts +0 -8
- package/dist/basic-component/empty/index.d.ts +0 -4
- package/dist/basic-component/index.d.ts +0 -3
- package/dist/basic-component/resizer/index.d.ts +0 -0
- package/dist/basic-component/resizer/numToMeasurement.d.ts +0 -7
- package/dist/components/code.d.ts +0 -5
- package/dist/components/image.d.ts +0 -5
- package/dist/components/index.d.ts +0 -2
- package/dist/context/index.d.ts +0 -6
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -26
- package/dist/setting/basic.d.ts +0 -7
- package/dist/setting/index.d.ts +0 -1
- package/dist/setting/title.d.ts +0 -4
- package/dist/store/commonModule.d.ts +0 -5
- package/dist/store/commonStore.d.ts +0 -56
- package/dist/store/index.d.ts +0 -2
- package/dist/store/rootModule.d.ts +0 -5
- package/dist/store/rootStore.d.ts +0 -35
- package/dist/store/storeDataConfig.d.ts +0 -0
- package/dist/tool/combine.d.ts +0 -1
- package/dist/tool/fullpath.d.ts +0 -1
- package/dist/tool/index.d.ts +0 -2
package/package.json
CHANGED
package/scripts/build.sh
ADDED
package/src/components/code.tsx
CHANGED
|
@@ -34,12 +34,12 @@ export const CodeComponent = ({ api = '/web/ml/muser/sendPhone.json', codeKey, h
|
|
|
34
34
|
let params = {
|
|
35
35
|
userPhone: loginName || userPhone || userinfoConPhone,
|
|
36
36
|
code: verCode
|
|
37
|
-
}
|
|
38
|
-
if
|
|
37
|
+
}
|
|
38
|
+
if(codeKey) {
|
|
39
39
|
params = {
|
|
40
40
|
userPhone: rest[codeKey],
|
|
41
41
|
code: verCode
|
|
42
|
-
}
|
|
42
|
+
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
get(api, params)
|
package/src/components/image.tsx
CHANGED
|
@@ -12,7 +12,7 @@ const useStyle = createStyles(({ token, css }, { height }: { height: number }) =
|
|
|
12
12
|
`
|
|
13
13
|
};
|
|
14
14
|
});
|
|
15
|
-
export const ImageCodeComponent = ({ api = '/web/ml/mlogin/getVerCode.img', codeKey, height = 40 }: { api?: string; codeKey?:
|
|
15
|
+
export const ImageCodeComponent = ({ api = '/web/ml/mlogin/getVerCode.img', codeKey, height = 40 }: { api?: string; codeKey?:string; height?: number }) => {
|
|
16
16
|
const { styles } = useStyle({ height });
|
|
17
17
|
const form = Form.useFormInstance();
|
|
18
18
|
const isDisabled = form.getFieldValue('isDisabled');
|
|
@@ -31,8 +31,8 @@ export const ImageCodeComponent = ({ api = '/web/ml/mlogin/getVerCode.img', code
|
|
|
31
31
|
const { loginName, userPhone, userinfoConPhone, ...rest } = getFieldsValue();
|
|
32
32
|
|
|
33
33
|
let params = loginName || userPhone || userinfoConPhone;
|
|
34
|
-
if
|
|
35
|
-
params =
|
|
34
|
+
if(codeKey) {
|
|
35
|
+
params = rest[codeKey]
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
fetch(`${api}?userPhone=${params}`)
|
package/src/setting/basic.tsx
CHANGED
|
@@ -47,7 +47,7 @@ export type moduleType = {
|
|
|
47
47
|
open?: boolean; //抽屉展示或掩藏
|
|
48
48
|
defaultValue?: object; // 页面模块默认值
|
|
49
49
|
goodNum?: number; // 选择商品数量
|
|
50
|
-
_skuInfo?:
|
|
50
|
+
_skuInfo?: { [v:string]:any }; // sku商品数据
|
|
51
51
|
params?: object; //每个模块的请求参数
|
|
52
52
|
breadList?: []; //面包屑
|
|
53
53
|
};
|
|
@@ -58,7 +58,7 @@ export interface moduleStore {
|
|
|
58
58
|
// hotelParams?: object;
|
|
59
59
|
// extraParams?: object; //每个模块的扩展参数
|
|
60
60
|
// title?: string;
|
|
61
|
-
moduleStore: moduleType
|
|
61
|
+
moduleStore: Partial<moduleType>;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export interface ModuleState extends moduleStore {
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export declare const Inner: ({ children, enabled, root, text }: {
|
|
3
|
-
text?: string;
|
|
4
|
-
root?: boolean;
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const IsShowContainer: ({ moduleShowValue, rootKey, isRevert, children, routerIsShowValue, routerIsShow, moduleIsShow, padding, storeKey, margin }: {
|
|
9
|
-
isRevert?: boolean;
|
|
10
|
-
routerIsShowValue?: string;
|
|
11
|
-
rootKey?: string;
|
|
12
|
-
moduleShowValue?: string;
|
|
13
|
-
moduleIsShow?: string;
|
|
14
|
-
routerIsShow?: string;
|
|
15
|
-
storeKey: string;
|
|
16
|
-
padding: object;
|
|
17
|
-
margin: object;
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
20
|
-
export declare const Container: ({ width, text, children, background, margin, positionValue, padding, backgroundImage, position, $$_actions, $_actions, borderColor, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare const OutContainerComponent: ({ width, api, params, children, background, padding, backgroundImage, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare const OutContainer: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare const ContainerWrap: ({ width, background, children, backgroundImage, height, $$_style, $_style, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const DefaultJsx: ({ text, root }: {
|
|
2
|
-
text?: string;
|
|
3
|
-
root?: boolean;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const DefaultEditorBg: ({ content, color }: {
|
|
6
|
-
content?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const isPercentage: (val: string) => boolean;
|
|
2
|
-
export declare const percentToPx: (value: any, comparativeValue: number) => any;
|
|
3
|
-
export declare const pxToPercent: (value: any, comparativeValue: number) => number;
|
|
4
|
-
export declare const getElementDimensions: (element: HTMLElement) => {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
package/dist/context/index.d.ts
DELETED
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useMemo as n,useEffect as i,createContext as s,useRef as c,useContext as a}from"react";import{Form as d,Button as l,Spin as u,Watermark as h,Typography as g}from"antd";import{useMountedRef as p,dynamicFormFields as b}from"@brushes/form";import{get as m}from"@brushes/request";import{createStyles as f}from"antd-style";export*from"antd-style";import{QjIcon as y}from"@brushes/share-resource";import{useEditor as x,useNode as v}from"@craftjs/core";export*from"@craftjs/core";import{createStore as w,useStore as O}from"zustand";import{persist as j,createJSONStorage as C}from"zustand/middleware";import{useSearchParams as S}from"react-router-dom";import{get as _,isUndefined as P,isEmpty as $}from"lodash";function k(e){e.forEach(e=>{try{const{Component:t,setting:r}=e;t.craft=r,t.craft.displayName=e.name}catch(t){console.error(t,e)}})}const I=process.env.REACT_APP_BASE_URL,M=process.env.REACT_IMG_PATH||"",A=(e="")=>{let t=e;return e?e.startsWith("http")?e:(e.startsWith(M)||e.startsWith(M.slice(1))||(t=M+e),I+t):""};function T(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}"function"==typeof SuppressedError&&SuppressedError;const V=({api:t="/web/ml/muser/sendPhone.json",codeKey:r,height:s=36})=>{const c=d.useFormInstance(),a=c.getFieldValue("verCode"),[u,h]=o(0),[g,b]=o(!1),f=p(),y=n(()=>u>0||!a,[u,a]);i(()=>{const e=setTimeout(function(){0!==u?f.current&&h(e=>e-1):clearTimeout(e)},1e3);return()=>clearTimeout(e)},[u,f]);return e(l,{loading:g,size:"small",type:"link",disabled:y,style:{cursor:"pointer",height:s,width:90},onClick:()=>{b(!0);const{getFieldsValue:e}=c,o=e(),{loginName:n,userPhone:i,userinfoConPhone:s,verCode:a}=o,d=T(o,["loginName","userPhone","userinfoConPhone","verCode"]);let l={userPhone:n||i||s,code:a};r&&(l={userPhone:d[r],code:a}),m(t,l).then(()=>{h(60)}).catch(e=>{}).finally(()=>{b(!1)})},children:0===u?"获取验证码":`倒计时${u}秒`})},E=f(({token:e,css:t},{height:r})=>({wrap:t`
|
|
2
|
-
input[name='verCode'] {
|
|
3
|
-
height: ${r}px;
|
|
4
|
-
}
|
|
5
|
-
`})),N=({api:t="/web/ml/mlogin/getVerCode.img",codeKey:r,height:n=40})=>{const{styles:s}=E({height:n}),c=d.useFormInstance(),a=c.getFieldValue("isDisabled"),[l,h]=o(!1),[g,p]=o("");i(()=>{""===a&&m()},[a]);const m=()=>{h(!0);const{getFieldsValue:e}=c,o=e(),{loginName:n,userPhone:i,userinfoConPhone:s}=o,a=T(o,["loginName","userPhone","userinfoConPhone"]);let d=n||i||s;r&&(d=a[r]),fetch(`${t}?userPhone=${d}`).then(e=>e).then(e=>e.arrayBuffer()).then(e=>{const t="data:image/png;base64,"+window.btoa(String.fromCharCode(...new Uint8Array(e)));p(t)}).catch(e=>{}).finally(()=>{h(!1)})};return e("div",{className:s.wrap,children:b([{name:"verCode",type:"text",label:"",style:{width:"100%"},rules:[{required:!0,message:"请输入"}],extraProps:{autoComplete:"off",placeholder:"请输入",addonAfter:e(u,{spinning:l,children:g?e("img",{src:g,onClick:m,style:{width:90,height:n-2}}):e("div",{style:{width:90,height:n-2}})}),style:{height:n}}}],c)})},R=f(({token:e,css:t})=>({defaultWrap:t`
|
|
6
|
-
border: dashed 1px rgba(0, 0, 0, 0.15);
|
|
7
|
-
width: 100%;
|
|
8
|
-
text-align: center;
|
|
9
|
-
border-radius: ${e.borderRadius}px;
|
|
10
|
-
height: 100%;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
align-items: center;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
color: ${e.colorTextLabel};
|
|
16
|
-
p {
|
|
17
|
-
margin-top: 10px;
|
|
18
|
-
font-size: 12px;
|
|
19
|
-
}
|
|
20
|
-
}`})),z=({text:r="内容放置区域",root:o})=>{const{styles:n}=R();return t("div",{className:n.defaultWrap,style:{minHeight:o?"calc(100vh - 110px)":"auto"},children:[e(y,{style:{fontSize:50,fontWeight:500,display:"block",color:"#bbb"},name:"icon-computer"}),e("p",{children:r})]})},L=({content:t="/",color:r="blue"})=>e(h,{gap:[1,1],font:{color:r},rotate:0,height:10,width:10,content:t,children:e("div",{style:{height:10}})}),W={contractSettlOpno:0,upmMap:{},rebMoney:0,goodsCamount:0,shoppingCountPrice:0,totalDiscountPrice:0,accountsSumPrice:0,discount:0,freight:0,comDisMoney:0,copyComDisMoney:0,shoppingType:"",promotionCode:"",promotionCodes:""},D=s(null);function F(t){var{children:r}=t,o=T(t,["children"]);const n=c();return n.current||(n.current=(e=>{const t={moduleStore:{_ocDiscount:[],_ocPoints:[],_couponList:[],_selectCoupon:[],_shoppingList:[],_contractGoodsList:[],_orderDomainStr:[],_ocContractSettlList:[],_orderAddressInfo:{freight:0,goodsReceiptMem:"",goodsReceiptPhone:"",goodsReceiptArrdess:"",areaCode:""},defaultValue:void 0,_skuInfo:{},params:{},breadList:[],open:!1}};return w()(r=>Object.assign(Object.assign(Object.assign({},t),e),{setModuleStore:e=>r(t=>({moduleStore:Object.assign(t.moduleStore,e)}))}))})(o)),e(D.Provider,{value:n.current,children:r})}function B(e){const t=a(D);if(!t)throw new Error("Missing ModuleContext.Provider in the tree");return O(t,e)}const H=s(null);function K(t){var{children:r}=t,o=T(t,["children"]);const n=c();return n.current||(n.current=(e=>{const t={rootStore:{_userInfo:{},_historyList:[],_themeColor:{colorPrimary:"#1677ff",colorBgTextHover:"#e6r4ff"},_orderCount:{},_cart:0,_webStore:{},_menuChildren:[]}};return w()(j(r=>Object.assign(Object.assign(Object.assign({},t),e),{setModuleRootStore:e=>r(t=>({rootStore:Object.assign(t.rootStore,e)}))}),{name:"root-storage",storage:C(()=>localStorage)}))})(o)),e(H.Provider,{value:n.current,children:r})}function q(e){const t=a(H);if(!t)throw new Error("Missing ModuleContext.Provider in the tree");return O(t,e)}const G=f(({token:e,css:t})=>({category:t`
|
|
21
|
-
&:hover {
|
|
22
|
-
box-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.1);
|
|
23
|
-
}
|
|
24
|
-
`,width_100:t`
|
|
25
|
-
width: 100%;
|
|
26
|
-
`})),U=({children:t,enabled:o,root:n,text:i})=>e(r,{children:t||(o?e(z,{text:i,root:n}):"")}),J=({moduleShowValue:t,rootKey:r="",isRevert:o=!1,children:i,routerIsShowValue:s,routerIsShow:c,moduleIsShow:a="",padding:d,storeKey:l="",margin:u})=>{const h=B(e=>e.moduleStore[l]),g=q(e=>e.rootStore[r]),{enabled:p}=x(e=>({enabled:e.options.enabled})),{connectors:{connect:b,drag:m}}=v();let[f]=S();const y=n(()=>{if(l&&h)return"number"==typeof h[a]?_(h,a)+"":_(h,a)},[h,l,a]),w=n(()=>{if(r&&g)return"number"==typeof g[a]?_(g,a)+"":_(g,a)},[g,r,a]);if(n(()=>{const e=c&&f.has(c)&&!s||c&&f.has(c)&&s&&s.split(",").includes(f.get(c)||"")||l&&!t&&!a&&!P(h)&&!$(h)||a&&l&&!t&&!P(y)&&!$(y)||t&&l&&a&&t.split(",").includes(y+"")||r&&!t&&!a&&!P(g)&&!$(g)||a&&r&&!t&&!P(w)&&!$(w)||t&&r&&a&&t.split(",").includes(w+"");return o?!e:e},[c,s,o,h,l,t,a,y,r,g,w])||p)return e("div",{style:Object.assign(Object.assign({},u),d),ref:e=>b(m(e)),children:e(U,{enabled:p,children:i})})},Q=t=>{var{width:r,text:o,children:i,background:s,margin:c={},positionValue:a={},padding:d={},backgroundImage:l,position:u,$$_actions:h,$_actions:g,borderColor:p}=t,b=T(t,["width","text","children","background","margin","positionValue","padding","backgroundImage","position","$$_actions","$_actions","borderColor"]);const{styles:m}=G(),{enabled:f}=x(e=>({enabled:e.options.enabled})),y=n(()=>"fixed"===u&&0===a.right&&f?Object.assign(Object.assign({},a),{right:412}):"fixed"===u&&0===a.left&&f?Object.assign(Object.assign({},a),{left:172}):a,[a,u]),{connectors:{connect:w,drag:O}}=v();return e("div",{className:f?m.category:"",ref:e=>w(O(e)),style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),{display:"flex",boxSizing:"border-box",position:u,border:`solid 1px ${p}`}),d),b),y),{background:l?`url(${A(l)}) repeat-x center 0`:s,width:(r+"").includes("%")?r:`${r}px`}),children:e(U,{text:o,enabled:f,children:i})})},X=t=>{var{width:r,api:o,params:n,children:i,background:s,padding:c={},backgroundImage:a}=t,d=T(t,["width","api","params","children","background","padding","backgroundImage"]);const{enabled:l}=x(e=>({enabled:e.options.enabled})),{connectors:{connect:u,drag:h}}=v(),{styles:g}=G();return e("div",{ref:e=>u(h(e)),className:l?g.category:"",style:Object.assign(Object.assign(Object.assign({margin:"0 auto",display:"flex",boxSizing:"border-box"},c),d),{background:a?`url(${A(a)}) repeat-x center 0`:s,width:(r+"").includes("%")?r:`${r}px`}),children:e(U,{enabled:l,children:i})})},Y=t=>e(F,{children:e(X,Object.assign({},t))}),Z=t=>{var{width:r,background:o,children:n,backgroundImage:i,height:s,$$_style:c="",$_style:a=""}=t,d=T(t,["width","background","children","backgroundImage","height","$$_style","$_style"]);const{connectors:{connect:l,drag:u}}=v(),{enabled:h}=x(e=>({enabled:e.options.enabled}));return e("div",Object.assign({},d,{ref:e=>l(u(e)),style:{width:r,paddingBottom:5,background:i?`url(${A(i)}) repeat-x center 0`:o,minHeight:`calc(${s}vh - 110px)`},children:e(U,{root:!0,enabled:h,children:n})}))},ee=({children:t="当前为插槽容器,可以自定义组件代码。",borderColor:r="rgba(0, 0, 0, 0.1)"})=>e("div",{style:{height:"100%",width:"100%",borderColor:r,borderWidth:1,borderStyle:"dashed",fontSize:12,textAlign:"center",fontWeight:"normal",background:"rgba(255,255,255, 0.2)"},children:e(g.Text,{type:"secondary",children:t})}),te=s({});function re({value:t,children:r}){return e(te.Provider,{value:Object.assign({},t),children:r})}function oe(){return a(te)}export{re as ApplicationContext,V as CodeComponent,Q as Container,Z as ContainerWrap,L as DefaultEditorBg,z as DefaultJsx,N as ImageCodeComponent,U as Inner,J as IsShowContainer,F as ModuleProvider,K as ModuleRootProvider,Y as OutContainer,X as OutContainerComponent,ee as SlotEmpty,k as combine,A as fullpath,W as initialValueOrder,oe as useApplicationContext,B as useModuleContext,q as useModuleRootContext};
|
package/dist/setting/basic.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { FieldType } from '@brushes/form';
|
|
2
|
-
export type formConfigType = {
|
|
3
|
-
title?: string;
|
|
4
|
-
formFields: FieldType[];
|
|
5
|
-
};
|
|
6
|
-
export type LayoutType = 'horizontal' | 'vertical' | 'inline';
|
|
7
|
-
export declare const basicSettings: (formFields: formConfigType[], layout?: LayoutType) => () => import("react/jsx-runtime").JSX.Element;
|
package/dist/setting/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './basic';
|
package/dist/setting/title.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ModuleState, moduleStore } from './commonStore';
|
|
2
|
-
type ModuleProviderProps = React.PropsWithChildren<Partial<moduleStore>>;
|
|
3
|
-
export { initialValueOrder } from './commonStore';
|
|
4
|
-
export declare function ModuleProvider({ children, ...props }: ModuleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare function useModuleContext<T>(selector: (state: ModuleState) => T): T;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export declare const goodListIntialValue: {
|
|
2
|
-
dataPic: string;
|
|
3
|
-
goodsName: string;
|
|
4
|
-
goodsCamount: number;
|
|
5
|
-
skuName: string;
|
|
6
|
-
pricesetNprice: number;
|
|
7
|
-
};
|
|
8
|
-
export declare const initialValueOrder: {
|
|
9
|
-
contractSettlOpno: number;
|
|
10
|
-
upmMap: {};
|
|
11
|
-
rebMoney: number;
|
|
12
|
-
goodsCamount: number;
|
|
13
|
-
shoppingCountPrice: number;
|
|
14
|
-
totalDiscountPrice: number;
|
|
15
|
-
accountsSumPrice: number;
|
|
16
|
-
discount: number;
|
|
17
|
-
freight: number;
|
|
18
|
-
comDisMoney: number;
|
|
19
|
-
copyComDisMoney: number;
|
|
20
|
-
shoppingType: string;
|
|
21
|
-
promotionCode: string;
|
|
22
|
-
promotionCodes: string;
|
|
23
|
-
};
|
|
24
|
-
export type addressInfo = {
|
|
25
|
-
freight: number;
|
|
26
|
-
goodsReceiptMem: string;
|
|
27
|
-
goodsReceiptPhone: string;
|
|
28
|
-
goodsReceiptArrdess: string;
|
|
29
|
-
areaCode: string;
|
|
30
|
-
};
|
|
31
|
-
export type moduleType = {
|
|
32
|
-
[v: string]: any;
|
|
33
|
-
_ocPoints: Array<any>;
|
|
34
|
-
_ocDiscount: Array<any>;
|
|
35
|
-
_orderAddressInfo: addressInfo;
|
|
36
|
-
_couponList: [];
|
|
37
|
-
_selectCoupon: [];
|
|
38
|
-
_shoppingList: Array<any>;
|
|
39
|
-
_contractGoodsList: Array<typeof goodListIntialValue>;
|
|
40
|
-
_orderDomainStr: Array<typeof initialValueOrder>;
|
|
41
|
-
_ocContractSettlList: Array<any>;
|
|
42
|
-
open?: boolean;
|
|
43
|
-
defaultValue?: object;
|
|
44
|
-
goodNum?: number;
|
|
45
|
-
_skuInfo?: object;
|
|
46
|
-
params?: object;
|
|
47
|
-
breadList?: [];
|
|
48
|
-
};
|
|
49
|
-
export interface moduleStore {
|
|
50
|
-
moduleStore: moduleType;
|
|
51
|
-
}
|
|
52
|
-
export interface ModuleState extends moduleStore {
|
|
53
|
-
setModuleStore: (e: Partial<moduleType>) => void;
|
|
54
|
-
}
|
|
55
|
-
export type ModuleStore = ReturnType<typeof createModuleStore>;
|
|
56
|
-
export declare const createModuleStore: (initProps?: Partial<moduleStore>) => import("zustand").StoreApi<ModuleState>;
|
package/dist/store/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ModuleRootState, moduleRootStore } from './rootStore';
|
|
2
|
-
type ModuleProviderProps = React.PropsWithChildren<Partial<moduleRootStore>>;
|
|
3
|
-
export declare function ModuleRootProvider({ children, ...props }: ModuleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function useModuleRootContext<T>(selector: (state: ModuleRootState) => T): T;
|
|
5
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type moduleType = {
|
|
2
|
-
[v: string]: any;
|
|
3
|
-
_historyList: Array<any>;
|
|
4
|
-
_themeColor: {
|
|
5
|
-
colorPrimary: string;
|
|
6
|
-
colorBgTextHover: string;
|
|
7
|
-
};
|
|
8
|
-
_orderCount: {
|
|
9
|
-
[v: string]: string | number;
|
|
10
|
-
};
|
|
11
|
-
_userInfo: {
|
|
12
|
-
[v: string]: any;
|
|
13
|
-
};
|
|
14
|
-
_cart: number;
|
|
15
|
-
};
|
|
16
|
-
export interface moduleRootStore {
|
|
17
|
-
rootStore: moduleType;
|
|
18
|
-
}
|
|
19
|
-
export interface ModuleRootState extends moduleRootStore {
|
|
20
|
-
setModuleRootStore: (e: Partial<moduleType>) => void;
|
|
21
|
-
}
|
|
22
|
-
export type ModuleRootStore = ReturnType<typeof createRootModuleStore>;
|
|
23
|
-
export declare const createRootModuleStore: (initProps?: Partial<moduleRootStore>) => Omit<import("zustand").StoreApi<ModuleRootState>, "setState" | "persist"> & {
|
|
24
|
-
setState(partial: ModuleRootState | Partial<ModuleRootState> | ((state: ModuleRootState) => ModuleRootState | Partial<ModuleRootState>), replace?: false | undefined): unknown;
|
|
25
|
-
setState(state: ModuleRootState | ((state: ModuleRootState) => ModuleRootState), replace: true): unknown;
|
|
26
|
-
persist: {
|
|
27
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<ModuleRootState, unknown, unknown>>) => void;
|
|
28
|
-
clearStorage: () => void;
|
|
29
|
-
rehydrate: () => Promise<void> | void;
|
|
30
|
-
hasHydrated: () => boolean;
|
|
31
|
-
onHydrate: (fn: (state: ModuleRootState) => void) => () => void;
|
|
32
|
-
onFinishHydration: (fn: (state: ModuleRootState) => void) => () => void;
|
|
33
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<ModuleRootState, unknown, unknown>>;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
File without changes
|
package/dist/tool/combine.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function combine(array: Array<any>): void;
|
package/dist/tool/fullpath.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const fullpath: (str?: string) => string;
|
package/dist/tool/index.d.ts
DELETED