@tarojs/components-react 4.1.7-beta.1 → 4.1.7-beta.2
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/original/components/button/index.js +87 -0
- package/dist/original/components/button/index.js.map +1 -0
- package/dist/original/components/button/style/index.css +3 -0
- package/dist/original/components/button/style/index.css.map +1 -0
- package/dist/original/components/icon/index.js +36 -0
- package/dist/original/components/icon/index.js.map +1 -0
- package/dist/original/components/icon/style/index.css +3 -0
- package/dist/original/components/icon/style/index.css.map +1 -0
- package/dist/original/components/image/index.js +146 -0
- package/dist/original/components/image/index.js.map +1 -0
- package/dist/original/components/image/style/index.css +3 -0
- package/dist/original/components/image/style/index.css.map +1 -0
- package/dist/original/components/input/index.js +233 -0
- package/dist/original/components/input/index.js.map +1 -0
- package/dist/original/components/input/style/index.css +3 -0
- package/dist/original/components/input/style/index.css.map +1 -0
- package/dist/original/components/picker/index.js +788 -0
- package/dist/original/components/picker/index.js.map +1 -0
- package/dist/original/components/picker/picker-group.js +491 -0
- package/dist/original/components/picker/picker-group.js.map +1 -0
- package/dist/{components/picker/react-style/style.css → original/components/picker/style/index.css} +2 -1
- package/dist/original/components/picker/style/index.css.map +1 -0
- package/dist/original/components/pull-down-refresh/index.js +320 -0
- package/dist/original/components/pull-down-refresh/index.js.map +1 -0
- package/dist/original/components/pull-down-refresh/style/index.css +3 -0
- package/dist/original/components/pull-down-refresh/style/index.css.map +1 -0
- package/dist/original/components/refresher/index.js +7 -0
- package/dist/original/components/refresher/index.js.map +1 -0
- package/dist/original/components/scroll-view/index.js +189 -0
- package/dist/original/components/scroll-view/index.js.map +1 -0
- package/dist/original/components/scroll-view/style/index.css +3 -0
- package/dist/original/components/scroll-view/style/index.css.map +1 -0
- package/dist/original/components/swiper/index.js +461 -0
- package/dist/original/components/swiper/index.js.map +1 -0
- package/dist/original/components/swiper/style/index.css +3 -0
- package/dist/original/components/swiper/style/index.css.map +1 -0
- package/dist/original/components/text/index.js +28 -0
- package/dist/original/components/text/index.js.map +1 -0
- package/dist/original/components/text/style/index.css +3 -0
- package/dist/original/components/text/style/index.css.map +1 -0
- package/dist/original/components/view/index.js +80 -0
- package/dist/original/components/view/index.js.map +1 -0
- package/dist/original/index.css +2 -0
- package/dist/original/index.css.map +1 -0
- package/dist/original/index.js +15 -0
- package/dist/original/index.js.map +1 -0
- package/dist/original/utils/hooks.react.js +15 -0
- package/dist/original/utils/hooks.react.js.map +1 -0
- package/dist/original/utils/index.js +162 -0
- package/dist/original/utils/index.js.map +1 -0
- package/package.json +8 -6
- package/dist/components/picker/react-style/style.css.map +0 -1
- package/dist/components/picker/react-style/style.js +0 -4
- package/dist/components/picker/react-style/style.js.map +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import './style/index.css';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { omit, createForwardRefComponent } from '../../utils/index.js';
|
|
5
|
+
import { useRef, useState, useEffect } from '../../utils/hooks.react.js';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function Button(props) {
|
|
9
|
+
const startTimer = useRef();
|
|
10
|
+
const endTimer = useRef();
|
|
11
|
+
const [state, setState] = useState({
|
|
12
|
+
hover: false,
|
|
13
|
+
touch: false
|
|
14
|
+
});
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
return () => {
|
|
17
|
+
startTimer.current && clearTimeout(startTimer.current);
|
|
18
|
+
endTimer.current && clearTimeout(endTimer.current);
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
const _onTouchStart = e => {
|
|
22
|
+
setState(e => Object.assign(Object.assign({}, e), {
|
|
23
|
+
touch: true
|
|
24
|
+
}));
|
|
25
|
+
if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {
|
|
26
|
+
startTimer.current = setTimeout(() => {
|
|
27
|
+
if (state.touch) {
|
|
28
|
+
setState(e => Object.assign(Object.assign({}, e), {
|
|
29
|
+
hover: true
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
}, props.hoverStartTime || 20);
|
|
33
|
+
}
|
|
34
|
+
props.onTouchStart && props.onTouchStart(e);
|
|
35
|
+
};
|
|
36
|
+
const _onTouchEnd = e => {
|
|
37
|
+
setState(e => Object.assign(Object.assign({}, e), {
|
|
38
|
+
touch: false
|
|
39
|
+
}));
|
|
40
|
+
if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {
|
|
41
|
+
endTimer.current = setTimeout(() => {
|
|
42
|
+
if (!state.touch) {
|
|
43
|
+
setState(e => Object.assign(Object.assign({}, e), {
|
|
44
|
+
hover: false
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
}, props.hoverStayTime || 70);
|
|
48
|
+
}
|
|
49
|
+
props.onTouchEnd && props.onTouchEnd(e);
|
|
50
|
+
};
|
|
51
|
+
const {
|
|
52
|
+
forwardedRef,
|
|
53
|
+
plain = false,
|
|
54
|
+
children,
|
|
55
|
+
disabled = false,
|
|
56
|
+
className,
|
|
57
|
+
style,
|
|
58
|
+
onClick,
|
|
59
|
+
hoverClass = 'button-hover',
|
|
60
|
+
loading = false,
|
|
61
|
+
type
|
|
62
|
+
} = props,
|
|
63
|
+
restProps = __rest(props, ["forwardedRef", "plain", "children", "disabled", "className", "style", "onClick", "hoverClass", "loading", "type"]);
|
|
64
|
+
const cls = classNames(className, 'taro-button-core', {
|
|
65
|
+
[`${hoverClass}`]: state.hover && !disabled
|
|
66
|
+
});
|
|
67
|
+
return /*#__PURE__*/jsxs("button", {
|
|
68
|
+
...omit(restProps, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading', 'forwardedRef']),
|
|
69
|
+
type: type,
|
|
70
|
+
ref: forwardedRef,
|
|
71
|
+
className: cls,
|
|
72
|
+
style: style,
|
|
73
|
+
onClick: onClick,
|
|
74
|
+
disabled: disabled,
|
|
75
|
+
onTouchStart: _onTouchStart,
|
|
76
|
+
onTouchEnd: _onTouchEnd,
|
|
77
|
+
loading: loading.toString(),
|
|
78
|
+
plain: plain.toString(),
|
|
79
|
+
children: [!!loading && /*#__PURE__*/jsx("i", {
|
|
80
|
+
className: "weui-loading"
|
|
81
|
+
}), children]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
var index = createForwardRefComponent(Button);
|
|
85
|
+
|
|
86
|
+
export { index as default };
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/button/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\nimport { useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type React from 'react'\n\ninterface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n size?: string\n plain?: boolean\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n disabled?: boolean\n loading?: boolean\n type?: string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLButtonElement>\n}\n\ninterface IState {\n hover:boolean\n touch: boolean\n}\n\nfunction Button (props: IProps) {\n const startTimer = useRef<ReturnType<typeof setTimeout>>()\n const endTimer = useRef<ReturnType<typeof setTimeout>>()\n const [state, setState] = useState<IState>({\n hover: false,\n touch: false\n })\n\n useEffect(() => {\n return () => {\n startTimer.current && clearTimeout(startTimer.current)\n endTimer.current && clearTimeout(endTimer.current)\n }\n }, [])\n\n const _onTouchStart = (e: React.TouchEvent<HTMLButtonElement>) => {\n setState((e) => ({\n ...e,\n touch: true\n }))\n if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {\n startTimer.current = setTimeout(() => {\n if ((state as IState).touch) {\n setState((e) => ({\n ...e,\n hover: true\n }))\n }\n }, props.hoverStartTime || 20)\n }\n props.onTouchStart && props.onTouchStart(e)\n }\n\n const _onTouchEnd = (e: React.TouchEvent<HTMLButtonElement>) => {\n setState((e) => ({\n ...e,\n touch: false\n }))\n if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {\n endTimer.current = setTimeout(() => {\n if (!(state as IState).touch) {\n setState((e) => ({\n ...e,\n hover: false\n }))\n }\n }, props.hoverStayTime || 70)\n }\n props.onTouchEnd && props.onTouchEnd(e)\n }\n\n const { forwardedRef, plain = false, children, disabled = false, className, style, onClick, hoverClass = 'button-hover', loading = false, type, ...restProps } = props\n\n const cls = classNames(\n className,\n 'taro-button-core',\n {\n [`${hoverClass}`]: (state as IState).hover && !disabled\n }\n )\n\n return (\n <button\n {...omit(restProps, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading', 'forwardedRef'])}\n type={type}\n ref={forwardedRef}\n className={cls}\n style={style}\n onClick={onClick}\n disabled={disabled}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n loading={loading.toString()}\n plain={plain.toString()}\n >\n {!!loading && <i className='weui-loading' />}\n {children}\n </button>\n )\n}\n\nexport default createForwardRefComponent(Button)\n"],"names":["Button","props","startTimer","useRef","endTimer","state","setState","useState","hover","touch","useEffect","current","clearTimeout","_onTouchStart","e","Object","assign","hoverClass","disabled","setTimeout","hoverStartTime","onTouchStart","_onTouchEnd","hoverStayTime","onTouchEnd","forwardedRef","plain","children","className","style","onClick","loading","type","restProps","__rest","cls","classNames","_jsxs","omit","ref","toString","_jsx","createForwardRefComponent"],"mappings":";;;;;;;AA2BA,SAASA,MAAMA,CAAEC,KAAa,EAAA;AAC5B,EAAA,MAAMC,UAAU,GAAGC,MAAM,EAAiC;AAC1D,EAAA,MAAMC,QAAQ,GAAGD,MAAM,EAAiC;AACxD,EAAA,MAAM,CAACE,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAS;AACzCC,IAAAA,KAAK,EAAE,KAAK;AACZC,IAAAA,KAAK,EAAE;AACR,GAAA,CAAC;AAEFC,EAAAA,SAAS,CAAC,MAAK;AACb,IAAA,OAAO,MAAK;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,IAAAA,IAAI,EAAEA,IAAK;AACXO,IAAAA,GAAG,EAAEd,YAAa;AAClBG,IAAAA,SAAS,EAAEO,GAAI;AACfN,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,OAAO,EAAEA,OAAQ;AACjBZ,IAAAA,QAAQ,EAAEA,QAAS;AACnBG,IAAAA,YAAY,EAAER,aAAc;AAC5BW,IAAAA,UAAU,EAAEF,WAAY;AACxBS,IAAAA,OAAO,EAAEA,OAAO,CAACS,QAAQ,EAAG;AAC5Bd,IAAAA,KAAK,EAAEA,KAAK,CAACc,QAAQ,EAAG;AAAAb,IAAAA,QAAA,EAEvB,CAAA,CAAC,CAACI,OAAO,iBAAIU,GAAA,CAAA,GAAA,EAAA;AAAGb,MAAAA,SAAS,EAAC;KAAc,CAAG,EAC3CD,QAAQ;AAAA,GACH,CAAC;AAEb;AAEA,YAAee,yBAAyB,CAAC1C,MAAM,CAAC;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
@-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default],.taro-button-core[plain=true][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain=true][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain=true][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain=true][type=primary]:after{border-width:0}.taro-button-core[plain=true][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain=true][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain=true][type=warn]:after{border-width:0}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain=true]:not([disabled]):active,.taro-button-core[plain=true][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain=true]:after,.taro-button-core[plain=true][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain=true][disabled],.taro-button-core[plain=true][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
3
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/button/style/weui-btn_loading.scss","../../../../../../../src/components/button/style/index.scss"],"names":[],"mappings":"AAAA,+BACE,GACE,sBCCF,CDEA,GACE,uBCAF,CACF,CDGA,uBACE,GACE,sBCDF,CDIA,GACE,uBCFF,CACF,CDME,yCAME,2CAAA,CACA,whDAAA,CACA,oBAAA,CAJA,oBAAA,CADA,WAAA,CAEA,qBAAA,CAHA,UCCJ,CDOI,iHAEE,wBCNN,CDQI,0DAEE,wBCPN,CDUI,uDACE,wBCRN,CAiBA,kBAoBE,yCAAA,CARA,eAAA,CAEA,wBA9CiB,CA0CjB,iBArDoB,CAoDpB,cAAA,CALA,qBAAA,CAeA,UAtDwB,CAoCxB,aAAA,CAiBA,cAjEgB,CA8DhB,sBAAA,CAVA,gBAAA,CACA,iBAAA,CAOA,SAAA,CAXA,eAAA,CAKA,iBAAA,CACA,kBAAA,CALA,iBAAA,CAcA,iBAAA,CADA,oBAAA,CALA,UALF,CAgBE,wBACE,SAdJ,CAiBE,yCACE,wBA1DqB,CA2DrB,oBAfJ,CAkBE,wBAKE,+BAAA,CACA,kBAAA,CAFA,qBAAA,CAKA,WAAA,CADA,WAAA,CANA,MAAA,CADA,iBAAA,CAEA,KAAA,CAOA,mBAAA,CACA,oBAAA,CAJA,UAZJ,CAmBE,oCACE,eAjBJ,CAoBE,gCACE,wBAlFe,CAmFf,UAlBJ,CAoBI,wDACE,UAlBN,CAqBI,uDACE,wBAzFmB,CA0FnB,oBAnBN,CAuBE,6BACE,oBAAA,CAIA,cA3GkB,CA0GlB,eAzGgB,CAuGhB,gBAAA,CACA,UAnBJ,CAwBE,sHAIE,4BAAA,CADA,gBAvBJ,CA2BE,4BACE,wBAzBJ,CA2BI,0CACE,wBAhHqB,CAiHrB,oBAzBN,CA4BI,0CACE,wBA1BN,CA6BI,uCACE,wBA3BN,CAgCI,yCACE,sBA9BN,CAiCI,+EAEE,wBAhCN,CAmCI,yCACE,wBAjCN,CAoCI,sCACE,wBAlCN,CAsCE,4CACE,wBAAA,CACA,aApCJ,CAsCI,mEAEE,4BAAA,CADA,+BArIiC,CAuIjC,wBApCN,CAuCI,kDACE,cArCN,CAyCE,yCACE,wBAAA,CACA,aAvCJ,CAyCI,gEAEE,4BAAA,CADA,+BAxI8B,CA0I9B,wBAvCN,CA0CI,+CACE,cAxCN,CA4CE,0EAEE,wBAAA,CACA,aA3CJ,CA6CI,wHAEE,4BAAA,CADA,8BA9JiC,CAgKjC,uBA3CN,CA8CI,sFACE,cA5CN,CAgDE,gCACE,wBA5Le,CA6Lf,UA9CJ,CAgDI,wDACE,UA9CN,CAiDI,uDACE,wBAnMmB,CAoMnB,wBA/CN,CAmDE,6BACE,wBArMY,CAsMZ,UAjDJ,CAmDI,qDACE,UAjDN,CAoDI,oDACE,wBA5MgB,CA6MhB,wBAlDN,CA4DE,8FAEE,wBAAA,CADA,+BAAA,CAEA,oBArDJ","file":"index.css","sourcesContent":["@-webkit-keyframes weuiLoading {\r\n 0% {\r\n transform: rotate3d(0, 0, 1, 0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate3d(0, 0, 1, 360deg);\r\n }\r\n}\r\n\r\n@keyframes weuiLoading {\r\n 0% {\r\n transform: rotate3d(0, 0, 1, 0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate3d(0, 0, 1, 360deg);\r\n }\r\n}\r\n\r\n.taro-button-core[loading] {\r\n >.weui-loading {\r\n // font-size: 16px;\r\n width: 20px; // 1em;\r\n height: 20px; // 1em;\r\n display: inline-block;\r\n vertical-align: middle;\r\n animation: weuiLoading 1s steps(12, end) infinite;\r\n background: transparent url(\"data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E\") no-repeat;\r\n background-size: 100%;\r\n\r\n &.weui-btn_primary,\r\n &.weui-btn_warn {\r\n color: $weuiBtnActiveFontColor;\r\n }\r\n &.weui-btn_primary {\r\n // color: var(--weui-WHITE);\r\n background-color: $weuiBtnPrimaryActiveBg;\r\n }\r\n \r\n &.weui-btn_warn {\r\n background-color: $weuiBtnWarnActiveBg;\r\n }\r\n }\r\n \r\n}","@import 'variable';\n@import 'weui-btn_loading.scss';\n$weuiBtnHeight: 46px;\n$weuiBtnFontSize: 18px;\n$weuiBtnFontColor: #fff;\n$weuiBtnActiveFontColor: rgb(255 255 255 / 60%);\n$weuiBtnDisabledFontColor: rgb(255 255 255 / 60%);\n$weuiBtnBorderRadius: 5px;\n$weuiBtnDefaultGap: 15px;\n\n// Button Mini\n$weuiBtnMiniFontSize: 13px;\n$weuiBtnMiniHeight: 2.3;\n\n// Button Default\n$weuiBtnDefaultFontColor: #000;\n$weuiBtnDefaultActiveFontColor: rgb(0 0 0 / 60%);\n$weuiBtnDefaultDisabledFontColor: rgb(0 0 0 / 30%);\n$weuiBtnDefaultBg: #f8f8f8;\n$weuiBtnDefaultActiveBg: #dedede;\n$weuiBtnDefaultDisabledBg: #f7f7f7;\n\n// Button Primary\n$weuiBtnPrimaryBg: #1aad19;\n$weuiBtnPrimaryActiveBg: #179b16;\n$weuiBtnPrimaryDisabledBg: #9ed99d;\n\n// Button Warn\n$weuiBtnWarnBg: #e64340;\n$weuiBtnWarnActiveBg: #ce3c39;\n$weuiBtnWarnDisabledBg: #ec8b89;\n\n// Button Plain Primary\n$weuiBtnPlainPrimaryColor: rgb(26 173 25 / 100%);\n$weuiBtnPlainPrimaryBorderColor: rgb(26 173 25 / 100%);\n$weuiBtnPlainPrimaryActiveColor: rgb(26 173 25 / 60%);\n$weuiBtnPlainPrimaryActiveBorderColor: rgb(26 173 25 / 60%);\n\n// Button Plain Default\n$weuiBtnPlainDefaultColor: rgb(53 53 53 / 100%);\n$weuiBtnPlainDefaultBorderColor: rgb(53 53 53 / 100%);\n$weuiBtnPlainDefaultActiveColor: rgb(53 53 53 / 60%);\n$weuiBtnPlainDefaultActiveBorderColor: rgb(53 53 53 / 60%);\n\n// Button Plain Warn\n$weuiBtnPlainWarnColor: #e64340;\n$weuiBtnPlainWarnBorderColor: #e64340;\n$weuiBtnPlainWarnActiveColor: rgba(230 67 64 / 60%);\n$weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);\n\n.taro-button-core {\n display: block;\n overflow: hidden;\n position: relative;\n box-sizing: border-box;\n margin-left: auto;\n margin-right: auto;\n padding-left: 14px;\n padding-right: 14px;\n border-width: 0;\n border-radius: $weuiBtnBorderRadius;\n width: 100%;\n appearance: none;\n outline: 0;\n background-color: $weuiBtnDefaultBg;\n line-height: 2.55555556;\n text-decoration: none;\n text-align: center;\n font-size: $weuiBtnFontSize;\n color: $weuiBtnDefaultFontColor;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n\n &:focus {\n outline: 0;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnDefaultActiveBg;\n color: $weuiBtnDefaultActiveFontColor;\n }\n\n &::after {\n position: absolute;\n left: 0;\n top: 0;\n box-sizing: border-box;\n border: 1px solid rgb(0 0 0 / 20%);\n border-radius: $weuiBtnBorderRadius * 2;\n width: 200%;\n height: 200%;\n content: ' ';\n transform: scale(0.5);\n transform-origin: 0 0;\n }\n\n & + & {\n margin-top: $weuiBtnDefaultGap;\n }\n\n &[type=\"default\"] {\n background-color: $weuiBtnDefaultBg;\n color: $weuiBtnDefaultFontColor;\n\n &:not([disabled]):visited {\n color: $weuiBtnDefaultFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnDefaultActiveBg;\n color: $weuiBtnDefaultActiveFontColor;\n }\n }\n\n &[size=\"mini\"] {\n display: inline-block;\n padding: 0 1.32em;\n width: auto;\n line-height: $weuiBtnMiniHeight;\n font-size: $weuiBtnMiniFontSize;\n }\n\n &[plain=\"true\"],\n &[plain=\"true\"][type=\"default\"],\n &[plain=\"true\"][type=\"primary\"] {\n border-width: 1px;\n background-color: transparent;\n }\n\n &[disabled] {\n color: $weuiBtnDisabledFontColor;\n\n &[type=\"default\"] {\n background-color: $weuiBtnDefaultDisabledBg;\n color: $weuiBtnDefaultDisabledFontColor;\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryDisabledBg;\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnDisabledBg;\n }\n }\n\n &[loading] {\n .weui-loading {\n margin: -0.2em 0.34em 0 0;\n }\n\n &[type=\"primary\"],\n &[type=\"warn\"] {\n color: $weuiBtnActiveFontColor;\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryActiveBg;\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnActiveBg;\n }\n }\n\n &[plain=\"true\"][type=\"primary\"] {\n border: 1px solid $weuiBtnPlainPrimaryBorderColor;\n color: $weuiBtnPlainPrimaryColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainPrimaryActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainPrimaryActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[plain=\"true\"][type=\"warn\"] {\n border: 1px solid $weuiBtnPlainWarnBorderColor;\n color: $weuiBtnPlainWarnColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainWarnActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainWarnActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[plain=\"true\"],\n &[plain=\"true\"][type=\"default\"] {\n border: 1px solid $weuiBtnPlainDefaultBorderColor;\n color: $weuiBtnPlainDefaultColor;\n\n &:not([disabled]):active {\n border-color: $weuiBtnPlainDefaultActiveBorderColor;\n background-color: transparent;\n color: $weuiBtnPlainDefaultActiveColor;\n }\n\n &::after {\n border-width: 0;\n }\n }\n\n &[type=\"primary\"] {\n background-color: $weuiBtnPrimaryBg;\n color: #fff;\n\n &:not([disabled]):visited {\n color: $weuiBtnFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnPrimaryActiveBg;\n color: $weuiBtnActiveFontColor;\n }\n }\n\n &[type=\"warn\"] {\n background-color: $weuiBtnWarnBg;\n color: #fff;\n\n &:not([disabled]):visited {\n color: $weuiBtnFontColor;\n }\n\n &:not([disabled]):active {\n background-color: $weuiBtnWarnActiveBg;\n color: $weuiBtnActiveFontColor;\n }\n }\n\n &[plain=\"true\"][disabled] {\n border: 1px solid rgb(0 0 0 / 20%);\n background-color: #f7f7f7;\n color: rgb(0 0 0 / 30%);\n }\n\n &[plain=\"true\"][disabled][type=\"primary\"] {\n border: 1px solid rgb(0 0 0 / 20%);\n background-color: #f7f7f7;\n color: rgb(0 0 0 / 30%);\n }\n}\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './style/index.css';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { omit, createForwardRefComponent } from '../../utils/index.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const Icon = props => {
|
|
7
|
+
let {
|
|
8
|
+
type,
|
|
9
|
+
className = '',
|
|
10
|
+
size = '23',
|
|
11
|
+
color,
|
|
12
|
+
forwardedRef
|
|
13
|
+
} = props;
|
|
14
|
+
if (type) type = type.replace(/_/g, '-');
|
|
15
|
+
const cls = classNames({
|
|
16
|
+
[`weui-icon-${type}`]: true
|
|
17
|
+
}, className);
|
|
18
|
+
const style = {
|
|
19
|
+
'font-size': size + 'px',
|
|
20
|
+
color: color
|
|
21
|
+
};
|
|
22
|
+
return (
|
|
23
|
+
/*#__PURE__*/
|
|
24
|
+
// eslint-disable-next-line react/react-in-jsx-scope
|
|
25
|
+
jsx("i", {
|
|
26
|
+
ref: forwardedRef,
|
|
27
|
+
...omit(props, ['type', 'className', 'forwardedRef']),
|
|
28
|
+
className: cls,
|
|
29
|
+
style: style
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
var index = createForwardRefComponent(Icon);
|
|
34
|
+
|
|
35
|
+
export { index as default };
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/icon/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\ninterface IProps {\n type: string\n color: string\n size?: number | string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLLIElement>\n}\n\nconst Icon = (props: IProps) => {\n let { type, className = '', size = '23', color, forwardedRef } = props\n if (type) type = type.replace(/_/g, '-')\n const cls = classNames(\n {\n [`weui-icon-${type}`]: true\n },\n className\n )\n const style = { 'font-size': size + 'px', color: color }\n\n return (\n // eslint-disable-next-line react/react-in-jsx-scope\n <i ref={forwardedRef} {...omit(props, ['type', 'className', 'forwardedRef'])} className={cls} style={style} />\n )\n}\nexport default createForwardRefComponent(Icon)\n"],"names":["Icon","props","type","className","size","color","forwardedRef","replace","cls","classNames","style","_jsx","ref","omit","createForwardRefComponent"],"mappings":";;;;;AAcA,MAAMA,IAAI,GAAIC,KAAa,IAAI;EAC7B,IAAI;IAAEC,IAAI;AAAEC,IAAAA,SAAS,GAAG,EAAE;AAAEC,IAAAA,IAAI,GAAG,IAAI;IAAEC,KAAK;AAAEC,IAAAA;AAAc,GAAA,GAAGL,KAAK;EACtE,IAAIC,IAAI,EAAEA,IAAI,GAAGA,IAAI,CAACK,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EACxC,MAAMC,GAAG,GAAGC,UAAU,CACpB;IACE,CAAC,CAAA,UAAA,EAAaP,IAAI,CAAA,CAAE,GAAG;GACxB,EACDC,SAAS,CACV;AACD,EAAA,MAAMO,KAAK,GAAG;IAAE,WAAW,EAAEN,IAAI,GAAG,IAAI;AAAEC,IAAAA,KAAK,EAAEA;GAAO;AAExD,EAAA;AAAA;AACE;IACAM,GAAA,CAAA,GAAA,EAAA;AAAGC,MAAAA,GAAG,EAAEN,YAAa;MAAA,GAAKO,IAAI,CAACZ,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AAAEE,MAAAA,SAAS,EAAEK,GAAI;AAACE,MAAAA,KAAK,EAAEA;KAAM;AAAG;AAElH,CAAC;AACD,YAAeI,yBAAyB,CAACd,IAAI,CAAC;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
3
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/icon/style/index.scss"],"names":[],"mappings":"AAAA,yBAA2B,eAG3B,CAFA,2BAA6B,eAK7B,CAJA,uBAAyB,eAOzB,CANA,+BAAiC,eASjC,CARA,4BAA8B,eAW9B,CAVA,0BAA4B,eAa5B,CAZA,iCAAmC,eAenC,CAdA,oCAAsC,eAiBtC,CAhBA,0BAA4B,eAmB5B,CAlBA,iCAAmC,eAqBnC,CApBA,uBAAyB,eAuBzB,CAtBA,8BAAgC,eAyBhC,CAxBA,yBAA2B,eA2B3B,CA1BA,yBAA2B,eA6B3B,CA5BA,wBAA0B,eA+B1B,CA9BA,uBAAyB,eAiCzB,CAhCA,yBAA2B,eAmC3B,CAjCA,mBAEE,aAAA,CADA,cAoCF,CAhCA,mBAEE,aAAA,CADA,cAoCF,CAhCA,gBAEE,aAAA,CADA,cAoCF,CAhCA,gBAEE,aAAA,CADA,cAoCF,CA3BA,uDAHE,aAAA,CADA,cAyCF,CAhCA,0BAEE,aAAA,CADA,cAoCF,CAhCA,kBAEE,aAAA,CADA,cAoCF,CA3BA,2CAHE,aAAA,CADA,cAyCF,CAhCA,wBACE,aAmCF,CAhCA,qBACE,aAmCF,CAhCA,kBACE,aAAA,CACA,cAmCF,CA3BA,mCACE,aAAA,CACA,cAmCF,CA/BE,2CACE,UAAA,CACA,cAkCJ,CA9BA,eACE,cAiCF,CA/BE,8BACE,aAiCJ,CA7BA,uBACE,cAgCF,CA9BE,sCACE,aAgCJ","file":"index.css","sourcesContent":[".weui-icon-circle:before { content: '\\EA01' } /* '' */\n.weui-icon-download:before { content: '\\EA02' } /* '' */\n.weui-icon-info:before { content: '\\EA03' } /* '' */\n.weui-icon-safe-success:before { content: '\\EA04' } /* '' */\n.weui-icon-safe-warn:before { content: '\\EA05' } /* '' */\n.weui-icon-success:before { content: '\\EA06' } /* '' */\n.weui-icon-success-circle:before { content: '\\EA07' } /* '' */\n.weui-icon-success-no-circle:before { content: '\\EA08' } /* '' */\n.weui-icon-waiting:before { content: '\\EA09' } /* '' */\n.weui-icon-waiting-circle:before { content: '\\EA0A' } /* '' */\n.weui-icon-warn:before { content: '\\EA0B' } /* '' */\n.weui-icon-info-circle:before { content: '\\EA0C' } /* '' */\n.weui-icon-cancel:before { content: '\\EA0D' } /* '' */\n.weui-icon-search:before { content: '\\EA0E' } /* '' */\n.weui-icon-clear:before { content: '\\EA0F' } /* '' */\n.weui-icon-back:before { content: '\\EA10' } /* '' */\n.weui-icon-delete:before { content: '\\EA11' } /* '' */\n\n.weui-icon-success {\n font-size: 23px;\n color: #09BB07;\n}\n\n.weui-icon-waiting {\n font-size: 23px;\n color: #10AEFF;\n}\n\n.weui-icon-warn {\n font-size: 23px;\n color: #F43530;\n}\n\n.weui-icon-info {\n font-size: 23px;\n color: #10AEFF;\n}\n\n.weui-icon-success-circle {\n font-size: 23px;\n color: #09BB07;\n}\n\n.weui-icon-success-no-circle {\n font-size: 23px;\n color: #09BB07;\n}\n\n.weui-icon-waiting-circle {\n font-size: 23px;\n color: #10AEFF;\n}\n\n.weui-icon-circle {\n font-size: 23px;\n color: #C9C9C9;\n}\n\n.weui-icon-download {\n font-size: 23px;\n color: #09BB07;\n}\n\n.weui-icon-info-circle {\n font-size: 23px;\n color: #09BB07;\n}\n\n.weui-icon-safe-success {\n color: #09BB07;\n}\n\n.weui-icon-safe-warn {\n color: #FFBE00;\n}\n\n.weui-icon-cancel {\n color: #F43530;\n font-size: 22px;\n}\n\n.weui-icon-search {\n color: #B2B2B2;\n font-size: 14px;\n}\n\n.weui-icon-clear {\n color: #B2B2B2;\n font-size: 14px;\n}\n\n.weui-icon-delete {\n &.weui-icon_gallery-delete {\n color: #FFFFFF;\n font-size: 22px;\n }\n}\n\n.weui-icon_msg {\n font-size: 93px;\n\n &.weui-icon-warn {\n color: #F76260;\n }\n}\n\n.weui-icon_msg-primary {\n font-size: 93px;\n\n &.weui-icon-warn {\n color: #FFBE00;\n }\n}\n\n/** Note: 暂不考虑切换到 SVG 模式,原因如下:\n * 1. 实际使用体验与原先使用 WEUI V1.1.3 通过字体加载 Icon 的方式存在差异;\n * 2. 当前 SVG 模式下,图标大小不一致需要进一步调试。\n * 需要注意的是,移除字体文件可以为全局的 css 样式节省约 6.7KB 的大小。\n */\n\n// icon map\n// .weui-icon-circle {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%221000%22%20height%3D%221000%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M500%20916.667C269.881%20916.667%2083.333%20730.119%2083.333%20500%2083.333%20269.881%20269.881%2083.333%20500%2083.333c230.119%200%20416.667%20186.548%20416.667%20416.667%200%20230.119-186.548%20416.667-416.667%20416.667zm0-50c202.504%200%20366.667-164.163%20366.667-366.667%200-202.504-164.163-366.667-366.667-366.667-202.504%200-366.667%20164.163-366.667%20366.667%200%20202.504%20164.163%20366.667%20366.667%20366.667z%22%20fill-rule%3D%22evenodd%22%20fill-opacity%3D%22.9%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-download {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.25%2012.04l-1.72-1.72-1.06%201.06%202.828%202.83a1%201%200%20001.414-.001l2.828-2.828-1.06-1.061-1.73%201.73V7h-1.5v5.04zm0-5.04V2h1.5v5h6.251c.55%200%20.999.446.999.996v13.008a.998.998%200%2001-.996.996H4.996A.998.998%200%20014%2021.004V7.996A1%201%200%20014.999%207h6.251z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-info {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.75-12v7h1.5v-7h-1.5zM12%209a1%201%200%20100-2%201%201%200%20000%202z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-safe-success {\n// mask-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%201000%22%3E%3Cpath%20d%3D%22M500.9%204.6C315.5%2046.7%20180.4%2093.1%2057.6%20132c0%20129.3.2%20231.7.2%20339.7%200%20304.2%20248.3%20471.6%20443.1%20523.7C695.7%20943.3%20944%20775.9%20944%20471.7c0-108%20.2-210.4.2-339.7C821.4%2093.1%20686.3%2046.7%20500.9%204.6zm248.3%20349.1l-299.7%20295c-2.1%202-5.3%202-7.4-.1L304.4%20506.1c-2-2.1-2.3-5.7-.6-8l18.3-24.9c1.7-2.3%205-2.8%207.2-1l112.2%2086c2.3%201.8%206%201.7%208.1-.1l274.7-228.9c2.2-1.8%205.7-1.7%207.7.3l17%2016.8c2.2%202.1%202.2%205.3.2%207.4z%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23070202%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-safe-warn {\n// mask-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%201000%22%3E%3Cpath%20d%3D%22M500.9%204.5c-185.4%2042-320.4%2088.4-443.2%20127.3%200%20129.3.2%20231.7.2%20339.6%200%20304.1%20248.2%20471.4%20443%20523.6%20194.7-52.2%20443-219.5%20443-523.6%200-107.9.2-210.3.2-339.6C821.3%2092.9%20686.2%2046.5%20500.9%204.5zm-26.1%20271.1h52.1c5.8%200%2010.3%204.7%2010.1%2010.4l-11.6%20313.8c-.1%202.8-2.5%205.2-5.4%205.2h-38.2c-2.9%200-5.3-2.3-5.4-5.2L464.8%20286c-.2-5.8%204.3-10.4%2010-10.4zm26.1%20448.3c-20.2%200-36.5-16.3-36.5-36.5s16.3-36.5%2036.5-36.5%2036.5%2016.3%2036.5%2036.5-16.4%2036.5-36.5%2036.5z%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23020202%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-success {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-success-circle {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zm-1.172-6.242l5.809-5.808.848.849-5.95%205.95a1%201%200%2001-1.414%200L7%2012.426l.849-.849%202.98%202.98z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-success-no-circle {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.657%2018.435L3%2012.778l1.414-1.414%204.95%204.95L20.678%205l1.414%201.414-12.02%2012.021a1%201%200%2001-1.415%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-waiting {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.75%2011.38V6h-1.5v6l4.243%204.243%201.06-1.06-3.803-3.804zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-waiting-circle {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.6%2011.503l3.891%203.891-.848.849L11.4%2012V6h1.2v5.503zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-warn {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-outlined-warn {\n// mask-image: url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12ZM20.8 12C20.8 16.8601 16.8601 20.8 12 20.8C7.13989 20.8 3.2 16.8601 3.2 12C3.2 7.13989 7.13989 3.2 12 3.2C16.8601 3.2 20.8 7.13989 20.8 12ZM12.6592 6.43115L12.5713 13.4917H11.4287L11.3408 6.43115H12.6592ZM11.165 16.2383C11.165 16.707 11.5312 17.0732 12 17.0732C12.4761 17.0732 12.835 16.707 12.835 16.2383C12.835 15.7622 12.4761 15.4033 12 15.4033C11.5312 15.4033 11.165 15.7622 11.165 16.2383Z' fill='black' /%3E%3C/svg%3E%0A\");\n// }\n// .weui-icon-info-circle {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zM11.4%2010h1.2v7h-1.2v-7zm.6-1a1%201%200%20110-2%201%201%200%20010%202z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-cancel {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6z%22%20fill-rule%3D%22nonzero%22%2F%3E%3Cpath%20d%3D%22M12.849%2012l3.11%203.111-.848.849L12%2012.849l-3.111%203.11-.849-.848L11.151%2012l-3.11-3.111.848-.849L12%2011.151l3.111-3.11.849.848L12.849%2012z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-search {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M16.31%2015.561l4.114%204.115-.848.848-4.123-4.123a7%207%200%2011.857-.84zM16.8%2011a5.8%205.8%200%2010-11.6%200%205.8%205.8%200%200011.6%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-clear {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.06%2012l3.006-3.005-1.06-1.06L12%2010.938%208.995%207.934l-1.06%201.06L10.938%2012l-3.005%203.005%201.06%201.06L12%2013.062l3.005%203.005%201.06-1.06L13.062%2012zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-back {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm1.999-6.563L10.68%2012%2014%208.562%2012.953%207.5%209.29%2011.277a1.045%201.045%200%20000%201.446l3.663%203.777L14%2015.437z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-delete {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.774%206.4l.812%2013.648a.8.8%200%2000.798.752h7.232a.8.8%200%2000.798-.752L17.226%206.4H6.774zm11.655%200l-.817%2013.719A2%202%200%200115.616%2022H8.384a2%202%200%2001-1.996-1.881L5.571%206.4H3.5v-.7a.5.5%200%2001.5-.5h16a.5.5%200%2001.5.5v.7h-2.071zM14%203a.5.5%200%2001.5.5v.7h-5v-.7A.5.5%200%200110%203h4zM9.5%209h1.2l.5%209H10l-.5-9zm3.8%200h1.2l-.5%209h-1.2l.5-9z%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-success-no-circle-thin {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.864%2016.617l-5.303-5.303-1.061%201.06%205.657%205.657a1%201%200%20001.414%200L21.238%206.364l-1.06-1.06L8.864%2016.616z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-arrow {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-arrow-bold {\n// mask-image: url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2212%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.157%2012.711L4.5%2018.368l-1.414-1.414%204.95-4.95-4.95-4.95L4.5%205.64l5.657%205.657a1%201%200%20010%201.414z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-back-arrow {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.343%2012l7.071%207.071L9%2020.485l-7.778-7.778a1%201%200%20010-1.414L9%203.515l1.414%201.414L3.344%2012z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-back-arrow-thin {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.438L8.955%2020.5l-7.666-7.79a1.02%201.02%200%20010-1.42L8.955%203.5%2010%204.563%202.682%2012%2010%2019.438z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-close {\n// mask-image: url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.25 10.6932L6.05682 4.5L5 5.55682L11.1932 11.75L5 17.9432L6.05682 19L12.25 12.8068L18.4432 19L19.5 17.9432L13.3068 11.75L19.5 5.55682L18.4432 4.5L12.25 10.6932Z' fill='black' /%3E%3C/svg%3E%0A\");\n// }\n// .weui-icon-close-thin {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.25%2010.693L6.057%204.5%205%205.557l6.193%206.193L5%2017.943%206.057%2019l6.193-6.193L18.443%2019l1.057-1.057-6.193-6.193L19.5%205.557%2018.443%204.5z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);\n// }\n// .weui-icon-back-circle {\n// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zm1.999-5.363L12.953%2016.5%209.29%2012.723a1.045%201.045%200%20010-1.446L12.953%207.5%2014%208.563%2010.68%2012%2014%2015.438z%22%2F%3E%3C%2Fsvg%3E);\n// }\n\n// icon setting\n// .weui-icon-success {\n// color: $weuiColorPrimary;\n// }\n// .weui-icon-waiting {\n// color: var(--weui-BLUE);\n// }\n// .weui-icon-warn {\n// color: $weuiColorWarn;\n// }\n// .weui-icon-info {\n// color: var(--weui-BLUE);\n// }\n\n// .weui-icon-success-circle {\n// color: $weuiColorPrimary;\n// }\n// .weui-icon-success-no-circle,\n// .weui-icon-success-no-circle-thin {\n// color: $weuiColorPrimary;\n// }\n// .weui-icon-waiting-circle {\n// color: var(--weui-BLUE);\n// }\n// .weui-icon-circle {\n// color: $weuiTextColorTips;\n// }\n// .weui-icon-download {\n// color: $weuiColorPrimary;\n// }\n\n// .weui-icon-info-circle {\n// color: $weuiTextColorTips;\n// }\n\n// .weui-icon-safe-success {\n// color: $weuiColorPrimary;\n// }\n// .weui-icon-safe-warn {\n// color: var(--weui-YELLOW);\n// }\n\n// .weui-icon-cancel {\n// color: $weuiColorWarn;\n// }\n\n// .weui-icon-search {\n// color: $weuiTextColorDesc;\n// }\n\n// .weui-icon-clear {\n// color: $weuiTextColorTips;\n// &:active {\n// color: $weuiTextColorDesc;\n// }\n// }\n\n// .weui-icon-delete {\n// &.weui-icon_gallery-delete {\n// color: var(--weui-WHITE);\n// }\n// }\n// .weui-icon-arrow,\n// .weui-icon-arrow-bold,\n// .weui-icon-back-arrow,\n// .weui-icon-back-arrow-thin {\n// & {\n// width: 1.2em;\n// }\n// }\n// .weui-icon-arrow,\n// .weui-icon-arrow-bold {\n// color: $weuiTextColorTips;\n// }\n// .weui-icon-back-arrow,\n// .weui-icon-back-arrow-thin {\n// color: $weuiTextColorTitle;\n// }\n// .weui-icon-back,\n// .weui-icon-back-circle {\n// color: $weuiTextColorTitle;\n// }\n\n// .weui-icon_msg {\n// & {\n// width: 6.4em;\n// height: 6.4em;\n// &.weui-icon-warn {\n// color: $weuiColorWarn;\n// }\n// &.weui-icon-info-circle {\n// color: var(--weui-BLUE);\n// }\n// }\n// }\n// .weui-icon_msg-primary {\n// & {\n// width: 6.4em;\n// height: 6.4em;\n// &.weui-icon-warn {\n// color: var(--weui-YELLOW);\n// }\n// }\n// }\n"]}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import './style/index.css';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { createForwardRefComponent } from '../../utils/index.js';
|
|
5
|
+
import { useRef, useState, useEffect, useCallback } from '../../utils/hooks.react.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
const LEGO_CDN_URL = 'http://ossin.jd.com/swm-plus/h5Tag/tag.js';
|
|
9
|
+
// 检查CDN脚本是否已加载
|
|
10
|
+
const isLegoScriptLoaded = () => {
|
|
11
|
+
return document.querySelector(`script[src="${LEGO_CDN_URL}"]`) !== null;
|
|
12
|
+
};
|
|
13
|
+
// 插入CDN脚本
|
|
14
|
+
const insertLegoScript = () => {
|
|
15
|
+
if (isLegoScriptLoaded()) return;
|
|
16
|
+
const script = document.createElement('script');
|
|
17
|
+
script.type = 'module';
|
|
18
|
+
script.src = LEGO_CDN_URL;
|
|
19
|
+
document.head.appendChild(script);
|
|
20
|
+
};
|
|
21
|
+
// 解析lego协议URL
|
|
22
|
+
const parseLegoUrl = src => {
|
|
23
|
+
if (!src.startsWith('lego://')) return null;
|
|
24
|
+
try {
|
|
25
|
+
// 移除 'lego://' 前缀
|
|
26
|
+
const urlWithoutProtocol = src.substring(7);
|
|
27
|
+
// 分割tagId和参数
|
|
28
|
+
const [tagId, params] = urlWithoutProtocol.split('?');
|
|
29
|
+
// 解析参数
|
|
30
|
+
const text = params ? new URLSearchParams(params).get('text') || '' : '';
|
|
31
|
+
return {
|
|
32
|
+
tagId,
|
|
33
|
+
text
|
|
34
|
+
};
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.warn('Failed to parse lego URL:', src, error);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function Image(props) {
|
|
41
|
+
const imgRef = useRef(null);
|
|
42
|
+
const observer = useRef({});
|
|
43
|
+
const [, setIsLoaded] = useState(false);
|
|
44
|
+
const {
|
|
45
|
+
className,
|
|
46
|
+
style = {},
|
|
47
|
+
src,
|
|
48
|
+
mode,
|
|
49
|
+
onError,
|
|
50
|
+
lazyLoad,
|
|
51
|
+
imgProps,
|
|
52
|
+
forwardedRef,
|
|
53
|
+
lang
|
|
54
|
+
} = props,
|
|
55
|
+
reset = __rest(props
|
|
56
|
+
// 检查是否为lego模式
|
|
57
|
+
, ["className", "style", "src", "mode", "onError", "lazyLoad", "imgProps", "forwardedRef", "lang"]);
|
|
58
|
+
// 检查是否为lego模式
|
|
59
|
+
const legoData = parseLegoUrl(src);
|
|
60
|
+
const isLegoMode = legoData !== null;
|
|
61
|
+
// 如果是lego模式,确保CDN脚本已加载
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (isLegoMode) {
|
|
64
|
+
insertLegoScript();
|
|
65
|
+
}
|
|
66
|
+
}, [isLegoMode]);
|
|
67
|
+
const cls = classNames('taro-img', {
|
|
68
|
+
'taro-img__widthfix': mode === 'widthFix'
|
|
69
|
+
}, className);
|
|
70
|
+
const imgCls = classNames('taro-img__mode-' + (mode || 'scaleToFill').toLowerCase().replace(/\s/g, ''));
|
|
71
|
+
const imageOnLoad = useCallback(e => {
|
|
72
|
+
const {
|
|
73
|
+
onLoad
|
|
74
|
+
} = props;
|
|
75
|
+
Object.defineProperty(e, 'detail', {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
value: {
|
|
79
|
+
width: e.target.width,
|
|
80
|
+
height: e.target.height
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
onLoad && onLoad(e);
|
|
84
|
+
}, [props]);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
if (lazyLoad) {
|
|
88
|
+
observer.current = new IntersectionObserver(entries => {
|
|
89
|
+
// 异步 api 关系
|
|
90
|
+
if (entries[entries.length - 1].isIntersecting) {
|
|
91
|
+
setIsLoaded(true);
|
|
92
|
+
// findDOMNode(this).children[0].src = src
|
|
93
|
+
imgRef.current.src = src;
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
96
|
+
rootMargin: '300px 0px'
|
|
97
|
+
});
|
|
98
|
+
(_b = (_a = observer.current).observe) === null || _b === void 0 ? void 0 : _b.call(_a, imgRef.current);
|
|
99
|
+
}
|
|
100
|
+
return () => {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
(_b = (_a = observer.current) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
103
|
+
};
|
|
104
|
+
}, [lazyLoad, src]);
|
|
105
|
+
// 如果是lego模式,渲染canvas-tag
|
|
106
|
+
if (isLegoMode && legoData) {
|
|
107
|
+
return /*#__PURE__*/jsx("div", {
|
|
108
|
+
className: cls,
|
|
109
|
+
style: style,
|
|
110
|
+
ref: forwardedRef,
|
|
111
|
+
...reset,
|
|
112
|
+
children: /*#__PURE__*/jsx("canvas-tag", {
|
|
113
|
+
tagId: legoData.tagId,
|
|
114
|
+
text: legoData.text,
|
|
115
|
+
lang: lang,
|
|
116
|
+
...imgProps
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// 普通图片模式
|
|
121
|
+
return /*#__PURE__*/jsx("div", {
|
|
122
|
+
className: cls,
|
|
123
|
+
style: style,
|
|
124
|
+
ref: forwardedRef,
|
|
125
|
+
...reset,
|
|
126
|
+
children: lazyLoad ? /*#__PURE__*/jsx("img", {
|
|
127
|
+
ref: img => imgRef.current = img,
|
|
128
|
+
className: imgCls,
|
|
129
|
+
"data-src": src,
|
|
130
|
+
onLoad: imageOnLoad,
|
|
131
|
+
onError: onError,
|
|
132
|
+
...imgProps
|
|
133
|
+
}) : /*#__PURE__*/jsx("img", {
|
|
134
|
+
ref: img => imgRef.current = img,
|
|
135
|
+
className: imgCls,
|
|
136
|
+
src: src,
|
|
137
|
+
onLoad: imageOnLoad,
|
|
138
|
+
onError: onError,
|
|
139
|
+
...imgProps
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
var index = createForwardRefComponent(Image);
|
|
144
|
+
|
|
145
|
+
export { index as default };
|
|
146
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/image/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent } from '../../utils'\nimport { useCallback, useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n src: string\n mode: string\n onError: () => void\n onLoad: (e) => void\n lazyLoad?: boolean\n imgProps?: Record<string, any>\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n lang?: string\n}\n\n// CDN脚本URL\nconst LEGO_CDN_URL = 'http://ossin.jd.com/swm-plus/h5Tag/tag.js'\n\n// 检查CDN脚本是否已加载\nconst isLegoScriptLoaded = (): boolean => {\n return document.querySelector(`script[src=\"${LEGO_CDN_URL}\"]`) !== null\n}\n\n// 插入CDN脚本\nconst insertLegoScript = (): void => {\n if (isLegoScriptLoaded()) return\n\n const script = document.createElement('script')\n script.type = 'module'\n script.src = LEGO_CDN_URL\n document.head.appendChild(script)\n}\n\n// 解析lego协议URL\nconst parseLegoUrl = (src: string): { tagId: string, text: string } | null => {\n if (!src.startsWith('lego://')) return null\n\n try {\n // 移除 'lego://' 前缀\n const urlWithoutProtocol = src.substring(7)\n\n // 分割tagId和参数\n const [tagId, params] = urlWithoutProtocol.split('?')\n\n // 解析参数\n const text = params ? new URLSearchParams(params).get('text') || '' : ''\n\n return { tagId, text }\n } catch (error) {\n console.warn('Failed to parse lego URL:', src, error)\n return null\n }\n}\n\nfunction Image (props: IProps) {\n const imgRef = useRef<HTMLImageElement | null>(null)\n const observer = useRef<Partial<IntersectionObserver>>({})\n const [, setIsLoaded] = useState(false)\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n forwardedRef,\n lang,\n ...reset\n } = props\n\n // 检查是否为lego模式\n const legoData = parseLegoUrl(src)\n const isLegoMode = legoData !== null\n\n // 如果是lego模式,确保CDN脚本已加载\n useEffect(() => {\n if (isLegoMode) {\n insertLegoScript()\n }\n }, [isLegoMode])\n\n const cls = classNames(\n 'taro-img',\n {\n 'taro-img__widthfix': mode === 'widthFix'\n },\n className\n )\n const imgCls = classNames(\n 'taro-img__mode-' +\n (mode || 'scaleToFill').toLowerCase().replace(/\\s/g, '')\n )\n\n const imageOnLoad = useCallback((e) => {\n const { onLoad } = props\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n width: e.target.width,\n height: e.target.height\n }\n })\n\n onLoad && onLoad(e)\n }, [props])\n\n useEffect(() => {\n if (lazyLoad) {\n observer.current = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n setIsLoaded(true)\n // findDOMNode(this).children[0].src = src\n imgRef.current!.src = src\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n observer.current.observe?.(imgRef.current!)\n }\n\n return () => {\n observer.current?.disconnect?.()\n }\n }, [lazyLoad, src])\n\n // 如果是lego模式,渲染canvas-tag\n if (isLegoMode && legoData) {\n return (\n <div className={cls} style={style} ref={forwardedRef} {...reset}>\n <canvas-tag\n tagId={legoData.tagId}\n text={legoData.text}\n lang={lang}\n {...imgProps}\n />\n </div>\n )\n }\n\n // 普通图片模式\n return (\n <div className={cls} style={style} ref={forwardedRef} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n data-src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n}\n\nexport default createForwardRefComponent(Image)\n"],"names":["LEGO_CDN_URL","isLegoScriptLoaded","document","querySelector","insertLegoScript","script","createElement","type","src","head","appendChild","parseLegoUrl","startsWith","urlWithoutProtocol","substring","tagId","params","split","text","URLSearchParams","get","error","console","warn","Image","props","imgRef","useRef","observer","setIsLoaded","useState","className","style","mode","onError","lazyLoad","imgProps","forwardedRef","lang","reset","__rest","legoData","isLegoMode","useEffect","cls","classNames","imgCls","toLowerCase","replace","imageOnLoad","useCallback","e","onLoad","Object","defineProperty","enumerable","writable","value","width","target","height","current","IntersectionObserver","entries","length","isIntersecting","rootMargin","_b","_a","observe","call","disconnect","_jsx","ref","children","img","createForwardRefComponent"],"mappings":";;;;;;;AAqBA,MAAMA,YAAY,GAAG,2CAA2C;AAEhE;AACA,MAAMC,kBAAkB,GAAGA,MAAc;EACvC,OAAOC,QAAQ,CAACC,aAAa,CAAC,eAAeH,YAAY,CAAA,EAAA,CAAI,CAAC,KAAK,IAAI;AACzE,CAAC;AAED;AACA,MAAMI,gBAAgB,GAAGA,MAAW;EAClC,IAAIH,kBAAkB,EAAE,EAAE;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AAA,KAAK,CAAC;AAEV;AAEA;AACA,EAAA,oBACEoC,GAAA,CAAA,KAAA,EAAA;AAAKzC,IAAAA,SAAS,EAAEa,GAAI;AAACZ,IAAAA,KAAK,EAAEA,KAAM;AAACyC,IAAAA,GAAG,EAAEpC,YAAa;AAAA,IAAA,GAAKE,KAAK;IAAAmC,QAAA,EAC5DvC,QAAQ,gBACPqC,GAAA,CAAA,KAAA,EAAA;AACEC,MAAAA,GAAG,EAAEE,GAAG,IAAKjD,MAAM,CAACmC,OAAO,GAAGc,GAAK;AACnC5C,MAAAA,SAAS,EAAEe,MAAO;AAClB,MAAA,UAAA,EAAUtC,GAAI;AACd4C,MAAAA,MAAM,EAAEH,WAAY;AACpBf,MAAAA,OAAO,EAAEA,OAAQ;MAAA,GACbE;KAAS,CACb,gBAEFoC,GAAA,CAAA,KAAA,EAAA;AACEC,MAAAA,GAAG,EAAEE,GAAG,IAAKjD,MAAM,CAACmC,OAAO,GAAGc,GAAK;AACnC5C,MAAAA,SAAS,EAAEe,MAAO;AAClBtC,MAAAA,GAAG,EAAEA,GAAI;AACT4C,MAAAA,MAAM,EAAEH,WAAY;AACpBf,MAAAA,OAAO,EAAEA,OAAQ;MAAA,GACbE;KACJ;AACH,GACE,CAAC;AAEV;AAEA,YAAewC,yBAAyB,CAACpD,KAAK,CAAC;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix,.taro-img__mode-heightfix{height:100%}.taro-img__mode-scaletofill{height:100%;width:100%}.taro-img__mode-aspectfit{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom,.taro-img__mode-top{left:50%;position:absolute;transform:translate(-50%)}.taro-img__mode-bottom{bottom:0}.taro-img__mode-center{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.taro-img__mode-left,.taro-img__mode-right{position:absolute;top:50%;transform:translateY(-50%)}.taro-img__mode-right{right:0}.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
3
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/image/style/index.css"],"names":[],"mappings":"AAAA,YACE,SACF,CAEA,UACE,oBAAqB,CAKrB,WAAY,CADZ,YAAa,CAHb,eAAgB,CAChB,iBAAkB,CAClB,WAGF,CAMA,uDACE,WACF,CAEA,4BAEE,WAAY,CADZ,UAEF,CAEA,0BAEE,WAAY,CACZ,kBAAmB,CAFnB,UAGF,CAEA,2BAEE,WAAY,CACZ,gBAAiB,CAFjB,UAGF,CAEA,yBACE,UACF,CAQA,2CAJE,QAAS,CADT,iBAAkB,CAElB,yBAQF,CALA,uBAGE,QAEF,CAEA,uBAEE,QAAS,CADT,iBAAkB,CAElB,OAAQ,CACR,8BACF,CAQA,2CALE,iBAAkB,CAClB,OAAQ,CACR,0BAQF,CALA,sBAEE,OAGF,CAEA,yBACE,iBAAkB,CAClB,OACF,CAEA,2BAEE,QAAS,CADT,iBAEF,CAEA,4BAGE,QAAS,CAFT,iBAAkB,CAClB,OAEF","file":"index.css","sourcesContent":["img[src=''] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n width: 320px;\n height: 240px;\n font-size: 0;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-heightfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfit {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n.taro-img__mode-aspectfill {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.taro-img__mode-widthfix {\n width: 100%;\n}\n\n.taro-img__mode-top {\n position: absolute;\n left: 50%;\n transform: translate(-50%, 0);\n}\n\n.taro-img__mode-bottom {\n position: absolute;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 0);\n}\n\n.taro-img__mode-center {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.taro-img__mode-left {\n position: absolute;\n top: 50%;\n transform: translate(0, -50%);\n}\n\n.taro-img__mode-right {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translate(0, -50%);\n}\n\n.taro-img__mode-topright {\n position: absolute;\n right: 0;\n}\n\n.taro-img__mode-bottomleft {\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-bottomright {\n position: absolute;\n right: 0;\n bottom: 0;\n}\n"]}
|