import create from '../utils/create'; import createBem from '../utils/bem'; import Popup from '../mixins/popup'; const bem = createBem('van-actionsheet'); export default create({ name: 'actionsheet', mixins: [Popup], props: { title: String, value: Boolean, actions: Array, cancelText: String, overlay: { type: Boolean, default: true }, closeOnClickOverlay: { type: Boolean, default: true } }, methods: { onSelect(item, event) { event.stopPropagation(); if (!item.disabled && !item.loading) { if (item.callback) { item.callback(item); } this.$emit('select', item); } }, onCancel() { this.$emit('input', false); this.$emit('cancel'); } }, render(h) { if (!this.shouldRender) { return; } const { title, cancelText, onCancel } = this; const Header = () => (