From 6743d6bb21c2e45451bebac12ec86b43d727fc3d Mon Sep 17 00:00:00 2001 From: xuan Date: Wed, 14 Sep 2022 14:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(iconfont=E6=96=87=E4=BB=B6):?= =?UTF-8?q?=20=E5=BC=95=E7=94=A8=E7=9A=84=20ttf=20=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iconfont.json | 4 +- .../{IconAJizhumima.js => IconAJizhumima.tsx} | 12 +- .../h5/{IconBianji.js => IconBianji.tsx} | 12 +- .../h5/{IconBiyan.js => IconBiyan.tsx} | 12 +- .../h5/{IconCangku.js => IconCangku.tsx} | 12 +- ...quanbukehu.js => IconChakanquanbukehu.tsx} | 12 +- .../h5/{IconDaikuan.js => IconDaikuan.tsx} | 12 +- .../h5/{IconDingdan.js => IconDingdan.tsx} | 12 +- .../h5/{IconDingdan1.js => IconDingdan1.tsx} | 12 +- .../h5/{IconDingwei.js => IconDingwei.tsx} | 12 +- .../h5/{IconDizhi.js => IconDizhi.tsx} | 12 +- .../h5/{IconDuizhang.js => IconDuizhang.tsx} | 12 +- ...onFahuoliebiao.js => IconFahuoliebiao.tsx} | 12 +- ...Gerenzhongxin.js => IconGerenzhongxin.tsx} | 12 +- ...renzhongxin1.js => IconGerenzhongxin1.tsx} | 12 +- .../h5/{IconGouwu.js => IconGouwu.tsx} | 12 +- .../h5/{IconGouwu1.js => IconGouwu1.tsx} | 12 +- .../h5/{IconGuanbi.js => IconGuanbi.tsx} | 12 +- ...Guanlidingdan.js => IconGuanlidingdan.tsx} | 12 +- .../h5/{IconJianshao.js => IconJianshao.tsx} | 12 +- .../{IconJizhumima.js => IconJizhumima.tsx} | 12 +- .../{IconKehuxinxi.js => IconKehuxinxi.tsx} | 12 +- .../{IconLingquseka.js => IconLingquseka.tsx} | 12 +- src/components/iconfont/h5/IconLujing.tsx | 33 ++ ...IconMadanguanli.js => IconMadanguanli.tsx} | 12 +- .../iconfont/h5/{IconMima.js => IconMima.tsx} | 12 +- .../h5/{IconPaiming.js => IconPaiming.tsx} | 12 +- ...onPandiansaoma.js => IconPandiansaoma.tsx} | 12 +- .../h5/{IconPeihuo.js => IconPeihuo.tsx} | 12 +- ...icangkucun.js => IconQianzhicangkucun.tsx} | 12 +- ...IconQusechazhao.js => IconQusechazhao.tsx} | 12 +- .../h5/{IconSaomiao.js => IconSaomiao.tsx} | 12 +- .../h5/{IconShaixuan.js => IconShaixuan.tsx} | 12 +- ...suoxinxi.js => IconShanchusousuoxinxi.tsx} | 12 +- .../h5/{IconShijian.js => IconShijian.tsx} | 12 +- .../h5/{IconShouhou.js => IconShouhou.tsx} | 12 +- ...houzhongxin.js => IconShouhouzhongxin.tsx} | 12 +- ...kuanliebiao.js => IconShoukuanliebiao.tsx} | 12 +- .../h5/{IconShouye.js => IconShouye.tsx} | 12 +- .../h5/{IconShouye1.js => IconShouye1.tsx} | 12 +- .../h5/{IconSousuo.js => IconSousuo.tsx} | 12 +- ...onSousuofanhui.js => IconSousuofanhui.tsx} | 12 +- ...Sousuoshanchu.js => IconSousuoshanchu.tsx} | 12 +- ...onTihuoliebiao.js => IconTihuoliebiao.tsx} | 12 +- .../h5/{IconTishi.js => IconTishi.tsx} | 12 +- .../h5/{IconTuikuan.js => IconTuikuan.tsx} | 12 +- ...onWeixindenglu.js => IconWeixindenglu.tsx} | 12 +- .../h5/{IconWodekefu.js => IconWodekefu.tsx} | 12 +- ...onWodeshoucang.js => IconWodeshoucang.tsx} | 12 +- ...anxiahuizong.js => IconXianxiahuizong.tsx} | 12 +- .../h5/{IconXiaoshou.js => IconXiaoshou.tsx} | 12 +- .../h5/{IconXinzeng.js => IconXinzeng.tsx} | 12 +- ...onYangpinduibi.js => IconYangpinduibi.tsx} | 12 +- .../h5/{IconYanjing.js => IconYanjing.tsx} | 12 +- ...IconYansequyang.js => IconYansequyang.tsx} | 12 +- .../{IconYaoqingma.js => IconYaoqingma.tsx} | 12 +- ...onYewuyuanqizi.js => IconYewuyuanqizi.tsx} | 12 +- .../{IconYonghuming.js => IconYonghuming.tsx} | 12 +- .../h5/{IconYufukuan.js => IconYufukuan.tsx} | 12 +- ...onYuncangkucun.js => IconYuncangkucun.tsx} | 12 +- src/components/iconfont/h5/helper.js | 17 - src/components/iconfont/h5/helper.ts | 12 + .../iconfont/h5/{index.js => index.tsx} | 17 +- src/components/iconfont/index.d.ts | 13 - src/components/iconfont/index.h5.js | 17 - src/components/iconfont/index.h5.tsx | 27 ++ src/components/iconfont/index.js | 7 - src/components/iconfont/index.tsx | 19 + src/components/iconfont/index.weapp.js | 16 - src/components/iconfont/index.weapp.tsx | 27 ++ src/components/iconfont/weapp/weapp.js | 2 +- src/components/iconfont/weapp/weapp.wxml | 3 + src/pages/order/components/PayPopup/index.tsx | 290 +++++++-------- src/pages/order/components/itemList/index.tsx | 156 ++++---- src/pages/order/index.tsx | 344 ++++++++++-------- src/styles/iconfont.scss | 26 +- src/styles/iconfont.ttf | Bin 13312 -> 13312 bytes 77 files changed, 1092 insertions(+), 634 deletions(-) rename src/components/iconfont/h5/{IconAJizhumima.js => IconAJizhumima.tsx} (64%) rename src/components/iconfont/h5/{IconBianji.js => IconBianji.tsx} (67%) rename src/components/iconfont/h5/{IconBiyan.js => IconBiyan.tsx} (78%) rename src/components/iconfont/h5/{IconCangku.js => IconCangku.tsx} (76%) rename src/components/iconfont/h5/{IconChakanquanbukehu.js => IconChakanquanbukehu.tsx} (66%) rename src/components/iconfont/h5/{IconDaikuan.js => IconDaikuan.tsx} (78%) rename src/components/iconfont/h5/{IconDingdan.js => IconDingdan.tsx} (67%) rename src/components/iconfont/h5/{IconDingdan1.js => IconDingdan1.tsx} (67%) rename src/components/iconfont/h5/{IconDingwei.js => IconDingwei.tsx} (83%) rename src/components/iconfont/h5/{IconDizhi.js => IconDizhi.tsx} (80%) rename src/components/iconfont/h5/{IconDuizhang.js => IconDuizhang.tsx} (73%) rename src/components/iconfont/h5/{IconFahuoliebiao.js => IconFahuoliebiao.tsx} (73%) rename src/components/iconfont/h5/{IconGerenzhongxin.js => IconGerenzhongxin.tsx} (63%) rename src/components/iconfont/h5/{IconGerenzhongxin1.js => IconGerenzhongxin1.tsx} (71%) rename src/components/iconfont/h5/{IconGouwu.js => IconGouwu.tsx} (68%) rename src/components/iconfont/h5/{IconGouwu1.js => IconGouwu1.tsx} (69%) rename src/components/iconfont/h5/{IconGuanbi.js => IconGuanbi.tsx} (68%) rename src/components/iconfont/h5/{IconGuanlidingdan.js => IconGuanlidingdan.tsx} (69%) rename src/components/iconfont/h5/{IconJianshao.js => IconJianshao.tsx} (60%) rename src/components/iconfont/h5/{IconJizhumima.js => IconJizhumima.tsx} (75%) rename src/components/iconfont/h5/{IconKehuxinxi.js => IconKehuxinxi.tsx} (80%) rename src/components/iconfont/h5/{IconLingquseka.js => IconLingquseka.tsx} (76%) create mode 100644 src/components/iconfont/h5/IconLujing.tsx rename src/components/iconfont/h5/{IconMadanguanli.js => IconMadanguanli.tsx} (77%) rename src/components/iconfont/h5/{IconMima.js => IconMima.tsx} (68%) rename src/components/iconfont/h5/{IconPaiming.js => IconPaiming.tsx} (84%) rename src/components/iconfont/h5/{IconPandiansaoma.js => IconPandiansaoma.tsx} (71%) rename src/components/iconfont/h5/{IconPeihuo.js => IconPeihuo.tsx} (72%) rename src/components/iconfont/h5/{IconQianzhicangkucun.js => IconQianzhicangkucun.tsx} (80%) rename src/components/iconfont/h5/{IconQusechazhao.js => IconQusechazhao.tsx} (77%) rename src/components/iconfont/h5/{IconSaomiao.js => IconSaomiao.tsx} (66%) rename src/components/iconfont/h5/{IconShaixuan.js => IconShaixuan.tsx} (75%) rename src/components/iconfont/h5/{IconShanchusousuoxinxi.js => IconShanchusousuoxinxi.tsx} (70%) rename src/components/iconfont/h5/{IconShijian.js => IconShijian.tsx} (64%) rename src/components/iconfont/h5/{IconShouhou.js => IconShouhou.tsx} (80%) rename src/components/iconfont/h5/{IconShouhouzhongxin.js => IconShouhouzhongxin.tsx} (74%) rename src/components/iconfont/h5/{IconShoukuanliebiao.js => IconShoukuanliebiao.tsx} (75%) rename src/components/iconfont/h5/{IconShouye.js => IconShouye.tsx} (73%) rename src/components/iconfont/h5/{IconShouye1.js => IconShouye1.tsx} (78%) rename src/components/iconfont/h5/{IconSousuo.js => IconSousuo.tsx} (72%) rename src/components/iconfont/h5/{IconSousuofanhui.js => IconSousuofanhui.tsx} (67%) rename src/components/iconfont/h5/{IconSousuoshanchu.js => IconSousuoshanchu.tsx} (71%) rename src/components/iconfont/h5/{IconTihuoliebiao.js => IconTihuoliebiao.tsx} (73%) rename src/components/iconfont/h5/{IconTishi.js => IconTishi.tsx} (79%) rename src/components/iconfont/h5/{IconTuikuan.js => IconTuikuan.tsx} (73%) rename src/components/iconfont/h5/{IconWeixindenglu.js => IconWeixindenglu.tsx} (86%) rename src/components/iconfont/h5/{IconWodekefu.js => IconWodekefu.tsx} (77%) rename src/components/iconfont/h5/{IconWodeshoucang.js => IconWodeshoucang.tsx} (78%) rename src/components/iconfont/h5/{IconXianxiahuizong.js => IconXianxiahuizong.tsx} (72%) rename src/components/iconfont/h5/{IconXiaoshou.js => IconXiaoshou.tsx} (72%) rename src/components/iconfont/h5/{IconXinzeng.js => IconXinzeng.tsx} (63%) rename src/components/iconfont/h5/{IconYangpinduibi.js => IconYangpinduibi.tsx} (68%) rename src/components/iconfont/h5/{IconYanjing.js => IconYanjing.tsx} (70%) rename src/components/iconfont/h5/{IconYansequyang.js => IconYansequyang.tsx} (73%) rename src/components/iconfont/h5/{IconYaoqingma.js => IconYaoqingma.tsx} (73%) rename src/components/iconfont/h5/{IconYewuyuanqizi.js => IconYewuyuanqizi.tsx} (62%) rename src/components/iconfont/h5/{IconYonghuming.js => IconYonghuming.tsx} (68%) rename src/components/iconfont/h5/{IconYufukuan.js => IconYufukuan.tsx} (69%) rename src/components/iconfont/h5/{IconYuncangkucun.js => IconYuncangkucun.tsx} (75%) delete mode 100644 src/components/iconfont/h5/helper.js create mode 100644 src/components/iconfont/h5/helper.ts rename src/components/iconfont/h5/{index.js => index.tsx} (86%) delete mode 100644 src/components/iconfont/index.d.ts delete mode 100644 src/components/iconfont/index.h5.js create mode 100644 src/components/iconfont/index.h5.tsx delete mode 100644 src/components/iconfont/index.js create mode 100644 src/components/iconfont/index.tsx delete mode 100644 src/components/iconfont/index.weapp.js create mode 100644 src/components/iconfont/index.weapp.tsx diff --git a/iconfont.json b/iconfont.json index 66a7022..a759b0f 100644 --- a/iconfont.json +++ b/iconfont.json @@ -1,7 +1,7 @@ { - "symbol_url": "//at.alicdn.com/t/c/font_3619513_i9fjrthdbsd.js", + "symbol_url": "//at.alicdn.com/t/c/font_3619513_pecprurprt.js", "save_dir": "./src/components/iconfont", - "use_typescript": false, + "use_typescript": true, "platforms": ["weapp","h5"], "use_rpx": true, "trim_icon_prefix": "", diff --git a/src/components/iconfont/h5/IconAJizhumima.js b/src/components/iconfont/h5/IconAJizhumima.tsx similarity index 64% rename from src/components/iconfont/h5/IconAJizhumima.js rename to src/components/iconfont/h5/IconAJizhumima.tsx index 8743883..1eb32b2 100644 --- a/src/components/iconfont/h5/IconAJizhumima.js +++ b/src/components/iconfont/h5/IconAJizhumima.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconAJizhumima = ({ size, color, style: _style, ...rest }) => { +const IconAJizhumima: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconBianji.js b/src/components/iconfont/h5/IconBianji.tsx similarity index 67% rename from src/components/iconfont/h5/IconBianji.js rename to src/components/iconfont/h5/IconBianji.tsx index e0188ba..f9b628a 100644 --- a/src/components/iconfont/h5/IconBianji.js +++ b/src/components/iconfont/h5/IconBianji.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconBianji = ({ size, color, style: _style, ...rest }) => { +const IconBianji: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconBiyan.js b/src/components/iconfont/h5/IconBiyan.tsx similarity index 78% rename from src/components/iconfont/h5/IconBiyan.js rename to src/components/iconfont/h5/IconBiyan.tsx index 31cc5a0..fb2d71b 100644 --- a/src/components/iconfont/h5/IconBiyan.js +++ b/src/components/iconfont/h5/IconBiyan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconBiyan = ({ size, color, style: _style, ...rest }) => { +const IconBiyan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconCangku.js b/src/components/iconfont/h5/IconCangku.tsx similarity index 76% rename from src/components/iconfont/h5/IconCangku.js rename to src/components/iconfont/h5/IconCangku.tsx index df4d192..def2b99 100644 --- a/src/components/iconfont/h5/IconCangku.js +++ b/src/components/iconfont/h5/IconCangku.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconCangku = ({ size, color, style: _style, ...rest }) => { +const IconCangku: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconChakanquanbukehu.js b/src/components/iconfont/h5/IconChakanquanbukehu.tsx similarity index 66% rename from src/components/iconfont/h5/IconChakanquanbukehu.js rename to src/components/iconfont/h5/IconChakanquanbukehu.tsx index 7059887..38a4d03 100644 --- a/src/components/iconfont/h5/IconChakanquanbukehu.js +++ b/src/components/iconfont/h5/IconChakanquanbukehu.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconChakanquanbukehu = ({ size, color, style: _style, ...rest }) => { +const IconChakanquanbukehu: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconDaikuan.js b/src/components/iconfont/h5/IconDaikuan.tsx similarity index 78% rename from src/components/iconfont/h5/IconDaikuan.js rename to src/components/iconfont/h5/IconDaikuan.tsx index eda3f8b..946d9c6 100644 --- a/src/components/iconfont/h5/IconDaikuan.js +++ b/src/components/iconfont/h5/IconDaikuan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconDaikuan = ({ size, color, style: _style, ...rest }) => { +const IconDaikuan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconDingdan.js b/src/components/iconfont/h5/IconDingdan.tsx similarity index 67% rename from src/components/iconfont/h5/IconDingdan.js rename to src/components/iconfont/h5/IconDingdan.tsx index ed26299..78cd78b 100644 --- a/src/components/iconfont/h5/IconDingdan.js +++ b/src/components/iconfont/h5/IconDingdan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconDingdan = ({ size, color, style: _style, ...rest }) => { +const IconDingdan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconDingdan1.js b/src/components/iconfont/h5/IconDingdan1.tsx similarity index 67% rename from src/components/iconfont/h5/IconDingdan1.js rename to src/components/iconfont/h5/IconDingdan1.tsx index 6646be2..db146fb 100644 --- a/src/components/iconfont/h5/IconDingdan1.js +++ b/src/components/iconfont/h5/IconDingdan1.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconDingdan1 = ({ size, color, style: _style, ...rest }) => { +const IconDingdan1: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconDingwei.js b/src/components/iconfont/h5/IconDingwei.tsx similarity index 83% rename from src/components/iconfont/h5/IconDingwei.js rename to src/components/iconfont/h5/IconDingwei.tsx index c6bb39e..3a6950b 100644 --- a/src/components/iconfont/h5/IconDingwei.js +++ b/src/components/iconfont/h5/IconDingwei.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconDingwei = ({ size, color, style: _style, ...rest }) => { +const IconDingwei: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconDizhi.js b/src/components/iconfont/h5/IconDizhi.tsx similarity index 80% rename from src/components/iconfont/h5/IconDizhi.js rename to src/components/iconfont/h5/IconDizhi.tsx index d13f9ac..ae072ad 100644 --- a/src/components/iconfont/h5/IconDizhi.js +++ b/src/components/iconfont/h5/IconDizhi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconDizhi = ({ size, color, style: _style, ...rest }) => { +const IconDizhi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconDuizhang.js b/src/components/iconfont/h5/IconDuizhang.tsx similarity index 73% rename from src/components/iconfont/h5/IconDuizhang.js rename to src/components/iconfont/h5/IconDuizhang.tsx index 1c054ec..f00fc98 100644 --- a/src/components/iconfont/h5/IconDuizhang.js +++ b/src/components/iconfont/h5/IconDuizhang.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconDuizhang = ({ size, color, style: _style, ...rest }) => { +const IconDuizhang: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconFahuoliebiao.js b/src/components/iconfont/h5/IconFahuoliebiao.tsx similarity index 73% rename from src/components/iconfont/h5/IconFahuoliebiao.js rename to src/components/iconfont/h5/IconFahuoliebiao.tsx index 6186db7..b8f8b57 100644 --- a/src/components/iconfont/h5/IconFahuoliebiao.js +++ b/src/components/iconfont/h5/IconFahuoliebiao.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconFahuoliebiao = ({ size, color, style: _style, ...rest }) => { +const IconFahuoliebiao: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconGerenzhongxin.js b/src/components/iconfont/h5/IconGerenzhongxin.tsx similarity index 63% rename from src/components/iconfont/h5/IconGerenzhongxin.js rename to src/components/iconfont/h5/IconGerenzhongxin.tsx index 0e0396a..df960b6 100644 --- a/src/components/iconfont/h5/IconGerenzhongxin.js +++ b/src/components/iconfont/h5/IconGerenzhongxin.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconGerenzhongxin = ({ size, color, style: _style, ...rest }) => { +const IconGerenzhongxin: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconGerenzhongxin1.js b/src/components/iconfont/h5/IconGerenzhongxin1.tsx similarity index 71% rename from src/components/iconfont/h5/IconGerenzhongxin1.js rename to src/components/iconfont/h5/IconGerenzhongxin1.tsx index e2048e9..28b153c 100644 --- a/src/components/iconfont/h5/IconGerenzhongxin1.js +++ b/src/components/iconfont/h5/IconGerenzhongxin1.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconGerenzhongxin1 = ({ size, color, style: _style, ...rest }) => { +const IconGerenzhongxin1: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconGouwu.js b/src/components/iconfont/h5/IconGouwu.tsx similarity index 68% rename from src/components/iconfont/h5/IconGouwu.js rename to src/components/iconfont/h5/IconGouwu.tsx index acd351f..c75b358 100644 --- a/src/components/iconfont/h5/IconGouwu.js +++ b/src/components/iconfont/h5/IconGouwu.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconGouwu = ({ size, color, style: _style, ...rest }) => { +const IconGouwu: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconGouwu1.js b/src/components/iconfont/h5/IconGouwu1.tsx similarity index 69% rename from src/components/iconfont/h5/IconGouwu1.js rename to src/components/iconfont/h5/IconGouwu1.tsx index 710069f..c45c635 100644 --- a/src/components/iconfont/h5/IconGouwu1.js +++ b/src/components/iconfont/h5/IconGouwu1.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconGouwu1 = ({ size, color, style: _style, ...rest }) => { +const IconGouwu1: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconGuanbi.js b/src/components/iconfont/h5/IconGuanbi.tsx similarity index 68% rename from src/components/iconfont/h5/IconGuanbi.js rename to src/components/iconfont/h5/IconGuanbi.tsx index d256124..d301ffb 100644 --- a/src/components/iconfont/h5/IconGuanbi.js +++ b/src/components/iconfont/h5/IconGuanbi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconGuanbi = ({ size, color, style: _style, ...rest }) => { +const IconGuanbi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconGuanlidingdan.js b/src/components/iconfont/h5/IconGuanlidingdan.tsx similarity index 69% rename from src/components/iconfont/h5/IconGuanlidingdan.js rename to src/components/iconfont/h5/IconGuanlidingdan.tsx index d7ad8f1..15b2b82 100644 --- a/src/components/iconfont/h5/IconGuanlidingdan.js +++ b/src/components/iconfont/h5/IconGuanlidingdan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconGuanlidingdan = ({ size, color, style: _style, ...rest }) => { +const IconGuanlidingdan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconJianshao.js b/src/components/iconfont/h5/IconJianshao.tsx similarity index 60% rename from src/components/iconfont/h5/IconJianshao.js rename to src/components/iconfont/h5/IconJianshao.tsx index c285021..c65a0ae 100644 --- a/src/components/iconfont/h5/IconJianshao.js +++ b/src/components/iconfont/h5/IconJianshao.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconJianshao = ({ size, color, style: _style, ...rest }) => { +const IconJianshao: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconJizhumima.js b/src/components/iconfont/h5/IconJizhumima.tsx similarity index 75% rename from src/components/iconfont/h5/IconJizhumima.js rename to src/components/iconfont/h5/IconJizhumima.tsx index 77d653c..28d79ed 100644 --- a/src/components/iconfont/h5/IconJizhumima.js +++ b/src/components/iconfont/h5/IconJizhumima.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconJizhumima = ({ size, color, style: _style, ...rest }) => { +const IconJizhumima: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconKehuxinxi.js b/src/components/iconfont/h5/IconKehuxinxi.tsx similarity index 80% rename from src/components/iconfont/h5/IconKehuxinxi.js rename to src/components/iconfont/h5/IconKehuxinxi.tsx index 07c5fbb..38aff7e 100644 --- a/src/components/iconfont/h5/IconKehuxinxi.js +++ b/src/components/iconfont/h5/IconKehuxinxi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconKehuxinxi = ({ size, color, style: _style, ...rest }) => { +const IconKehuxinxi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconLingquseka.js b/src/components/iconfont/h5/IconLingquseka.tsx similarity index 76% rename from src/components/iconfont/h5/IconLingquseka.js rename to src/components/iconfont/h5/IconLingquseka.tsx index a910c42..e3a6347 100644 --- a/src/components/iconfont/h5/IconLingquseka.js +++ b/src/components/iconfont/h5/IconLingquseka.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconLingquseka = ({ size, color, style: _style, ...rest }) => { +const IconLingquseka: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconLujing.tsx b/src/components/iconfont/h5/IconLujing.tsx new file mode 100644 index 0000000..9e1b6eb --- /dev/null +++ b/src/components/iconfont/h5/IconLujing.tsx @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ + +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; +import { getIconColor } from './helper'; + +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { + display: 'block', +}; + +const IconLujing: FunctionComponent = ({ size, color, style: _style, ...rest }) => { + const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; + + return ( + + + + ); +}; + +IconLujing.defaultProps = { + size: 18, +}; + +export default IconLujing; diff --git a/src/components/iconfont/h5/IconMadanguanli.js b/src/components/iconfont/h5/IconMadanguanli.tsx similarity index 77% rename from src/components/iconfont/h5/IconMadanguanli.js rename to src/components/iconfont/h5/IconMadanguanli.tsx index 03d55ed..6207a40 100644 --- a/src/components/iconfont/h5/IconMadanguanli.js +++ b/src/components/iconfont/h5/IconMadanguanli.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconMadanguanli = ({ size, color, style: _style, ...rest }) => { +const IconMadanguanli: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconMima.js b/src/components/iconfont/h5/IconMima.tsx similarity index 68% rename from src/components/iconfont/h5/IconMima.js rename to src/components/iconfont/h5/IconMima.tsx index b8d402e..802a604 100644 --- a/src/components/iconfont/h5/IconMima.js +++ b/src/components/iconfont/h5/IconMima.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconMima = ({ size, color, style: _style, ...rest }) => { +const IconMima: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconPaiming.js b/src/components/iconfont/h5/IconPaiming.tsx similarity index 84% rename from src/components/iconfont/h5/IconPaiming.js rename to src/components/iconfont/h5/IconPaiming.tsx index e67379a..3a82537 100644 --- a/src/components/iconfont/h5/IconPaiming.js +++ b/src/components/iconfont/h5/IconPaiming.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconPaiming = ({ size, color, style: _style, ...rest }) => { +const IconPaiming: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconPandiansaoma.js b/src/components/iconfont/h5/IconPandiansaoma.tsx similarity index 71% rename from src/components/iconfont/h5/IconPandiansaoma.js rename to src/components/iconfont/h5/IconPandiansaoma.tsx index cedaa00..34b6855 100644 --- a/src/components/iconfont/h5/IconPandiansaoma.js +++ b/src/components/iconfont/h5/IconPandiansaoma.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconPandiansaoma = ({ size, color, style: _style, ...rest }) => { +const IconPandiansaoma: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconPeihuo.js b/src/components/iconfont/h5/IconPeihuo.tsx similarity index 72% rename from src/components/iconfont/h5/IconPeihuo.js rename to src/components/iconfont/h5/IconPeihuo.tsx index e74196a..6dff214 100644 --- a/src/components/iconfont/h5/IconPeihuo.js +++ b/src/components/iconfont/h5/IconPeihuo.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconPeihuo = ({ size, color, style: _style, ...rest }) => { +const IconPeihuo: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconQianzhicangkucun.js b/src/components/iconfont/h5/IconQianzhicangkucun.tsx similarity index 80% rename from src/components/iconfont/h5/IconQianzhicangkucun.js rename to src/components/iconfont/h5/IconQianzhicangkucun.tsx index 6f58e2d..c3dfbf1 100644 --- a/src/components/iconfont/h5/IconQianzhicangkucun.js +++ b/src/components/iconfont/h5/IconQianzhicangkucun.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconQianzhicangkucun = ({ size, color, style: _style, ...rest }) => { +const IconQianzhicangkucun: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconQusechazhao.js b/src/components/iconfont/h5/IconQusechazhao.tsx similarity index 77% rename from src/components/iconfont/h5/IconQusechazhao.js rename to src/components/iconfont/h5/IconQusechazhao.tsx index 95db3db..26bea3a 100644 --- a/src/components/iconfont/h5/IconQusechazhao.js +++ b/src/components/iconfont/h5/IconQusechazhao.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconQusechazhao = ({ size, color, style: _style, ...rest }) => { +const IconQusechazhao: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconSaomiao.js b/src/components/iconfont/h5/IconSaomiao.tsx similarity index 66% rename from src/components/iconfont/h5/IconSaomiao.js rename to src/components/iconfont/h5/IconSaomiao.tsx index ebb4447..4f32e97 100644 --- a/src/components/iconfont/h5/IconSaomiao.js +++ b/src/components/iconfont/h5/IconSaomiao.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconSaomiao = ({ size, color, style: _style, ...rest }) => { +const IconSaomiao: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShaixuan.js b/src/components/iconfont/h5/IconShaixuan.tsx similarity index 75% rename from src/components/iconfont/h5/IconShaixuan.js rename to src/components/iconfont/h5/IconShaixuan.tsx index cc79608..bc0652b 100644 --- a/src/components/iconfont/h5/IconShaixuan.js +++ b/src/components/iconfont/h5/IconShaixuan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShaixuan = ({ size, color, style: _style, ...rest }) => { +const IconShaixuan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShanchusousuoxinxi.js b/src/components/iconfont/h5/IconShanchusousuoxinxi.tsx similarity index 70% rename from src/components/iconfont/h5/IconShanchusousuoxinxi.js rename to src/components/iconfont/h5/IconShanchusousuoxinxi.tsx index b67f566..8deb648 100644 --- a/src/components/iconfont/h5/IconShanchusousuoxinxi.js +++ b/src/components/iconfont/h5/IconShanchusousuoxinxi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShanchusousuoxinxi = ({ size, color, style: _style, ...rest }) => { +const IconShanchusousuoxinxi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShijian.js b/src/components/iconfont/h5/IconShijian.tsx similarity index 64% rename from src/components/iconfont/h5/IconShijian.js rename to src/components/iconfont/h5/IconShijian.tsx index fbb9408..05b5941 100644 --- a/src/components/iconfont/h5/IconShijian.js +++ b/src/components/iconfont/h5/IconShijian.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShijian = ({ size, color, style: _style, ...rest }) => { +const IconShijian: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShouhou.js b/src/components/iconfont/h5/IconShouhou.tsx similarity index 80% rename from src/components/iconfont/h5/IconShouhou.js rename to src/components/iconfont/h5/IconShouhou.tsx index fad885e..ae64641 100644 --- a/src/components/iconfont/h5/IconShouhou.js +++ b/src/components/iconfont/h5/IconShouhou.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShouhou = ({ size, color, style: _style, ...rest }) => { +const IconShouhou: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShouhouzhongxin.js b/src/components/iconfont/h5/IconShouhouzhongxin.tsx similarity index 74% rename from src/components/iconfont/h5/IconShouhouzhongxin.js rename to src/components/iconfont/h5/IconShouhouzhongxin.tsx index 097a48a..ef1ba7e 100644 --- a/src/components/iconfont/h5/IconShouhouzhongxin.js +++ b/src/components/iconfont/h5/IconShouhouzhongxin.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShouhouzhongxin = ({ size, color, style: _style, ...rest }) => { +const IconShouhouzhongxin: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShoukuanliebiao.js b/src/components/iconfont/h5/IconShoukuanliebiao.tsx similarity index 75% rename from src/components/iconfont/h5/IconShoukuanliebiao.js rename to src/components/iconfont/h5/IconShoukuanliebiao.tsx index 58aee55..b75733e 100644 --- a/src/components/iconfont/h5/IconShoukuanliebiao.js +++ b/src/components/iconfont/h5/IconShoukuanliebiao.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShoukuanliebiao = ({ size, color, style: _style, ...rest }) => { +const IconShoukuanliebiao: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShouye.js b/src/components/iconfont/h5/IconShouye.tsx similarity index 73% rename from src/components/iconfont/h5/IconShouye.js rename to src/components/iconfont/h5/IconShouye.tsx index eab00c2..ac89078 100644 --- a/src/components/iconfont/h5/IconShouye.js +++ b/src/components/iconfont/h5/IconShouye.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShouye = ({ size, color, style: _style, ...rest }) => { +const IconShouye: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconShouye1.js b/src/components/iconfont/h5/IconShouye1.tsx similarity index 78% rename from src/components/iconfont/h5/IconShouye1.js rename to src/components/iconfont/h5/IconShouye1.tsx index ccceea2..8936e20 100644 --- a/src/components/iconfont/h5/IconShouye1.js +++ b/src/components/iconfont/h5/IconShouye1.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconShouye1 = ({ size, color, style: _style, ...rest }) => { +const IconShouye1: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconSousuo.js b/src/components/iconfont/h5/IconSousuo.tsx similarity index 72% rename from src/components/iconfont/h5/IconSousuo.js rename to src/components/iconfont/h5/IconSousuo.tsx index 995e4b1..2584f8e 100644 --- a/src/components/iconfont/h5/IconSousuo.js +++ b/src/components/iconfont/h5/IconSousuo.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconSousuo = ({ size, color, style: _style, ...rest }) => { +const IconSousuo: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconSousuofanhui.js b/src/components/iconfont/h5/IconSousuofanhui.tsx similarity index 67% rename from src/components/iconfont/h5/IconSousuofanhui.js rename to src/components/iconfont/h5/IconSousuofanhui.tsx index c6b9d4f..ec4c84f 100644 --- a/src/components/iconfont/h5/IconSousuofanhui.js +++ b/src/components/iconfont/h5/IconSousuofanhui.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconSousuofanhui = ({ size, color, style: _style, ...rest }) => { +const IconSousuofanhui: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconSousuoshanchu.js b/src/components/iconfont/h5/IconSousuoshanchu.tsx similarity index 71% rename from src/components/iconfont/h5/IconSousuoshanchu.js rename to src/components/iconfont/h5/IconSousuoshanchu.tsx index 36f4528..211ee07 100644 --- a/src/components/iconfont/h5/IconSousuoshanchu.js +++ b/src/components/iconfont/h5/IconSousuoshanchu.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconSousuoshanchu = ({ size, color, style: _style, ...rest }) => { +const IconSousuoshanchu: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconTihuoliebiao.js b/src/components/iconfont/h5/IconTihuoliebiao.tsx similarity index 73% rename from src/components/iconfont/h5/IconTihuoliebiao.js rename to src/components/iconfont/h5/IconTihuoliebiao.tsx index e406a31..3514e5b 100644 --- a/src/components/iconfont/h5/IconTihuoliebiao.js +++ b/src/components/iconfont/h5/IconTihuoliebiao.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconTihuoliebiao = ({ size, color, style: _style, ...rest }) => { +const IconTihuoliebiao: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconTishi.js b/src/components/iconfont/h5/IconTishi.tsx similarity index 79% rename from src/components/iconfont/h5/IconTishi.js rename to src/components/iconfont/h5/IconTishi.tsx index b83a12e..d9a5c2d 100644 --- a/src/components/iconfont/h5/IconTishi.js +++ b/src/components/iconfont/h5/IconTishi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconTishi = ({ size, color, style: _style, ...rest }) => { +const IconTishi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconTuikuan.js b/src/components/iconfont/h5/IconTuikuan.tsx similarity index 73% rename from src/components/iconfont/h5/IconTuikuan.js rename to src/components/iconfont/h5/IconTuikuan.tsx index 681871a..d172782 100644 --- a/src/components/iconfont/h5/IconTuikuan.js +++ b/src/components/iconfont/h5/IconTuikuan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconTuikuan = ({ size, color, style: _style, ...rest }) => { +const IconTuikuan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconWeixindenglu.js b/src/components/iconfont/h5/IconWeixindenglu.tsx similarity index 86% rename from src/components/iconfont/h5/IconWeixindenglu.js rename to src/components/iconfont/h5/IconWeixindenglu.tsx index 56f4657..823f524 100644 --- a/src/components/iconfont/h5/IconWeixindenglu.js +++ b/src/components/iconfont/h5/IconWeixindenglu.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconWeixindenglu = ({ size, color, style: _style, ...rest }) => { +const IconWeixindenglu: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconWodekefu.js b/src/components/iconfont/h5/IconWodekefu.tsx similarity index 77% rename from src/components/iconfont/h5/IconWodekefu.js rename to src/components/iconfont/h5/IconWodekefu.tsx index 2b23a1f..4bc158e 100644 --- a/src/components/iconfont/h5/IconWodekefu.js +++ b/src/components/iconfont/h5/IconWodekefu.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconWodekefu = ({ size, color, style: _style, ...rest }) => { +const IconWodekefu: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconWodeshoucang.js b/src/components/iconfont/h5/IconWodeshoucang.tsx similarity index 78% rename from src/components/iconfont/h5/IconWodeshoucang.js rename to src/components/iconfont/h5/IconWodeshoucang.tsx index 4c13ed5..6731198 100644 --- a/src/components/iconfont/h5/IconWodeshoucang.js +++ b/src/components/iconfont/h5/IconWodeshoucang.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconWodeshoucang = ({ size, color, style: _style, ...rest }) => { +const IconWodeshoucang: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconXianxiahuizong.js b/src/components/iconfont/h5/IconXianxiahuizong.tsx similarity index 72% rename from src/components/iconfont/h5/IconXianxiahuizong.js rename to src/components/iconfont/h5/IconXianxiahuizong.tsx index 3a6cc3c..e724484 100644 --- a/src/components/iconfont/h5/IconXianxiahuizong.js +++ b/src/components/iconfont/h5/IconXianxiahuizong.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconXianxiahuizong = ({ size, color, style: _style, ...rest }) => { +const IconXianxiahuizong: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconXiaoshou.js b/src/components/iconfont/h5/IconXiaoshou.tsx similarity index 72% rename from src/components/iconfont/h5/IconXiaoshou.js rename to src/components/iconfont/h5/IconXiaoshou.tsx index cdd6508..cd5490f 100644 --- a/src/components/iconfont/h5/IconXiaoshou.js +++ b/src/components/iconfont/h5/IconXiaoshou.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconXiaoshou = ({ size, color, style: _style, ...rest }) => { +const IconXiaoshou: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconXinzeng.js b/src/components/iconfont/h5/IconXinzeng.tsx similarity index 63% rename from src/components/iconfont/h5/IconXinzeng.js rename to src/components/iconfont/h5/IconXinzeng.tsx index fa37e05..a68b63d 100644 --- a/src/components/iconfont/h5/IconXinzeng.js +++ b/src/components/iconfont/h5/IconXinzeng.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconXinzeng = ({ size, color, style: _style, ...rest }) => { +const IconXinzeng: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYangpinduibi.js b/src/components/iconfont/h5/IconYangpinduibi.tsx similarity index 68% rename from src/components/iconfont/h5/IconYangpinduibi.js rename to src/components/iconfont/h5/IconYangpinduibi.tsx index 6844d9f..64087cf 100644 --- a/src/components/iconfont/h5/IconYangpinduibi.js +++ b/src/components/iconfont/h5/IconYangpinduibi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYangpinduibi = ({ size, color, style: _style, ...rest }) => { +const IconYangpinduibi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYanjing.js b/src/components/iconfont/h5/IconYanjing.tsx similarity index 70% rename from src/components/iconfont/h5/IconYanjing.js rename to src/components/iconfont/h5/IconYanjing.tsx index 85c7c22..5e317ee 100644 --- a/src/components/iconfont/h5/IconYanjing.js +++ b/src/components/iconfont/h5/IconYanjing.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYanjing = ({ size, color, style: _style, ...rest }) => { +const IconYanjing: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYansequyang.js b/src/components/iconfont/h5/IconYansequyang.tsx similarity index 73% rename from src/components/iconfont/h5/IconYansequyang.js rename to src/components/iconfont/h5/IconYansequyang.tsx index 4139fe7..a31cd59 100644 --- a/src/components/iconfont/h5/IconYansequyang.js +++ b/src/components/iconfont/h5/IconYansequyang.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYansequyang = ({ size, color, style: _style, ...rest }) => { +const IconYansequyang: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYaoqingma.js b/src/components/iconfont/h5/IconYaoqingma.tsx similarity index 73% rename from src/components/iconfont/h5/IconYaoqingma.js rename to src/components/iconfont/h5/IconYaoqingma.tsx index aadc7cf..4cf056c 100644 --- a/src/components/iconfont/h5/IconYaoqingma.js +++ b/src/components/iconfont/h5/IconYaoqingma.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYaoqingma = ({ size, color, style: _style, ...rest }) => { +const IconYaoqingma: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYewuyuanqizi.js b/src/components/iconfont/h5/IconYewuyuanqizi.tsx similarity index 62% rename from src/components/iconfont/h5/IconYewuyuanqizi.js rename to src/components/iconfont/h5/IconYewuyuanqizi.tsx index f9925dd..0d556cc 100644 --- a/src/components/iconfont/h5/IconYewuyuanqizi.js +++ b/src/components/iconfont/h5/IconYewuyuanqizi.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYewuyuanqizi = ({ size, color, style: _style, ...rest }) => { +const IconYewuyuanqizi: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYonghuming.js b/src/components/iconfont/h5/IconYonghuming.tsx similarity index 68% rename from src/components/iconfont/h5/IconYonghuming.js rename to src/components/iconfont/h5/IconYonghuming.tsx index 272f2c6..2a5f6d1 100644 --- a/src/components/iconfont/h5/IconYonghuming.js +++ b/src/components/iconfont/h5/IconYonghuming.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYonghuming = ({ size, color, style: _style, ...rest }) => { +const IconYonghuming: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYufukuan.js b/src/components/iconfont/h5/IconYufukuan.tsx similarity index 69% rename from src/components/iconfont/h5/IconYufukuan.js rename to src/components/iconfont/h5/IconYufukuan.tsx index 7f7177a..84bd059 100644 --- a/src/components/iconfont/h5/IconYufukuan.js +++ b/src/components/iconfont/h5/IconYufukuan.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYufukuan = ({ size, color, style: _style, ...rest }) => { +const IconYufukuan: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/IconYuncangkucun.js b/src/components/iconfont/h5/IconYuncangkucun.tsx similarity index 75% rename from src/components/iconfont/h5/IconYuncangkucun.js rename to src/components/iconfont/h5/IconYuncangkucun.tsx index 25db8f7..e7ba6c3 100644 --- a/src/components/iconfont/h5/IconYuncangkucun.js +++ b/src/components/iconfont/h5/IconYuncangkucun.tsx @@ -1,13 +1,19 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { CSSProperties, SVGAttributes, FunctionComponent } from 'react'; import { getIconColor } from './helper'; -const DEFAULT_STYLE = { +interface Props extends Omit, 'color'> { + size?: number; + color?: string | string[]; +} + +const DEFAULT_STYLE: CSSProperties = { display: 'block', }; -const IconYuncangkucun = ({ size, color, style: _style, ...rest }) => { +const IconYuncangkucun: FunctionComponent = ({ size, color, style: _style, ...rest }) => { const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE; return ( diff --git a/src/components/iconfont/h5/helper.js b/src/components/iconfont/h5/helper.js deleted file mode 100644 index b566c4c..0000000 --- a/src/components/iconfont/h5/helper.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable */ - -/** - * @param {string | string[] | undefined} color - * @param {number} index - * @param {string} defaultColor - * @return {string} - */ -export const getIconColor = (color, index, defaultColor) => { - return color - ? ( - typeof color === 'string' - ? color - : color[index] || defaultColor - ) - : defaultColor; -}; diff --git a/src/components/iconfont/h5/helper.ts b/src/components/iconfont/h5/helper.ts new file mode 100644 index 0000000..60d6d71 --- /dev/null +++ b/src/components/iconfont/h5/helper.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ + +export const getIconColor = (color: string | string[] | undefined, index: number, defaultColor: string) => { + return color + ? ( + typeof color === 'string' + ? color + : color[index] || defaultColor + ) + : defaultColor; +}; diff --git a/src/components/iconfont/h5/index.js b/src/components/iconfont/h5/index.tsx similarity index 86% rename from src/components/iconfont/h5/index.js rename to src/components/iconfont/h5/index.tsx index 20c4858..470110e 100644 --- a/src/components/iconfont/h5/index.js +++ b/src/components/iconfont/h5/index.tsx @@ -1,6 +1,8 @@ +/* tslint:disable */ /* eslint-disable */ -import React from 'react'; +import React, { SVGAttributes, FunctionComponent } from 'react'; +import IconLujing from './IconLujing'; import IconJizhumima from './IconJizhumima'; import IconAJizhumima from './IconAJizhumima'; import IconWeixindenglu from './IconWeixindenglu'; @@ -59,6 +61,7 @@ import IconGerenzhongxin from './IconGerenzhongxin'; import IconDingdan from './IconDingdan'; import IconShouye from './IconShouye'; import IconGouwu from './IconGouwu'; +export { default as IconLujing } from './IconLujing'; export { default as IconJizhumima } from './IconJizhumima'; export { default as IconAJizhumima } from './IconAJizhumima'; export { default as IconWeixindenglu } from './IconWeixindenglu'; @@ -118,8 +121,18 @@ export { default as IconDingdan } from './IconDingdan'; export { default as IconShouye } from './IconShouye'; export { default as IconGouwu } from './IconGouwu'; -const IconFont = ({ name, ...rest }) => { +export type IconNames = 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'; + +interface Props extends Omit, 'color'> { + name: IconNames; + size?: number; + color?: string | string[]; +} + +const IconFont: FunctionComponent = ({ name, ...rest }) => { switch (name) { + case 'icon-lujing': + return ; case 'icon-jizhumima': return ; case 'icon-a-jizhumima': diff --git a/src/components/iconfont/index.d.ts b/src/components/iconfont/index.d.ts deleted file mode 100644 index a92822f..0000000 --- a/src/components/iconfont/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable */ -import React, { FunctionComponent } from 'react'; - -interface Props { - name: 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'; - size?: number; - color?: string | string[]; - style?: React.CSSProperties; -} - -declare const IconFont: FunctionComponent; - -export default IconFont; diff --git a/src/components/iconfont/index.h5.js b/src/components/iconfont/index.h5.js deleted file mode 100644 index 80b208b..0000000 --- a/src/components/iconfont/index.h5.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable */ - -import React from 'react'; -import Taro from '@tarojs/taro'; -import Icon from './h5'; - -const IconFont = (props) => { - const { name, size, color, style } = props; - - return ; -}; - -IconFont.defaultProps = { - size: 18, -}; - -export default IconFont; diff --git a/src/components/iconfont/index.h5.tsx b/src/components/iconfont/index.h5.tsx new file mode 100644 index 0000000..6afdfe2 --- /dev/null +++ b/src/components/iconfont/index.h5.tsx @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ + +import React, { FunctionComponent } from 'react'; +import Taro from '@tarojs/taro'; +import Icon from './h5'; + +export type IconNames = 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'; + +interface Props { + name: IconNames; + size?: number; + color?: string | string[]; + style?: React.CSSProperties; +} + +const IconFont: FunctionComponent = (props) => { + const { name, size, color, style } = props; + + return ; +}; + +IconFont.defaultProps = { + size: 18, +}; + +export default IconFont; diff --git a/src/components/iconfont/index.js b/src/components/iconfont/index.js deleted file mode 100644 index 9236f4b..0000000 --- a/src/components/iconfont/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable */ - -const IconFont = () => { - return null; -}; - -export default IconFont; diff --git a/src/components/iconfont/index.tsx b/src/components/iconfont/index.tsx new file mode 100644 index 0000000..36e3baf --- /dev/null +++ b/src/components/iconfont/index.tsx @@ -0,0 +1,19 @@ +/* tslint:disable */ +/* eslint-disable */ + +import React, { FunctionComponent } from 'react'; + +export type IconNames = 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'; + +export interface IconProps { + name: IconNames; + size?: number; + color?: string | string[]; + style?: React.CSSProperties; +} + +const IconFont: FunctionComponent = () => { + return null; +}; + +export default IconFont; diff --git a/src/components/iconfont/index.weapp.js b/src/components/iconfont/index.weapp.js deleted file mode 100644 index 731305b..0000000 --- a/src/components/iconfont/index.weapp.js +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable */ - -import React from 'react'; -import Taro from '@tarojs/taro'; - -const IconFont = (props) => { - const { name, size, color, style } = props; - - return ; -}; - -IconFont.defaultProps = { - size: 18, -}; - -export default IconFont; diff --git a/src/components/iconfont/index.weapp.tsx b/src/components/iconfont/index.weapp.tsx new file mode 100644 index 0000000..e6284d0 --- /dev/null +++ b/src/components/iconfont/index.weapp.tsx @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ + +import React, { FunctionComponent } from 'react'; +import Taro from '@tarojs/taro'; + +export type IconNames = 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'; + +interface Props { + name: IconNames; + size?: number; + color?: string | string[]; + style?: React.CSSProperties; +} + +const IconFont: FunctionComponent = (props) => { + const { name, size, color, style } = props; + + // @ts-ignore + return ; +}; + +IconFont.defaultProps = { + size: 18, +}; + +export default IconFont; diff --git a/src/components/iconfont/weapp/weapp.js b/src/components/iconfont/weapp/weapp.js index 5217936..4a356cf 100644 --- a/src/components/iconfont/weapp/weapp.js +++ b/src/components/iconfont/weapp/weapp.js @@ -1,6 +1,6 @@ Component({ properties: { - // icon-jizhumima | icon-a-jizhumima | icon-weixindenglu | icon-kehuxinxi | icon-yewuyuanqizi | icon-chakanquanbukehu | icon-biyan | icon-bianji | icon-daikuan | icon-cangku | icon-guanlidingdan | icon-mima | icon-guanbi | icon-jianshao | icon-dingwei | icon-saomiao | icon-peihuo | icon-shaixuan | icon-paiming | icon-shanchusousuoxinxi | icon-shijian | icon-sousuo | icon-shouhou | icon-sousuofanhui | icon-sousuoshanchu | icon-tuikuan | icon-tishi | icon-xianxiahuizong | icon-xinzeng | icon-yonghuming | icon-yanjing | icon-yufukuan | icon-wodekefu | icon-dizhi | icon-shouhouzhongxin | icon-wodeshoucang | icon-shoukuanliebiao | icon-madanguanli | icon-qusechazhao | icon-pandiansaoma | icon-yaoqingma | icon-duizhang | icon-tihuoliebiao | icon-yangpinduibi | icon-yansequyang | icon-fahuoliebiao | icon-yuncangkucun | icon-xiaoshou | icon-qianzhicangkucun | icon-lingquseka | icon-gouwu1 | icon-dingdan1 | icon-gerenzhongxin1 | icon-shouye1 | icon-gerenzhongxin | icon-dingdan | icon-shouye | icon-gouwu + // icon-lujing | icon-jizhumima | icon-a-jizhumima | icon-weixindenglu | icon-kehuxinxi | icon-yewuyuanqizi | icon-chakanquanbukehu | icon-biyan | icon-bianji | icon-daikuan | icon-cangku | icon-guanlidingdan | icon-mima | icon-guanbi | icon-jianshao | icon-dingwei | icon-saomiao | icon-peihuo | icon-shaixuan | icon-paiming | icon-shanchusousuoxinxi | icon-shijian | icon-sousuo | icon-shouhou | icon-sousuofanhui | icon-sousuoshanchu | icon-tuikuan | icon-tishi | icon-xianxiahuizong | icon-xinzeng | icon-yonghuming | icon-yanjing | icon-yufukuan | icon-wodekefu | icon-dizhi | icon-shouhouzhongxin | icon-wodeshoucang | icon-shoukuanliebiao | icon-madanguanli | icon-qusechazhao | icon-pandiansaoma | icon-yaoqingma | icon-duizhang | icon-tihuoliebiao | icon-yangpinduibi | icon-yansequyang | icon-fahuoliebiao | icon-yuncangkucun | icon-xiaoshou | icon-qianzhicangkucun | icon-lingquseka | icon-gouwu1 | icon-dingdan1 | icon-gerenzhongxin1 | icon-shouye1 | icon-gerenzhongxin | icon-dingdan | icon-shouye | icon-gouwu name: { type: String, }, diff --git a/src/components/iconfont/weapp/weapp.wxml b/src/components/iconfont/weapp/weapp.wxml index e28ef75..9df2807 100644 --- a/src/components/iconfont/weapp/weapp.wxml +++ b/src/components/iconfont/weapp/weapp.wxml @@ -1,3 +1,6 @@ + + + diff --git a/src/pages/order/components/PayPopup/index.tsx b/src/pages/order/components/PayPopup/index.tsx index 232d526..1b005f4 100644 --- a/src/pages/order/components/PayPopup/index.tsx +++ b/src/pages/order/components/PayPopup/index.tsx @@ -1,174 +1,156 @@ - import { ScrollView, View, Image } from '@tarojs/components' import { memo, useCallback, useEffect, useMemo, useState, useRef } from 'react' import styles from './index.module.scss' import classnames from 'classnames' -import BottomBtns from '@/components/BottomBtns' -import { formatPriceDiv, formatImgUrl } from '@/common/fotmat' +import { formatPriceDiv, formatImgUrl } from '@/common/format' import Taro from '@tarojs/taro' import Popup from '@/components/popup' import useCheckAuthorize from '@/use/useCheckAuthorize' import { alert } from '@/common/common' interface Props { - showPopup: true | false, - popupClose?: () => void, - obj: { - wait_pay_amount?: number | string, - actual_amount?: number | string, - total_sale_price?: number | string, - should_collect_order_id?: number | string, - pre_collect_order_id?: number | string, - status?: number | string, - }, - showSide?: boolean, - list?: any[], - clickItem?: (any) => void, - handsurePay?: (any) => void, - title: string, - picUrl?: string + showPopup: true | false + popupClose?: () => void + obj: { + wait_pay_amount?: number | string + actual_amount?: number | string + total_sale_price?: number | string + should_collect_order_id?: number | string + pre_collect_order_id?: number | string + status?: number | string + } + showSide?: boolean + list?: any[] + clickItem?: (any) => void + handsurePay?: (any) => void + title: string + picUrl?: string } export default memo((props: Props) => { - const { - showSide = true, - showPopup = false, - popupClose, - obj = { - wait_pay_amount: '', - actual_amount: '', - total_sale_price: '' - }, - clickItem, - handsurePay, - list = [], - title = '待支付款项', - picUrl = '' - } = props + const { + showSide = true, + showPopup = false, + popupClose, + obj = { + wait_pay_amount: '', + actual_amount: '', + total_sale_price: '', + }, + clickItem, + handsurePay, + list = [], + title = '待支付款项', + picUrl = '', + } = props - const fileData = useRef({ - filePath: '', - base64: '', + const fileData = useRef({ + filePath: '', + base64: '', + }) + + //预览图片 + const showImage = () => { + const time = new Date().valueOf() + const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(picUrl) || [] + let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format + fileData.current.filePath = filePath + fileData.current.base64 = bodyData + const save = Taro.getFileSystemManager() + save.writeFile({ + filePath: fileData.current.filePath, + data: fileData.current.base64, + encoding: 'base64', }) + Taro.previewImage({ + current: fileData.current.filePath, // 当前显示 + urls: [fileData.current.filePath], // 需要预览的图片http链接列表 + }) + } - //预览图片 - const showImage = () => { - const time = new Date().valueOf() - const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(picUrl) || [] - let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format - fileData.current.filePath = filePath - fileData.current.base64 = bodyData - const save = Taro.getFileSystemManager() - save.writeFile({ - filePath: fileData.current.filePath, - data: fileData.current.base64, - encoding: 'base64', - }) - Taro.previewImage({ - current: fileData.current.filePath, // 当前显示 - urls: [fileData.current.filePath], // 需要预览的图片http链接列表 - }) - } + //检查是否开启保存图片权限 + const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' }) + const saveImageCheck = async () => { + const res = await check() + res && saveImage() + } + //保存图片 + const saveImage = () => { + alert.loading('正在保存图片') + Taro.saveImageToPhotosAlbum({ + filePath: fileData.current.filePath, + success: function () { + alert.success('图片保存成功') + }, + fail: function (err) { + console.log('err::', err) + }, + }) + } - //检查是否开启保存图片权限 - const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' }) - const saveImageCheck = async () => { - const res = await check() - res && saveImage() - } - - //保存图片 - const saveImage = () => { - alert.loading('正在保存图片') - Taro.saveImageToPhotosAlbum({ - filePath: fileData.current.filePath, - success: function () { - alert.success('图片保存成功') - }, - fail: function (err) { - console.log('err::', err) - }, - }) - } - - return ( - - popupClose?.()}> - { - showSide && - - - ¥{formatPriceDiv(obj.wait_pay_amount)} - - - - 订单金额 - - - ¥{formatPriceDiv(obj.total_sale_price)} - - - - - 已付金额 - - - ¥{formatPriceDiv(obj.actual_amount)} - - - - { - list.map((item, index) => { - return ( - clickItem?.(item)}> - - - - - - {item.name} - { - item.fonts && {item.fonts}{ - item.money !== "" ? "¥" : "" - }{item.money} - } - - - { - item.name !== '扫码支付' && - - - - } - { - item.name === '扫码支付' && - - } - - ) - }) - } - + return ( + + popupClose?.()}> + {showSide && ( + + ¥{formatPriceDiv(obj.wait_pay_amount)} + + 订单金额 + ¥{formatPriceDiv(obj.total_sale_price)} + + + 已付金额 + ¥{formatPriceDiv(obj.actual_amount)} + + + {list.map((item, index) => { + return ( + clickItem?.(item)}> + + + - - } - { - showSide && handsurePay?.(props?.obj)}>确认交易 - } - { - !showSide && - - - showImage()}> + + {item.name} + {item.fonts && ( + + {item.fonts} + {item.money !== '' ? '¥' : ''} + {item.money} - - - } - { - !showSide && saveImageCheck()}>保存图片 - } - - - ) -}) \ No newline at end of file + )} + + + {item.name !== '扫码支付' && ( + + + + )} + {item.name === '扫码支付' && } + + ) + })} + + )} + {showSide && ( + handsurePay?.(props?.obj)}> + 确认交易 + + )} + {!showSide && ( + + + showImage()}> + + + )} + {!showSide && ( + saveImageCheck()}> + 保存图片 + + )} + + + ) +}) diff --git a/src/pages/order/components/itemList/index.tsx b/src/pages/order/components/itemList/index.tsx index 733f357..22695f1 100644 --- a/src/pages/order/components/itemList/index.tsx +++ b/src/pages/order/components/itemList/index.tsx @@ -3,78 +3,100 @@ import { memo, useCallback, useEffect, useMemo, useState } from 'react' import styles from './index.module.scss' import classnames from 'classnames' import BottomBtns from '@/components/BottomBtns' -import { formatPriceDiv } from '@/common/fotmat' +import { formatPriceDiv } from '@/common/format' import Taro from '@tarojs/taro' interface propsObj { - obj: any, - cancle?: (arg: any, obj: any) => void, - nextBuy?: (arg: any, obj: any) => void, - toPay?: (arg: any, obj: any) => void + obj: any + cancle?: (arg: any, obj: any) => void + nextBuy?: (arg: any, obj: any) => void + toPay?: (arg: any, obj: any) => void } - export default memo((props: propsObj) => { - const navTo = (e) => { - Taro.navigateTo({ - url: '/pages/orderDetails/index?id=' + props?.obj?.id - }) - } + const navTo = (e) => { + Taro.navigateTo({ + url: '/pages/orderDetails/index?id=' + props?.obj?.id, + }) + } - - return ( - navTo(e)}> - - 单号:{props?.obj?.order_no} - {props?.obj?.status_name} - - {props?.obj?.purchaser_name} - - - - 颜色 ({props?.obj?.total_colors}) - - - - - {props?.obj?.product_list[0]?.code} {props?.obj?.product_list[0]?.name} - {props?.obj?.sale_mode === 0 ? '大货' : props?.obj?.sale_mode === 1 ? '剪版' : '散剪'} - - {props?.obj?.shipment_mode_name} - - - {props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name} - x{props?.obj?.sale_mode === 0 ? props?.obj?.product_list[0]?.product_colors[0]?.roll : props?.obj?.product_list[0]?.product_colors[0]?.length / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'} - ¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/kg - - { - props?.obj?.product_list[0]?.product_colors?.length > 1 && <> - - {props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name} - x{props?.obj?.sale_mode === 0 ? props?.obj?.product_list[0]?.product_colors[1]?.roll : props?.obj?.product_list[0]?.product_colors[1]?.length / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'} - ¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/kg - - - } - - - - - 布料信息: - {props?.obj?.total_fabrics} 种面料,{props?.obj?.total_colors} 种颜色,共 {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'} - - - 预估金额: - ¥{formatPriceDiv(props?.obj?.estimate_amount)} - - - props?.cancle?.(e, props?.obj)} - nextBuy={(e) => props?.nextBuy?.(e, props?.obj)} - toPay={(e) => props?.toPay?.(e, props?.obj)} - > - + return ( + navTo(e)}> + + 单号:{props?.obj?.order_no} + {props?.obj?.status_name} + + {props?.obj?.purchaser_name} + + + + 颜色 ({props?.obj?.total_colors}) - ) -}) \ No newline at end of file + + + + + {props?.obj?.product_list[0]?.code} {props?.obj?.product_list[0]?.name} + + {props?.obj?.sale_mode === 0 ? '大货' : props?.obj?.sale_mode === 1 ? '剪版' : '散剪'} + + {props?.obj?.shipment_mode_name} + + + + {props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name} + + + x + {props?.obj?.sale_mode === 0 + ? props?.obj?.product_list[0]?.product_colors[0]?.roll + : props?.obj?.product_list[0]?.product_colors[0]?.length / 100}{' '} + {props?.obj?.sale_mode === 0 ? '条' : 'm'} + + ¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/kg + + {props?.obj?.product_list[0]?.product_colors?.length > 1 && ( + <> + + + {props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name} + + + x + {props?.obj?.sale_mode === 0 + ? props?.obj?.product_list[0]?.product_colors[1]?.roll + : props?.obj?.product_list[0]?.product_colors[1]?.length / 100}{' '} + {props?.obj?.sale_mode === 0 ? '条' : 'm'} + + ¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/kg + + + )} + + + + + 布料信息: + + {props?.obj?.total_fabrics} 种面料,{props?.obj?.total_colors} 种颜色,共{' '} + {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'} + + + + 预估金额: + ¥{formatPriceDiv(props?.obj?.estimate_amount)} + + + props?.cancle?.(e, props?.obj)} + nextBuy={(e) => props?.nextBuy?.(e, props?.obj)} + toPay={(e) => props?.toPay?.(e, props?.obj)}> + + + ) +}) diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx index 907e626..4e97588 100644 --- a/src/pages/order/index.tsx +++ b/src/pages/order/index.tsx @@ -1,11 +1,11 @@ import { View, Input, Button } from '@tarojs/components' -import { useCallback, useEffect, useMemo, useRef, useState, } from 'react' +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { mpenumsaleorderstatus, OrderListApi } from '@/api/order' import OrderStatusList from './components/orderStatusList' import Search from '@/components/search' import { dataLoadingStatus, getFilterData } from '@/common/util' -import styles from "./index.module.scss" -import classnames from "classnames"; +import styles from './index.module.scss' +import classnames from 'classnames' import Popup from '@/components/popup' import InfiniteScroll from '@/components/infiniteScroll' import Taro, { faceVerifyForPay, useDidShow } from '@tarojs/taro' @@ -17,10 +17,10 @@ import { orderPaymentpreCollectOrderorderPaymentMethodInfo, orderPaymentorderPaymentSubmission, orderPaymentpreCollectOrderorderPaymentSubmission, - GetPayCode + GetPayCode, } from '@/api/order' import PayPopup from './components/PayPopup' -import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/fotmat' +import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format' export default () => { //页码和页数 @@ -37,16 +37,13 @@ export default () => { const getOrderList = async () => { let res = await listFetchData({ ...getFilterData(searchField), - ...getFilterData(searchObj) + ...getFilterData(searchObj), }) setOrderData((e) => ({ ...e, list: res.data?.list, total: res.data?.total })) setshowPopup(false) setRefresherTriggeredStatus(() => false) } - - - //列表下拉刷新 const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false) const getRefresherRefresh = async () => { @@ -56,7 +53,10 @@ export default () => { } //数据加载状态 const statusMore = useMemo(() => { - console.log({ list: orderData.list, total: orderData.total, status: orderState.loading }, '{ list: orderData.list, total: orderData.total, status: orderState.loading }') + console.log( + { list: orderData.list, total: orderData.total, status: orderState.loading }, + '{ list: orderData.list, total: orderData.total, status: orderState.loading }', + ) return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading }) }, [orderData, orderState]) @@ -108,12 +108,10 @@ export default () => { setshowPopup(false) } - useDidShow(() => { - //获取选择的客户 - let pages = Taro.getCurrentPages(); - let currPage = pages[pages.length - 1]; // 获取当前页面 + let pages = Taro.getCurrentPages() + let currPage = pages[pages.length - 1] // 获取当前页面 console.log(currPage.data, '8888') setsearchObj((e) => ({ @@ -126,12 +124,12 @@ export default () => { }) interface filterObj { - purchaser_id?: string | number, - clientName?: string, - sale_user_id?: string | number, - saleuserName?: string, - orderNo?: string | undefined, - sale_mode?: Number | undefined, + purchaser_id?: string | number + clientName?: string + sale_user_id?: string | number + saleuserName?: string + orderNo?: string | undefined + sale_mode?: Number | undefined shipment_mode?: Number | undefined } @@ -143,17 +141,17 @@ export default () => { saleuserName: '', orderNo: '', sale_mode: undefined, - shipment_mode: undefined + shipment_mode: undefined, }) // 跳转选择客户 const navTo = (index) => { if (index === 1) { Taro.navigateTo({ - url: '/pages/customerPage/index?clientId=' + searchObj?.purchaser_id + url: '/pages/customerPage/index?clientId=' + searchObj?.purchaser_id, }) } else { Taro.navigateTo({ - url: '/pages/saleuserPage/index?saleuserId=' + searchObj?.sale_user_id + url: '/pages/saleuserPage/index?saleuserId=' + searchObj?.sale_user_id, }) } } @@ -163,10 +161,15 @@ export default () => { } //订单类型 - const [modeList, setModeList] = useState([{ id: -1, name: '不限' }, { id: 0, name: '大货' }, { id: 1, name: '剪版' }, { id: 2, name: '散剪' }]) + const [modeList, setModeList] = useState([ + { id: -1, name: '不限' }, + { id: 0, name: '大货' }, + { id: 1, name: '剪版' }, + { id: 2, name: '散剪' }, + ]) //选择订单类型 const handCheckMode = (item) => { - modeList.map(it => { + modeList.map((it) => { if (it.id === item.id) { it.checked = true } else { @@ -179,10 +182,14 @@ export default () => { } ///发货方式类型 - const [deliveryList, setdeliveryList] = useState([{ id: -1, name: '不限' }, { id: 1, name: '自提' }, { id: 2, name: '物流' }]) + const [deliveryList, setdeliveryList] = useState([ + { id: -1, name: '不限' }, + { id: 1, name: '自提' }, + { id: 2, name: '物流' }, + ]) //选择发货方式类型 const handCheckDelivery = (item) => { - deliveryList.map(it => { + deliveryList.map((it) => { if (it.id === item.id) { it.checked = true } else { @@ -195,7 +202,8 @@ export default () => { } //是否不允许确认筛选 const isDisabled = useMemo(() => { - if (searchObj.clientName !== '' || + if ( + searchObj.clientName !== '' || searchObj.orderNo !== '' || searchObj.saleuserName !== '' || searchObj.sale_mode !== undefined || @@ -216,7 +224,7 @@ export default () => { saleuserName: '', orderNo: '', sale_mode: undefined, - shipment_mode: undefined + shipment_mode: undefined, }) } //确认筛选 @@ -230,9 +238,9 @@ export default () => { setsearchObj((e) => ({ ...e, orderNo: res.result })) }, fail(res) { - console.log(res); + console.log(res) }, - }); + }) } useEffect(() => { @@ -242,68 +250,68 @@ export default () => { const { fetchData: cancelFetch } = mpsaleOrdercancel() //取消订单 const cancle = async (e, item) => { - e.stopPropagation(); + e.stopPropagation() Taro.showModal({ - content: "确定要取消吗?", - confirmText: "确认", - cancelText: "取消", + content: '确定要取消吗?', + confirmText: '确认', + cancelText: '取消', success: async function (res) { if (res.confirm) { Taro.showLoading({ title: '请稍等...', - mask: true + mask: true, }) const res = await cancelFetch({ id: item.id }) if (res.msg === 'success') { Taro.showToast({ - title: '取消成功' + title: '取消成功', }) Taro.hideLoading() getOrderList() } else { Taro.showToast({ title: res.msg, - icon: 'error' + icon: 'error', }) } } - } + }, }) } //再次购买 const { fetchData: buyFetch } = mpshoppingCartproductColorlist() const nextBuy = async (e, item) => { - e.stopPropagation(); + e.stopPropagation() Taro.showLoading({ title: '请稍等...', - mask: true + mask: true, }) let arr: any = [] - item.product_list.forEach(item => { - item.product_colors.forEach(it => { + item.product_list.forEach((item) => { + item.product_colors.forEach((it) => { arr.push({ length: it.length, roll: it.roll, - product_color_id: it.id + product_color_id: it.id, }) }) }) let query = { purchaser_id: item.purchaser_id, sale_mode: item.sale_mode, - color_list: arr + color_list: arr, } const res = await buyFetch(query) if (res.msg === 'success') { Taro.showToast({ - title: '加入购物车成功!' + title: '加入购物车成功!', }) Taro.hideLoading() getOrderList() } else { Taro.showToast({ title: res.msg, - icon: 'error' + icon: 'error', }) } } @@ -314,103 +322,97 @@ export default () => { const [payList, setPayList] = useState([ { id: 2, - iconfont: "icon-xianxiahuizong", - name: "预存款", - fonts: "可用额度 ", - money: "", + iconfont: 'icon-xianxiahuizong', + name: '预存款', + fonts: '可用额度 ', + money: '', isCheck: false, }, { id: 5, - iconfont: "icon-xianxiahuizong", - name: "货到付款", - fonts: "发货后3天内付款", + iconfont: 'icon-xianxiahuizong', + name: '货到付款', + fonts: '发货后3天内付款', isCheck: false, - money: "", + money: '', }, { id: 3, - iconfont: "icon-xianxiahuizong", - name: "x天账期", - fonts: "可用额度 ", - money: "", + iconfont: 'icon-xianxiahuizong', + name: 'x天账期', + fonts: '可用额度 ', + money: '', isCheck: false, }, { - iconfont: "icon-saomiao", - name: "扫码支付", + iconfont: 'icon-saomiao', + name: '扫码支付', }, ]) const toPay = async (e, item) => { - e.stopPropagation(); + e.stopPropagation() setItemObj(item) if (item.status !== 10) { let res = await infoOneFetch({ id: item.should_collect_order_id }) payList.map((item) => { if (item.id === 3) { - item.name = `${res.data.account_period}天账期`; - item.fonts = `可用额度${formatPriceDiv( - res.data.account_period_credit_available_line - ).toLocaleString()}`; + item.name = `${res.data.account_period}天账期` + item.fonts = `可用额度${formatPriceDiv(res.data.account_period_credit_available_line).toLocaleString()}` } if (item.id === 2) { - item.fonts = `可用额度${formatPriceDiv( - res.data.advance_deposit_balance - ).toLocaleString()}`; + item.fonts = `可用额度${formatPriceDiv(res.data.advance_deposit_balance).toLocaleString()}` } - return item; - }); + return item + }) setPayList([...payList]) if (item.is_shipper_picks_up) { const obj = payList.filter((item) => { - return item.id === 6; - }); - console.log(obj, "456456"); + return item.id === 6 + }) + console.log(obj, '456456') if (obj.length === 0) { payList.unshift({ id: 6, - iconfont: "icon-xianxiahuizong", - name: "货主自提", - fonts: "", - money: "", + iconfont: 'icon-xianxiahuizong', + name: '货主自提', + fonts: '', + money: '', isCheck: false, - }); + }) setPayList([...payList]) } } } else { let res = await infoTwoFetch({ id: item.pre_collect_order_id }) - const arr: any = []; + const arr: any = [] arr.push( { id: 2, - iconfont: "icon-xianxiahuizong", - name: "预存款", - fonts: `可用额度${formatPriceDiv( - res.data.advance_deposit_balance - ).toLocaleString()}`, - money: "", + iconfont: 'icon-xianxiahuizong', + name: '预存款', + fonts: `可用额度${formatPriceDiv(res.data.advance_deposit_balance).toLocaleString()}`, + money: '', isCheck: false, }, { - iconfont: "icon-saomiao", - name: "扫码支付", - } - ); + iconfont: 'icon-saomiao', + name: '扫码支付', + }, + ) if (item.is_shipper_picks_up) { const obj = arr.filter((item) => { - return item.id === 6; - }); + return item.id === 6 + }) if (obj.length === 0) { arr.unshift({ id: 6, - iconfont: "icon-xianxiahuizong", - name: "货主自提", - fonts: "", - money: "", + iconfont: 'icon-xianxiahuizong', + name: '货主自提', + fonts: '', + money: '', isCheck: false, - }); + }) } } setPayList([...arr]) @@ -421,8 +423,10 @@ export default () => { //选择支付方式 const clickItem = (item) => { - if (item.name === '扫码支付') { handScanpay() } - payList.map(it => { + if (item.name === '扫码支付') { + handScanpay() + } + payList.map((it) => { if (item.id === it.id) { it.checked = true } else { @@ -433,14 +437,13 @@ export default () => { setPayList([...payList]) } - //扫码支付 const [showSide, setShowSide] = useState(true) const [title, setTitle] = useState('') const [picUrl, setPicUrl] = useState('') const { fetchData: payFetch } = GetPayCode() const handScanpay = async () => { - const list: any = []; + const list: any = [] itemObj.product_list.forEach((item) => { item.product_colors.forEach((it) => { list.push({ @@ -451,18 +454,15 @@ export default () => { num: it.roll.toString(), weight: formatWeightDiv(it.actual_weight).toString(), sale_price: (it.sale_price / 100).toString(), - total_price: - it.actual_amount !== 0 - ? (it.actual_amount / 100).toString() - : (it.estimate_amount / 100).toString(), + total_price: it.actual_amount !== 0 ? (it.actual_amount / 100).toString() : (it.estimate_amount / 100).toString(), length: (it.length / 100).toString(), weight_error: formatWeightDiv(it.weight_error).toString(), - }); - }); - }); + }) + }) + }) const query = { list: list, - title: "面料销售电子确认单", + title: '面料销售电子确认单', show_qrcode: true, show_barcode: true, show_wait_pay_amount: true, @@ -482,14 +482,10 @@ export default () => { client: itemObj.purchaser_name, phone: itemObj.target_user_phone, order_total_length: (itemObj.total_number / 100).toString(), - order_total_price: ( - itemObj.bill_total_sale_price / 100 - ).toString(), - total_weight_error_discount: ( - itemObj.total_weight_error_discount / 100 - ).toString(), + order_total_price: (itemObj.bill_total_sale_price / 100).toString(), + total_weight_error_discount: (itemObj.total_weight_error_discount / 100).toString(), order_total_num: itemObj.total_number.toString(), - qrcode: "", + qrcode: '', order_total_weight: (itemObj.total_weight / 1000).toString(), estimate_amount: (itemObj.estimate_amount / 100).toString(), total_sale_price: (itemObj.total_sale_price / 100).toString(), @@ -497,10 +493,8 @@ export default () => { show_total_weight_error_discount: true, actual_amount: (itemObj.payment_amount / 100).toString(), wait_pay_amount: (itemObj.wait_pay_amount / 100).toString(), - order_total_weight_error: ( - itemObj.total_weight_error / 1000 - ).toString(), - }; + order_total_weight_error: (itemObj.total_weight_error / 1000).toString(), + } const res = await payFetch(query) if (res.data) { console.log(res.data.base64) @@ -510,38 +504,40 @@ export default () => { } } - //确认交易 const { fetchData: payOneFetch } = orderPaymentorderPaymentSubmission() const { fetchData: payTwoFetch } = orderPaymentpreCollectOrderorderPaymentSubmission() const handsurePay = (obj) => { let arr: any = [] // if (obj.status !== 10) { - arr = payList.filter(item => { + arr = payList.filter((item) => { return item.checked }) if (!arr.length) { Taro.showToast({ title: '请选择后再提交', - icon: 'error' + icon: 'error', }) return false } Taro.showModal({ - content: "确定交易吗?", - confirmText: "确认", - cancelText: "取消", + content: '确定交易吗?', + confirmText: '确认', + cancelText: '取消', success: async function (res) { if (res.confirm) { Taro.showLoading({ title: '请稍等...', - mask: true + mask: true, }) - const restult = await obj.status !== 10 ? payOneFetch({ id: Number(obj.should_collect_order_id), payment_method: Number(arr[0]?.id) }) : payTwoFetch({ id: Number(obj.pre_collect_order_id), payment_method: Number(arr[0]?.id) }) + const restult = + (await obj.status) !== 10 + ? payOneFetch({ id: Number(obj.should_collect_order_id), payment_method: Number(arr[0]?.id) }) + : payTwoFetch({ id: Number(obj.pre_collect_order_id), payment_method: Number(arr[0]?.id) }) if (restult?.msg === 'success') { Taro.showToast({ - title: '交易成功' + title: '交易成功', }) Taro.hideLoading() setShowPay(false) @@ -549,12 +545,11 @@ export default () => { } else { Taro.showToast({ title: restult?.msg, - icon: 'error' + icon: 'error', }) } } - - } + }, }) // } @@ -566,14 +561,14 @@ export default () => { return ( - + showSelctPopup()}> 筛选 - + @@ -591,8 +586,7 @@ export default () => { key={index} cancle={(e, item) => cancle(e, item)} nextBuy={(e, item) => nextBuy(e, item)} - toPay={(e, item) => toPay(e, item)} - > + toPay={(e, item) => toPay(e, item)}> ) })} @@ -620,41 +614,76 @@ export default () => { 订单单号 - { handInput(e) }} placeholderStyle='color:#000000; font-size:26rpx' className={styles.orderInput} value={searchObj.orderNo} placeholder={'请输入或扫描条形码'}> - { handScan() }}> + { + handInput(e) + }} + placeholderStyle='color:#000000; font-size:26rpx' + className={styles.orderInput} + value={searchObj.orderNo} + placeholder={'请输入或扫描条形码'}> + { + handScan() + }}> 订单类型 - { - modeList.map((item, index) => { - return ( - { handCheckMode(item) }} className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name} - ) - }) - } + {modeList.map((item, index) => { + return ( + { + handCheckMode(item) + }} + className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)} + key={index}> + {item.name} + + ) + })} 发货方式 - { - deliveryList.map((item, index) => { - return ( - { handCheckDelivery(item) }} className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name} - ) - }) - } + {deliveryList.map((item, index) => { + return ( + { + handCheckDelivery(item) + }} + className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)} + key={index}> + {item.name} + + ) + })} {isDisabled} - - - + + {/* */} @@ -668,8 +697,7 @@ export default () => { handsurePay={(obj) => handsurePay(obj)} showSide={showSide} title={title} - picUrl={picUrl} - > - + picUrl={picUrl}> + ) } diff --git a/src/styles/iconfont.scss b/src/styles/iconfont.scss index 0525f3a..c49b106 100644 --- a/src/styles/iconfont.scss +++ b/src/styles/iconfont.scss @@ -1,9 +1,6 @@ -/* CDN 服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */ @font-face { - font-family: 'iconfont'; - /* Project id 3619513 */ - src: url('iconfont.ttf?t=1663065236955') format('truetype'); - + font-family: "iconfont"; /* Project id 3619513 */ + src: url('/src/styles/iconfont.ttf?t=1663134774880') format('truetype'); } .iconfont { @@ -18,6 +15,22 @@ content: "\e63e"; } +.icon-jizhumima:before { + content: "\e63c"; +} + +.icon-a-jizhumima:before { + content: "\e63d"; +} + +.icon-weixindenglu:before { + content: "\e63b"; +} + +.icon-kehuxinxi:before { + content: "\e63a"; +} + .icon-yewuyuanqizi:before { content: "\e639"; } @@ -232,4 +245,5 @@ .icon-gouwu:before { content: "\e607"; -} \ No newline at end of file +} + diff --git a/src/styles/iconfont.ttf b/src/styles/iconfont.ttf index 049f955e0709f9957fdc3b9ada042b3f7975c69c..3363df12c7d249595cd5683e58eacaaaa92d2987 100644 GIT binary patch delta 46 tcmZq3Xvmll$Q)6dIWc6a^yDKm