PC端操作确认模态框(基于iview)
action-modal
InstallingactionModal
$ npm install action-modal --save Useing introduce in the Js
import actionModal from 'action-modal'; introduce in the Vue
<template> <action-modal ref="actionModal" :mTitle='删除确认' :mText='是否删除此数据' :buttonCancel='取消' :buttonOk='删除' @deletePost="myActionFn"> </action-modal> </template> Invoking method
//open this.$refs.actionModal.openModal(); //close this.$refs.actionModal.openModal(2); Props mTitle:
模态框标题,默认值为:删除确认,可不传
mText:模态框显示内容文字,默认值为:是否删除此数据,可不传,支持html
buttonCancel:模态框取消按钮显示文字,默认值为:取消,可不传
buttonOk:模态框确认操作按钮显示文字,默认值为:删除,可不传
Event @actionOk:点击确认后的回调函数,触发父组件自定义函数
For detailed explanation on how things work, consult the docs for action-modal.
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。