✨ feat:菜单组件暴露ref方法出去
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { View } from '@tarojs/components'
|
||||
import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode } from 'react'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro';
|
||||
import Popup from '@/components/popup'
|
||||
import { debounce } from '@/common/util'
|
||||
import { alert } from '@/common/common'
|
||||
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import DropDownItem from '@/components/dropDown-item'
|
||||
|
||||
|
||||
export default memo(() => {
|
||||
|
||||
const DropDownItemRef = useRef<any>()
|
||||
const close = () => {
|
||||
DropDownItemRef.current.closePopup()
|
||||
}
|
||||
return (
|
||||
<DropDownItem ref={DropDownItemRef} title={'全部标签'} value={-1} activeColor='#337fff' hasBottomBtn={true}>
|
||||
<View className={styles.mainBox}>
|
||||
<View onClick={() => close()}>111</View>
|
||||
</View>
|
||||
</DropDownItem>
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '客户列表',
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
.mainBox {
|
||||
overflow: hidden;
|
||||
|
||||
.menuBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { View } from '@tarojs/components'
|
||||
import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode } from 'react'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro';
|
||||
import Popup from '@/components/popup'
|
||||
import { debounce } from '@/common/util'
|
||||
import { alert } from '@/common/common'
|
||||
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import Tag from './components/Tag';
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<View className={styles.mainBox}>
|
||||
<View className={styles.menuBox}>
|
||||
<Tag></Tag>
|
||||
<Tag></Tag>
|
||||
<Tag></Tag>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user