diff --git a/src/components/svgIconfont/index.module.scss b/src/components/svgIconfont/index.module.scss new file mode 100644 index 0000000..050c4d9 --- /dev/null +++ b/src/components/svgIconfont/index.module.scss @@ -0,0 +1,3 @@ +.svg { + display: flex; +} diff --git a/src/components/svgIconfont/index.tsx b/src/components/svgIconfont/index.tsx new file mode 100644 index 0000000..2dff170 --- /dev/null +++ b/src/components/svgIconfont/index.tsx @@ -0,0 +1,25 @@ +import { View } from '@tarojs/components' +import classNames from 'classnames' +import styles from './index.module.scss' + +interface Pram { + name: string + style?: object +} +function SvgIcon(params: Pram) { + const { name = '', style } = params + return ( + + + + + + + + + + + + ) +} +export default SvgIcon diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx index d5d9b47..855a9cd 100644 --- a/src/pages/user/index.tsx +++ b/src/pages/user/index.tsx @@ -10,6 +10,7 @@ import { formatImgUrl, formatPriceDiv } from '@/common/fotmat' import { userassets, userorderStatistics } from '@/api/mine' import useLogin from '@/use/useLogin' import IconFont from '@/components/iconfont/iconfont' +import SvgIconfont from '@/components/svgIconfont' import MoveBtn from '@/components/moveBtn' import { BASE_URL } from '@/common/constant' @@ -58,7 +59,7 @@ export default () => { const menuList = [ { label: '地址管理', icon: 'icon-dizhiguanli', callback: () => goLink('/pages/addressManager/index') }, - { label: '码单管理', icon: 'icon-yanseduibi', callback: () => goLink('/pages/weightList/index') }, + { label: '码单管理', icon: 'icon-mdgl', icon_status: 'local', callback: () => goLink('/pages/weightList/index') }, { label: '颜色对比', icon: 'icon-yanseduibi', callback: () => goLink('/pages/sampleComparison/index') }, { label: '我的客服', icon: 'icon-wodekefu', text: '7x24小时服务', callback: () => (set_customer_service_show(true)) }, ] @@ -166,7 +167,7 @@ export default () => { {menuList.map((item, index) => { return - + {item.icon_status != 'local' ? : } {item.label} diff --git a/src/styles/svg.scss b/src/styles/svg.scss index c8b5570..9246735 100644 --- a/src/styles/svg.scss +++ b/src/styles/svg.scss @@ -6,7 +6,6 @@ format('woff'); font-weight: normal; font-style: normal; - font-display: swap; } [class^='icon-'], [class*=' icon-'] {