
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
nuke-biz-custom-toast
Advanced tools
需要定制 toast 的文案、Icon 时
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| type | 浮层类型,枚举可选'success','error','warning' | string | 'success' |
| message | 文案 | string | 无 |
| onHide | 关闭时触发回调 | function | |
| onShow | 打开后后触发回调 | function | false |
| maxLines | 文字最大行数,默认3,建议不要改 | number | 3 |
| duration | toast 出现多久后消失,默认2s | number | 2000 |
/** @jsx createElement */
import {createElement, Component,render } from 'rax';
import {View,Text,Page,Button} from 'weex-nuke';
import CustomToast from 'nuke-biz-custom-toast';
let App = class NukeDemoIndex extends Component {
constructor() {
super();
this.closeHandler = this.closeHandler.bind(this);
this.showToast = this.showToast .bind(this);
}
showToast(){
this.toast.wrappedInstance.show();
}
closeHandler(){
console.log('toast closed');
}
render() {
return (
<Page title="custom-toast">
<Page.Intro main="basic" sub="basic-sub"/>
<Button onPress={this.showToast} type="primary">点我</Button>
<CustomToast
defaultVisible={false}
ref={(n)=>{this.toast = n;}}
message={'Thank you for your feedback!'}
icon={{
source:
'//img.alicdn.com/tfs/TB1k.IIPVXXXXcWapXXXXXXXXXX-200-200.png',
style: {
width: '40rem',
height: '40rem',
},
}}
onHide={this.closeHandler}
/>
</Page>
);
}
}
render(<App/>);
FAQs
nuke-biz-custom-toast
We found that nuke-biz-custom-toast 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.