From 675253dcb14180d61bc3402f19d0fd095d76c953 Mon Sep 17 00:00:00 2001 From: zollero Date: Mon, 27 Nov 2017 18:04:25 +0800 Subject: [PATCH] MessageBox: Add attribute 'showClose' to doc (#8516) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * MessageBox: Add attribute 'showClose' to doc Add an attribute 'showClose' to explain whether to show 'close' button on the right top. MessageBox: 文档中添加一个属性:showClose。 用来解释是否显示 MessageBox 右上角的关闭按钮。改属性,已经在源码中声明。 * MessageBox: Add attribute 'showClose' to doc Add an attribute 'showClose' to explain whether to show 'close' button on the right top. --- examples/docs/en-US/message-box.md | 3 ++- examples/docs/zh-CN/message-box.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/docs/en-US/message-box.md b/examples/docs/en-US/message-box.md index 6b3aeca0d..7286c5a7e 100644 --- a/examples/docs/en-US/message-box.md +++ b/examples/docs/en-US/message-box.md @@ -380,6 +380,7 @@ The corresponding methods are: `MessageBox`, `MessageBox.alert`, `MessageBox.con | type | message type, used for icon display | string | success / info / warning / error | — | | customClass | custom class name for MessageBox | string | — | — | | callback | MessageBox closing callback if you don't prefer Promise | function(action), where action can be 'confirm' or 'cancel', and `instance` is the MessageBox instance. You can access to that instance's attributes and methods | — | — | +| showClose | whether to show close icon of MessageBox | boolean | — | true | | beforeClose | callback before MessageBox closes, and it will prevent MessageBox from closing | function(action, instance, done), where `action` can be 'confirm' or 'cancel'; `instance` is the MessageBox instance, and you can access to that instance's attributes and methods; `done` is for closing the instance | — | — | | lockScroll | whether to lock body scroll when MessageBox prompts | boolean | — | true | | showCancelButton | whether to show a cancel button | boolean | — | false (true when called with confirm and prompt) | @@ -399,4 +400,4 @@ The corresponding methods are: `MessageBox`, `MessageBox.alert`, `MessageBox.con | inputValidator | validation function for the input. Should returns a boolean or string. If a string is returned, it will be assigned to inputErrorMessage | function | — | — | | inputErrorMessage | error message when validation fails | string | — | Illegal input | | center | whether to align the content in center | boolean | — | false | -| roundButton | whether to use round button | boolean | — | false | \ No newline at end of file +| roundButton | whether to use round button | boolean | — | false | diff --git a/examples/docs/zh-CN/message-box.md b/examples/docs/zh-CN/message-box.md index 1447ee8eb..b669abdc4 100644 --- a/examples/docs/zh-CN/message-box.md +++ b/examples/docs/zh-CN/message-box.md @@ -378,6 +378,7 @@ import { MessageBox } from 'element-ui'; | type | 消息类型,用于显示图标 | string | success / info / warning / error | — | | customClass | MessageBox 的自定义类名 | string | — | — | | callback | 若不使用 Promise,可以使用此参数指定 MessageBox 关闭后的回调 | function(action, instance),action 的值为'confirm'或'cancel', instance 为 MessageBox 实例,可以通过它访问实例上的属性和方法 | — | — | +| showClose | MessageBox 是否显示右上角关闭按钮 | boolean | — | true | | beforeClose | MessageBox 关闭前的回调,会暂停实例的关闭 | function(action, instance, done),action 的值为'confirm'或'cancel';instance 为 MessageBox 实例,可以通过它访问实例上的属性和方法;done 用于关闭 MessageBox 实例 | — | — | | lockScroll | 是否在 MessageBox 出现时将 body 滚动锁定 | boolean | — | true | | showCancelButton | 是否显示取消按钮 | boolean | — | false(以 confirm 和 prompt 方式调用时为 true) |