New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@doraemon-ui/miniprogram.actionsheet

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doraemon-ui/miniprogram.actionsheet

miniprogram actionsheet component for doraemon-ui

alpha
latest
npmnpm
Version
0.0.1-alpha.1
Version published
Maintainers
2
Created
Source

ActionSheet 动作面板

从底部弹出的操作菜单面板,提供两种主题风格(iOS / WeChat)。

安装

我们推荐使用 npmyarn 的方式进行开发,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。

npm install --save @doraemon-ui/miniprogram.actionsheet
# or
yarn add @doraemon-ui/miniprogram.actionsheet

如果你的网络环境不佳,推荐使用 cnpm

使用指南

在 page.json 中引入组件

json

示例代码

在开发者工具中预览效果

WXML

wxml

JAVASCRIPT

js

API

ActionSheet props

export type ActionSheetButton = {
  /** 按钮文本 */
  text?: string
  /** 按钮图标 */
  icon?: string
  /** 类名 */
  className?: string
  /** 是否禁用 */
  disabled?: boolean
  /** 微信开放能力 */
  openType?: string
  /** 按下时自定义样式类 */
  hoverClass?: string
}
参数类型描述默认值
prefixClsstring自定义类名前缀dora-actionsheet
theme'ios' | 'wx'主题风格ios
titleTextstring标题文本-
buttonsActionSheetButton[]操作按钮列表[]
cancelTextstring取消按钮文本取消
destructiveTextstring删除按钮文本-
visibleboolean是否可见false
bind:action(event: CustomEvent) => void按钮点击事件,detail 包含 { method, button, index }-
bind:cancel() => void取消按钮点击事件-
bind:destructive() => void删除按钮点击事件-
bind:close() => void关闭事件-
bind:closed() => void关闭动画完成后的事件-

ActionSheet slot

名称描述
-自定义内容

ActionSheet externalClasses

名称描述
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()

CSS Variables

属性描述默认值全局变量
--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-

Keywords

doraemon-ui

FAQs

Package last updated on 21 Feb 2026

Did you know?

Socket

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.

Install

Related posts