| | |
| | | import props from './props'; |
| | | import transition from '../mixins/transition'; |
| | | import { calcIcon } from '../common/utils'; |
| | | import useCustomNavbar from '../mixins/using-custom-navbar'; |
| | | const { prefix } = config; |
| | | const name = `${prefix}-toast`; |
| | | let Toast = class Toast extends SuperComponent { |
| | |
| | | this.options = { |
| | | multipleSlots: true, |
| | | }; |
| | | this.behaviors = [transition()]; |
| | | this.behaviors = [transition(), useCustomNavbar]; |
| | | this.hideTimer = null; |
| | | this.data = { |
| | | prefix, |
| | |
| | | }, |
| | | hide() { |
| | | var _a, _b; |
| | | if (!this.data.visible) |
| | | return; |
| | | this.setData({ visible: false }); |
| | | (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a); |
| | | this.triggerEvent('close'); |