// Utils import { createNamespace } from '../utils'; // Mixins import { popupMixinProps } from '../mixins/popup'; // Components import Icon from '../icon'; import Popup from '../popup'; import Loading from '../loading'; const [createComponent, bem] = createNamespace('action-sheet'); export default createComponent({ props: { ...popupMixinProps, title: String, actions: Array, duration: [Number, String], cancelText: String, description: String, getContainer: [String, Function], closeOnPopstate: Boolean, closeOnClickAction: Boolean, round: { type: Boolean, default: true, }, closeIcon: { type: String, default: 'cross', }, safeAreaInsetBottom: { type: Boolean, default: true, }, overlay: { type: Boolean, default: true, }, closeOnClickOverlay: { type: Boolean, default: true, }, }, emits: ['close', 'cancel', 'select', 'update:show'], setup(props, { slots, emit }) { function onCancel() { emit('update:show', false); emit('cancel'); } function onToggle(show) { emit('update:show', show); } return function () { const { title, cancelText } = props; function Header() { if (title) { return (