部分组件bug修复

This commit is contained in:
tangly1024
2024-11-23 20:17:52 +08:00
parent 0d832e48ba
commit 401d7149a1
6 changed files with 49 additions and 37 deletions

View File

@@ -6,14 +6,23 @@ import { siteConfig } from '@/lib/config'
* @param {boolean} sticky - 是否粘性定位
* @returns {JSX.Element | null} - 返回渲染的 JSX 元素或 null
*/
export default function WWAds({ orientation = 'vertical', sticky = false, className }) {
export default function WWAds({
orientation = 'vertical',
sticky = false,
className
}) {
const AD_WWADS_ID = siteConfig('AD_WWADS_ID')
if (!AD_WWADS_ID) {
return null
}
return <div data-id={AD_WWADS_ID} className={`wwads-cn
return (
<div
data-id={AD_WWADS_ID}
className={`wwads-cn
${orientation === 'vertical' ? 'wwads-vertical' : 'wwads-horizontal'}
${sticky ? 'wwads-sticky' : ''} z-10 ${className || ''}`} />
${sticky ? 'wwads-sticky' : ''} z-10 ${className || ''}`}
/>
)
}