分类筛选完成
This commit is contained in:
@@ -44,7 +44,7 @@ $am-ms: 200ms;
|
||||
.common_close_btn_icon{
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
.drawer_container_active{
|
||||
|
||||
@@ -4,11 +4,11 @@ import classnames from "classnames";
|
||||
import { memo, ReactNode, useMemo } from "react";
|
||||
import CloseBtnIcon from "@/components/closeBtn"
|
||||
|
||||
interface Params {
|
||||
export interface Params {
|
||||
title?: string,
|
||||
show?: false|true,
|
||||
showTitle?: false|true,
|
||||
onClose?:(boolean) => void,
|
||||
onClose?:() => void,
|
||||
children?: ReactNode,
|
||||
IconButton?: ReactNode,
|
||||
showIconButton?: false|true,
|
||||
@@ -32,7 +32,7 @@ export default memo((
|
||||
<View catchMove={true} className={`${style.drawer} ${show?style.drawer_active:''}` }>
|
||||
<View
|
||||
className={classnames(style.drawer_mask, {[style.drawer_mask_active]: show})}
|
||||
onClick={() => onClose?.(false)}
|
||||
onClick={() => onClose?.()}
|
||||
>
|
||||
<View
|
||||
className={classnames(style.drawer_container, style['drawer_container_'+position], {[style.drawer_container_active]: show})}
|
||||
@@ -40,7 +40,7 @@ export default memo((
|
||||
>
|
||||
{showTitle&&<View className={style.drawer_container_title}>{title}</View>}
|
||||
{showIconButton&&<View className={style.common_close_btn_icon}>
|
||||
<CloseBtnIcon onClose={() => onClose?.(false)}/>
|
||||
<CloseBtnIcon onClose={() => onClose?.()}/>
|
||||
</View>}
|
||||
|
||||
<View className={style.drawer_container_context}>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Image, Swiper, SwiperItem, View } from "@tarojs/components"
|
||||
import { goLink } from "@/common/common"
|
||||
import Taro from "@tarojs/taro"
|
||||
import styles from './index.module.scss'
|
||||
|
||||
@@ -19,12 +20,7 @@ export default (props:params) => {
|
||||
id:1
|
||||
}
|
||||
]
|
||||
const goLink = (item) => {
|
||||
swiperOnClick?.(item)
|
||||
Taro.navigateTo({
|
||||
url:'/pages/search/index'
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.swiper_con} style={style}>
|
||||
<Swiper
|
||||
@@ -37,7 +33,7 @@ export default (props:params) => {
|
||||
{
|
||||
list.map(item => {
|
||||
return <SwiperItem key={item.id}>
|
||||
<View className={styles.image_item} onClick={() => goLink(item)}>
|
||||
<View className={styles.image_item} onClick={() => goLink(`/pages/classList/index?id=${item.id}`)}>
|
||||
<Image mode="aspectFill" src={item.img}></Image>
|
||||
</View>
|
||||
</SwiperItem>
|
||||
|
||||
Reference in New Issue
Block a user