
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
taro-marquee
Advanced tools
yarn add taro-marquee
import Broadcast from 'taro3-marquee'
...
<Broadcast
infoStr={'测试文案'}
/>
...
通过一个变量,频繁的进行挂载和卸载。
import Broadcast,{ BROADCAST_REBUILD } from 'taro3-marquee'
export default () => {
const [flag, setFlag] = useState(); // flag 为true就显示
return (
<View
onClick={() => {
setFlag(!flag);
}}
>
{flag && <Broadcast mode={BROADCAST_REBUILD} nfoStr={"测试文案"} />}
</View>
);
};
简单讲就是组件不通过变量进行频繁的挂载和卸载,仅仅通过样式进行显示和隐藏。
import Broadcast,{ BROADCAST_LIVE } from 'taro3-marquee'
export default () => {
const [falg, setFlag] = useState(); // flag 为true就显示
return (
<View
onClick={() => {
setFlag(!flag);
}}
>
<View
style={{
visibility: flag ? "" : "hidden",
}}
>
<Broadcast
mode={BROADCAST_LIVE} // 模式
isRest={flag} // isRest用来触发组件的重置刷新
infoStr={"测试文案"}
/>
</View>
</View>
);
};
mode 组件的存在模式
isReset 重置开关
infoStr 显示的文本信息。
bgColor 跑马灯背景板颜色。
fontColor: 字体颜色
fontSize 字体大小,根据该值进行留白计算,
startPercent 跑马灯文本起步的位置(比例),
FAQs
taro3 react marquee
The npm package taro-marquee receives a total of 0 weekly downloads. As such, taro-marquee popularity was classified as not popular.
We found that taro-marquee demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.