
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@doraemon-ui/miniprogram.actionsheet
Advanced tools
从底部弹出的操作菜单面板,提供两种主题风格(iOS / WeChat)。
我们推荐使用 npm 或 yarn 的方式进行开发,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
npm install --save @doraemon-ui/miniprogram.actionsheet
# or
yarn add @doraemon-ui/miniprogram.actionsheet
如果你的网络环境不佳,推荐使用 cnpm。
export type ActionSheetButton = {
/** 按钮文本 */
text?: string
/** 按钮图标 */
icon?: string
/** 类名 */
className?: string
/** 是否禁用 */
disabled?: boolean
/** 微信开放能力 */
openType?: string
/** 按下时自定义样式类 */
hoverClass?: string
}
| 参数 | 类型 | 描述 | 默认值 |
|---|---|---|---|
| prefixCls | string | 自定义类名前缀 | dora-actionsheet |
| theme | 'ios' | 'wx' | 主题风格 | ios |
| titleText | string | 标题文本 | - |
| buttons | ActionSheetButton[] | 操作按钮列表 | [] |
| cancelText | string | 取消按钮文本 | 取消 |
| destructiveText | string | 删除按钮文本 | - |
| visible | boolean | 是否可见 | false |
| bind:action | (event: CustomEvent) => void | 按钮点击事件,detail 包含 { method, button, index } | - |
| bind:cancel | () => void | 取消按钮点击事件 | - |
| bind:destructive | () => void | 删除按钮点击事件 | - |
| bind:close | () => void | 关闭事件 | - |
| bind:closed | () => void | 关闭动画完成后的事件 | - |
| 名称 | 描述 |
|---|---|
| - | 自定义内容 |
| 名称 | 描述 |
|---|---|
| dora-class | 根节点样式类 |
import { actionsheet } from '@doraemon-ui/miniprogram.actionsheet'
// 显示动作面板
const close = actionsheet.show({
theme: 'ios',
titleText: '请选择操作',
buttons: [{ text: '选项一' }, { text: '选项二' }],
cancelText: '取消',
onCancel: () => {},
onClose: () => {},
})
// 手动关闭
close()
// 关闭所有
actionsheet.clear()
| 属性 | 描述 | 默认值 | 全局变量 |
|---|---|---|---|
| --options-bg | 选项组背景色(iOS 主题) | rgba(255, 255, 255, .65) | --dora-actionsheet-options-bg |
| --options-normal-bg | 普通选项组背景色 | @component-background | --dora-actionsheet-options-normal-bg |
| --options-cancel-bg | 微信主题取消区域背景色 | @component-background | --dora-actionsheet-options-cancel-bg |
| --options-active-bg | 按钮按下时背景色 | @active-state-bg | --dora-actionsheet-options-active-bg |
| --text-color | 按钮文字颜色 | #007aff | --dora-actionsheet-text-color |
| --border-color | 按钮之间的分隔线颜色 | @border-color-split | --dora-actionsheet-border-color |
| --destructive-text-color | 删除按钮文字颜色 | #ff3b30 | --dora-actionsheet-destructive-text-color |
| --icon-size | 按钮图标大小 | 20px | - |
| --border-radius | 选项组圆角 | 12px | - |
| --margin | 内容区域水平边距 | 10px | - |
FAQs
miniprogram actionsheet component for doraemon-ui
We found that @doraemon-ui/miniprogram.actionsheet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.