修改发布

This commit is contained in:
筱野
2025-08-23 21:39:46 +08:00
parent 8bc2fa8d97
commit c6f4f11259
29 changed files with 384 additions and 241 deletions

View File

@@ -0,0 +1,35 @@
import React from 'react'
import { View } from '@tarojs/components'
import { TextArea } from '@nutui/nutui-react-taro'
import './index.scss'
interface TitleTextareaProps {
value: string
onChange: (value: string) => void
maxLength?: number
placeholder?: string
}
const TitleTextarea: React.FC<TitleTextareaProps> = ({
value,
onChange,
maxLength = 20,
placeholder = '好的标题更吸引人哦'
}) => {
return (
<View className='title-input-wrapper'>
<TextArea
className='title-input'
placeholder={placeholder}
value={value}
onInput={(e) => onChange(e.detail.value)}
maxlength={maxLength}
autoSize={true}
placeholderClass='title-input-placeholder'
/>
<View className='char-count'>{value.length}/{maxLength}</View>
</View>
)
}
export default TitleTextarea