import classnames from "classnames"; import { Component } from "react"; import { Block, View, Button, PageMeta } from "@tarojs/components"; import { Popup } from "@antmjs/vantui"; import "./popup.less"; import { go } from "../../utils/traoAPI"; /*** props * isLarge 是否大尺寸 * isShow 是否显示 * isClose 右上角关闭图标 * title 弹窗标题 * content 弹窗内容 * confirmButtonText 确定按钮 * textAlgin 文本对齐 left right center * type: 1注册 * @confirm 关闭回调 * ***/ export default class PopupAlert extends Component { constructor(props) { super(props); this.state = { name: "确认组件", }; } async onLoad() {} componentDidMount() {} componentWillUnmount() {} componentDidShow() {} componentDidHide() {} async initData() {} onClose = () => { this.props.close(); }; onConfirm = () => { let { type } = this.props; switch (type) { case "1": go("/pages/register/register"); break; } this.props.confirm(); }; onClickStop = (e) => { e.stopPropagation(); }; render() { let { title, content, confirmButtonText, textAlgin, isShow, isClose, isLarge, } = this.props; return ( {isClose && ( )} {title} {content} ); } }