0.0.21 • Published 5 years ago
beisen-phoenix-fork-mobile-action-sheet v0.0.21
移动端ActionSheet组件
import React from 'react';
import ActionSheet from '../../src';
export default () => {
return (
<button onClick={showActionSheet}>显示</button>
)
}
function showActionSheet() {
const BUTTONS = [{
text: '全部待办',
value: 100,
}, {
text: '审批',
value: 99,
}, {
text: '会议室预定',
value: 98,
disabled: true,
}, {
text: '招聘',
value: 97,
}];
ActionSheet.show({
items: BUTTONS,
showCancel: true,
// message: '辅助说明文字两行打点辅助说明文字两行打点辅助说明文字两行打点',
maskClosable: true
},
(buttonIndex) => {
// alert(buttonIndex);
// this.setState({ clicked: BUTTONS[buttonIndex] });
});
}