代码拉取完成,页面将自动刷新
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[36],{
/***/ 793:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/vue/dist/vue.esm-browser.prod.js
var vue_esm_browser_prod = __webpack_require__(0);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/dist/templateLoader.js??ref--6!./node_modules/vue-loader/dist??ref--3-0!./website/md-loader!./website/docs/en-US/message.md?vue&type=template&id=e0f0d0f8
const messagevue_type_template_id_e0f0d0f8_hoisted_1 = {
class: "content element-doc"
};
const messagevue_type_template_id_e0f0d0f8_hoisted_2 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Message ");
const messagevue_type_template_id_e0f0d0f8_hoisted_3 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "Used to show feedback after an activity. The difference with Notification is that the latter is often used to show a system level passive notification.", -1);
const messagevue_type_template_id_e0f0d0f8_hoisted_4 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Basic usage ");
const _hoisted_5 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "Displays at the top, and disappears after 3 seconds.", -1);
const _hoisted_6 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("The setup of Message is very similar to notification, so parts of the options won't be explained in detail here. You can check the options table below combined with notification doc to understand it. Element Plus has registered a "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "$message"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" method for invoking. Message can take a string or a VNode as parameter, and it will be shown as the main body.")])], -1);
const _hoisted_7 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-button :plain=\"true\" @click=\"open\">Show message</el-button>\n <el-button :plain=\"true\" @click=\"openVn\">VNode</el-button>\n</template>\n\n<script>\n import { h } from 'vue'\n\n export default {\n methods: {\n open() {\n this.$message('This is a message.')\n },\n\n openVn() {\n this.$message({\n message: h('p', null, [\n h('span', null, 'Message can be '),\n h('i', { style: 'color: teal' }, 'VNode'),\n ]),\n })\n },\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent, h } from 'vue';\n import { ElMessage } from 'element-plus';\n\n export default defineComponent({\n setup() {\n \n const open = () => {\n ElMessage('this is a message.');\n };\n\n const openVn = () => {\n ElMessage({\n message: h('p', null, [\n h('span', null, 'Message can be '),\n h('i', { style: 'color: teal' }, 'VNode'),\n ]),\n });\n };\n\n return {\n open,\n openVn,\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_8 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Types ");
const _hoisted_9 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "Used to show the feedback of Success, Warning, Message and Error activities.", -1);
const _hoisted_10 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("When you need more customizations, Message component can also take an object as parameter. For example, setting value of "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "type"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" can define different types, and its default is "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "info"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(". In such cases the main body is passed in as the value of "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "message"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(". Also, we have registered methods for different types, so you can directly call it without passing a type like "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "open4"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(".")])], -1);
const _hoisted_11 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-button :plain=\"true\" @click=\"open2\">success</el-button>\n <el-button :plain=\"true\" @click=\"open3\">warning</el-button>\n <el-button :plain=\"true\" @click=\"open1\">message</el-button>\n <el-button :plain=\"true\" @click=\"open4\">error</el-button>\n</template>\n\n<script>\n export default {\n methods: {\n open1() {\n this.$message('This is a message.')\n },\n open2() {\n this.$message({\n message: 'Congrats, this is a success message.',\n type: 'success',\n })\n },\n\n open3() {\n this.$message({\n message: 'Warning, this is a warning message.',\n type: 'warning',\n })\n },\n\n open4() {\n this.$message.error('Oops, this is a error message.')\n },\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent } from 'vue';\n import { ElMessage } from 'element-plus';\n\n export default defineComponent({\n setup() {\n \n const open1 = () => {\n ElMessage('this is a message.');\n };\n const open2 = () => {\n ElMessage({\n message: 'Congrats, this is a success message.',\n type: 'success',\n });\n };\n const open3 = () => {\n ElMessage({\n message: 'Warning, this is a warning message.',\n type: 'warning',\n });\n };\n const open4 = () => {\n ElMessage.error('Oops, this is a error message.');\n };\n return {\n open1,\n open2,\n open3,\n open4,\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_12 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Closable ");
const _hoisted_13 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "A close button can be added.", -1);
const _hoisted_14 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("A default Message cannot be closed manually. If you need a closable message, you can set "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "showClose"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" field. Besides, same as notification, message has a controllable "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "duration"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(". Default duration is 3000 ms, and it won't disappear when set to "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "0"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(".")])], -1);
const _hoisted_15 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-button :plain=\"true\" @click=\"open1\">message</el-button>\n <el-button :plain=\"true\" @click=\"open2\">success</el-button>\n <el-button :plain=\"true\" @click=\"open3\">warning</el-button>\n <el-button :plain=\"true\" @click=\"open4\">error</el-button>\n</template>\n\n<script>\n export default {\n methods: {\n open1() {\n this.$message({\n showClose: true,\n message: 'This is a message.',\n })\n },\n\n open2() {\n this.$message({\n showClose: true,\n message: 'Congrats, this is a success message.',\n type: 'success',\n })\n },\n\n open3() {\n this.$message({\n showClose: true,\n message: 'Warning, this is a warning message.',\n type: 'warning',\n })\n },\n\n open4() {\n this.$message({\n showClose: true,\n message: 'Oops, this is a error message.',\n type: 'error',\n })\n },\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent } from 'vue';\n import { ElMessage } from 'element-plus';\n\n export default defineComponent({\n setup() {\n \n const open1 = () => {\n ElMessage({\n showClose: true,\n message: 'This is a message.',\n });\n };\n const open2 = () => {\n ElMessage({\n showClose: true,\n message: 'Congrats, this is a success message.',\n type: 'success',\n });\n };\n const open3 = () => {\n ElMessage({\n showClose: true,\n message: 'Warning, this is a warning message.',\n type: 'warning',\n });\n };\n const open4 = () => {\n ElMessage({\n showClose: true,\n message: 'Oops, this is a error message.',\n type: 'error',\n });\n };\n return {\n open1,\n open2,\n open3,\n open4,\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_16 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Centered text ");
const _hoisted_17 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Use the "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "center"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" attribute to center the text.")], -1);
const _hoisted_18 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-button :plain=\"true\" @click=\"openCenter\">Centered text</el-button>\n</template>\n\n<script>\n export default {\n methods: {\n openCenter() {\n this.$message({\n message: 'Centered text',\n center: true,\n })\n },\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent } from 'vue';\n import { ElMessage } from 'element-plus';\n\n export default defineComponent({\n setup() {\n \n const openCenter = () => {\n ElMessage({\n showClose: true,\n message: 'Centered text',\n });\n };\n return {\n openCenter,\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_19 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Use HTML string ");
const _hoisted_20 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "message"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" supports HTML string.")], -1);
const _hoisted_21 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Set "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "dangerouslyUseHTMLString"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" to true and "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "message"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" will be treated as an HTML string.")])], -1);
const _hoisted_22 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-button :plain=\"true\" @click=\"openHTML\">Use HTML String</el-button>\n</template>\n\n<script>\n export default {\n methods: {\n openHTML() {\n this.$message({\n dangerouslyUseHTMLString: true,\n message: '<strong>This is <i>HTML</i> string</strong>',\n })\n },\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent } from 'vue';\n import { ElMessage } from 'element-plus';\n\n export default defineComponent({\n setup() {\n \n const openCenter = () => {\n ElMessage({\n dangerouslyUseHTMLString: true,\n message: '<strong>This is <i>HTML</i> string</strong>',\n });\n };\n return {\n openCenter,\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_23 = {
class: "warning"
};
const _hoisted_24 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Although ");
const _hoisted_25 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "message", -1);
const _hoisted_26 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" property supports HTML strings, dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to ");
const _hoisted_27 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("XSS attacks");
const _hoisted_28 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(". So when ");
const _hoisted_29 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "dangerouslyUseHTMLString", -1);
const _hoisted_30 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" is on, please make sure the content of ");
const _hoisted_31 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "message", -1);
const _hoisted_32 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" is trusted, and ");
const _hoisted_33 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("strong", null, "never", -1);
const _hoisted_34 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" assign ");
const _hoisted_35 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "message", -1);
const _hoisted_36 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" to user-provided content.");
const _hoisted_37 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Global method ");
const _hoisted_38 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Element Plus has added a global method "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "$message"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" for "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "app.config.globalProperties"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(". So in a vue instance you can call "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "Message"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" like what we did in this page.")], -1);
const _hoisted_39 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Local import ");
const _hoisted_40 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<pre class=\"example-code\"><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">import</span> { ElMessage } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">'element-plus'</span>\n</code><span class=\"lang-mark\">js</span></pre><p>In this case you should call <code>ElMessage(options)</code>. We have also registered methods for different types, e.g. <code>ElMessage.success(options)</code>. You can call <code>ElMessage.closeAll()</code> to manually close all the instances.</p>", 2);
const _hoisted_42 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Options ");
const _hoisted_43 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<table><thead><tr><th>Attribute</th><th>Description</th><th>Type</th><th>Accepted Values</th><th>Default</th></tr></thead><tbody><tr><td>message</td><td>message text</td><td>string / VNode</td><td>—</td><td>—</td></tr><tr><td>type</td><td>message type</td><td>string</td><td>success/warning/info/error</td><td>info</td></tr><tr><td>iconClass</td><td>custom icon's class, overrides <code>type</code></td><td>string</td><td>—</td><td>—</td></tr><tr><td>dangerouslyUseHTMLString</td><td>whether <code>message</code> is treated as HTML string</td><td>boolean</td><td>—</td><td>false</td></tr><tr><td>customClass</td><td>custom class name for Message</td><td>string</td><td>—</td><td>—</td></tr><tr><td>duration</td><td>display duration, millisecond. If set to 0, it will not turn off automatically</td><td>number</td><td>—</td><td>3000</td></tr><tr><td>showClose</td><td>whether to show a close button</td><td>boolean</td><td>—</td><td>false</td></tr><tr><td>center</td><td>whether to center the text</td><td>boolean</td><td>—</td><td>false</td></tr><tr><td>onClose</td><td>callback function when closed with the message instance as the parameter</td><td>function</td><td>—</td><td>—</td></tr><tr><td>offset</td><td>set the distance to the top of viewport</td><td>number</td><td>—</td><td>20</td></tr></tbody></table>", 1);
const _hoisted_44 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Methods ");
const _hoisted_45 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<p><code>Message</code> and <code>this.$message</code> returns the current Message instance. To manually close the instance, you can call <code>close</code> on it.</p><table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td>close</td><td>close the Message</td></tr></tbody></table>", 2);
function messagevue_type_template_id_e0f0d0f8_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_app_link = Object(vue_esm_browser_prod["resolveComponent"])("app-link");
const _component_app_heading = Object(vue_esm_browser_prod["resolveComponent"])("app-heading");
const _component_element_demo0 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo0");
const _component_demo_block = Object(vue_esm_browser_prod["resolveComponent"])("demo-block");
const _component_element_demo1 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo1");
const _component_element_demo2 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo2");
const _component_element_demo3 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo3");
const _component_element_demo4 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo4");
const _component_right_nav = Object(vue_esm_browser_prod["resolveComponent"])("right-nav");
return Object(vue_esm_browser_prod["openBlock"])(), Object(vue_esm_browser_prod["createElementBlock"])("section", messagevue_type_template_id_e0f0d0f8_hoisted_1, [Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "message",
content: "Message",
href: "#message",
level: "2"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [messagevue_type_template_id_e0f0d0f8_hoisted_2, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#message"
})]),
_: 1
}), messagevue_type_template_id_e0f0d0f8_hoisted_3, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "basic-usage",
content: "Basic usage",
href: "#basic-usage",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [messagevue_type_template_id_e0f0d0f8_hoisted_4, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#basic-usage"
})]),
_: 1
}), _hoisted_5, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo0)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_7]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_6]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "types",
content: "Types",
href: "#types",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_8, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#types"
})]),
_: 1
}), _hoisted_9, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo1)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_11]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_10]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "closable",
content: "Closable",
href: "#closable",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_12, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#closable"
})]),
_: 1
}), _hoisted_13, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo2)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_15]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_14]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "centered-text",
content: "Centered text",
href: "#centered-text",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_16, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#centered-text"
})]),
_: 1
}), _hoisted_17, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo3)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_18]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "use-html-string",
content: "Use HTML string",
href: "#use-html-string",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_19, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#use-html-string"
})]),
_: 1
}), _hoisted_20, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo4)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_22]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_21]),
_: 1
}), Object(vue_esm_browser_prod["createElementVNode"])("div", _hoisted_23, [Object(vue_esm_browser_prod["createElementVNode"])("p", null, [_hoisted_24, _hoisted_25, _hoisted_26, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "https://en.wikipedia.org/wiki/Cross-site_scripting"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_27]),
_: 1
}), _hoisted_28, _hoisted_29, _hoisted_30, _hoisted_31, _hoisted_32, _hoisted_33, _hoisted_34, _hoisted_35, _hoisted_36])]), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "global-method",
content: "Global method",
href: "#global-method",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_37, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#global-method"
})]),
_: 1
}), _hoisted_38, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "local-import",
content: "Local import",
href: "#local-import",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_39, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#local-import"
})]),
_: 1
}), _hoisted_40, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "options",
content: "Options",
href: "#options",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_42, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#options"
})]),
_: 1
}), _hoisted_43, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "methods",
content: "Methods",
href: "#methods",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_44, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#methods"
})]),
_: 1
}), _hoisted_45, Object(vue_esm_browser_prod["createVNode"])(_component_right_nav)]);
}
// CONCATENATED MODULE: ./website/docs/en-US/message.md?vue&type=template&id=e0f0d0f8
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--3-0!./website/md-loader!./website/docs/en-US/message.md?vue&type=script&lang=ts
/* harmony default export */ var messagevue_type_script_lang_ts = ({
name: 'component-doc',
components: {
"element-demo0": function () {
const {
createTextVNode: _createTextVNode,
resolveComponent: _resolveComponent,
withCtx: _withCtx,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = /*#__PURE__*/_createTextVNode("Show message");
const _hoisted_2 = /*#__PURE__*/_createTextVNode("VNode");
function render(_ctx, _cache) {
const _component_el_button = _resolveComponent("el-button");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open
}, {
default: _withCtx(() => [_hoisted_1]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.openVn
}, {
default: _withCtx(() => [_hoisted_2]),
_: 1
}, 8, ["onClick"])]);
}
const {
h
} = vue_esm_browser_prod;
const democomponentExport = {
methods: {
open() {
this.$message('This is a message.');
},
openVn() {
this.$message({
message: h('p', null, [h('span', null, 'Message can be '), h('i', {
style: 'color: teal'
}, 'VNode')])
});
}
}
};
return {
render,
...democomponentExport
};
}(),
"element-demo1": function () {
const {
createTextVNode: _createTextVNode,
resolveComponent: _resolveComponent,
withCtx: _withCtx,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = /*#__PURE__*/_createTextVNode("success");
const _hoisted_2 = /*#__PURE__*/_createTextVNode("warning");
const _hoisted_3 = /*#__PURE__*/_createTextVNode("message");
const _hoisted_4 = /*#__PURE__*/_createTextVNode("error");
function render(_ctx, _cache) {
const _component_el_button = _resolveComponent("el-button");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open2
}, {
default: _withCtx(() => [_hoisted_1]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open3
}, {
default: _withCtx(() => [_hoisted_2]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open1
}, {
default: _withCtx(() => [_hoisted_3]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open4
}, {
default: _withCtx(() => [_hoisted_4]),
_: 1
}, 8, ["onClick"])]);
}
const democomponentExport = {
methods: {
open1() {
this.$message('This is a message.');
},
open2() {
this.$message({
message: 'Congrats, this is a success message.',
type: 'success'
});
},
open3() {
this.$message({
message: 'Warning, this is a warning message.',
type: 'warning'
});
},
open4() {
this.$message.error('Oops, this is a error message.');
}
}
};
return {
render,
...democomponentExport
};
}(),
"element-demo2": function () {
const {
createTextVNode: _createTextVNode,
resolveComponent: _resolveComponent,
withCtx: _withCtx,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = /*#__PURE__*/_createTextVNode("message");
const _hoisted_2 = /*#__PURE__*/_createTextVNode("success");
const _hoisted_3 = /*#__PURE__*/_createTextVNode("warning");
const _hoisted_4 = /*#__PURE__*/_createTextVNode("error");
function render(_ctx, _cache) {
const _component_el_button = _resolveComponent("el-button");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open1
}, {
default: _withCtx(() => [_hoisted_1]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open2
}, {
default: _withCtx(() => [_hoisted_2]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open3
}, {
default: _withCtx(() => [_hoisted_3]),
_: 1
}, 8, ["onClick"]), _createVNode(_component_el_button, {
plain: true,
onClick: _ctx.open4
}, {
default: _withCtx(() => [_hoisted_4]),
_: 1
}, 8, ["onClick"])]);
}
const democomponentExport = {
methods: {
open1() {
this.$message({
showClose: true,
message: 'This is a message.'
});
},
open2() {
this.$message({
showClose: true,
message: 'Congrats, this is a success message.',
type: 'success'
});
},
open3() {
this.$message({
showClose: true,
message: 'Warning, this is a warning message.',
type: 'warning'
});
},
open4() {
this.$message({
showClose: true,
message: 'Oops, this is a error message.',
type: 'error'
});
}
}
};
return {
render,
...democomponentExport
};
}(),
"element-demo3": function () {
const {
createTextVNode: _createTextVNode,
resolveComponent: _resolveComponent,
withCtx: _withCtx,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = /*#__PURE__*/_createTextVNode("Centered text");
function render(_ctx, _cache) {
const _component_el_button = _resolveComponent("el-button");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_button, {
plain: true,
onClick: _ctx.openCenter
}, {
default: _withCtx(() => [_hoisted_1]),
_: 1
}, 8, ["onClick"])]);
}
const democomponentExport = {
methods: {
openCenter() {
this.$message({
message: 'Centered text',
center: true
});
}
}
};
return {
render,
...democomponentExport
};
}(),
"element-demo4": function () {
const {
createTextVNode: _createTextVNode,
resolveComponent: _resolveComponent,
withCtx: _withCtx,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = /*#__PURE__*/_createTextVNode("Use HTML String");
function render(_ctx, _cache) {
const _component_el_button = _resolveComponent("el-button");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_button, {
plain: true,
onClick: _ctx.openHTML
}, {
default: _withCtx(() => [_hoisted_1]),
_: 1
}, 8, ["onClick"])]);
}
const democomponentExport = {
methods: {
openHTML() {
this.$message({
dangerouslyUseHTMLString: true,
message: '<strong>This is <i>HTML</i> string</strong>'
});
}
}
};
return {
render,
...democomponentExport
};
}()
}
});
// CONCATENATED MODULE: ./website/docs/en-US/message.md?vue&type=script&lang=ts
// CONCATENATED MODULE: ./website/docs/en-US/message.md
messagevue_type_script_lang_ts.render = messagevue_type_template_id_e0f0d0f8_render
/* harmony default export */ var message = __webpack_exports__["default"] = (messagevue_type_script_lang_ts);
/***/ })
}]);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。