{"id":53055,"date":"2024-12-03T15:15:47","date_gmt":"2024-12-03T07:15:47","guid":{"rendered":"https:\/\/fwq.ai\/blog\/53055\/"},"modified":"2024-12-03T15:15:47","modified_gmt":"2024-12-03T07:15:47","slug":"element-ui-dialog-%e7%9a%84%e5%8f%af%e8%a7%81%e6%80%a7%e5%b1%9e%e6%80%a7%e6%98%af%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%9a%84%ef%bc%9f-3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/53055\/","title":{"rendered":"Element UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Element UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f <\/h1>\n<p>\u6700\u8fd1\u53d1\u73b0\u4e0d\u5c11\u5c0f\u4f19\u4f34\u90fd\u5bf9<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u5f88\u611f\u5174\u8da3\uff0c\u6240\u4ee5\u4eca\u5929\u7ee7\u7eed\u7ed9\u5927\u5bb6\u4ecb\u7ecd<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u76f8\u5173\u7684\u77e5\u8bc6\uff0c\u672c\u6587<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aElement UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f \u300b<\/span>\u4e3b\u8981\u5185\u5bb9\u6d89\u53ca\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u80fd\u5e2e\u5230\u4f60\uff01\u5f53\u7136\u5982\u679c\u9605\u8bfb\u672c\u6587\u65f6\u5b58\u5728\u4e0d\u540c\u60f3\u6cd5\uff0c\u53ef\u4ee5\u5728\u8bc4\u8bba\u4e2d\u8868\u8fbe\uff0c\u4f46\u662f\u8bf7\u52ff\u4f7f\u7528\u8fc7\u6fc0\u7684\u63aa\u8f9e~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241126\/17325893316745371367845.jpg\" class=\"aligncenter\" title=\"Element UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f\u63d2\u56fe\" alt=\"Element UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u63a2\u8ba8 Element UI \u7684 Dialog \u6e90\u7801\uff1a\u53ef\u89c1\u6027\u5c5e\u6027\u4e4b\u8c1c<\/strong><\/p>\n<p>\u5728 Element UI \u7684\u6e90\u7801\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u6ce8\u610f\u5230 Element Dialog \u7ec4\u4ef6\u4e2d\u6ca1\u6709\u76f4\u63a5\u5b9a\u4e49 visible \u5c5e\u6027\uff0c\u4f46\u5b83\u5374\u53ef\u4ee5\u88ab\u4f7f\u7528\u548c\u4f20\u503c\u3002\u8fd9\u4e0d\u7981\u4ee4\u4eba\u7591\u60d1\uff0cvisible \u5c5e\u6027\u662f\u5982\u4f55\u88ab\u4f7f\u7528\u7684\uff1f<\/p>\n<p>\u6df1\u5165\u6e90\u7801\u63a2\u7a76\u53d1\u73b0\uff0cvisible \u5c5e\u6027\u5b9e\u9645\u4e0a\u662f\u901a\u8fc7\u4e00\u4e2a\u540d\u4e3a Popup \u7684 mixins \u6df7\u5165\u7684\u3002Popup mixins \u4e2d\u5b9a\u4e49\u4e86 visible \u5c5e\u6027\u7684\u9ed8\u8ba4\u503c\u4e3a false\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5173\u7684\u5904\u7406\u903b\u8f91\u3002<\/p>\n<p>element-ui\/src\/utils\/popup\/index.js \u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e86 Popup mixins \u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>export default {\n  props: {\n    visible: {\n      type: Boolean,\n      default: false\n    },\n  },\n};<\/pre>\n<p>\u800c element-ui\/src\/component.vue \u6587\u4ef6\u4e2d\u7684 Element Dialog \u7ec4\u4ef6\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>export default {\n  name: 'ElDialog',\n\n  mixins: [Popup, emitter, Migrating],\n};<\/pre>\n<p>\u901a\u8fc7\u4f7f\u7528 mixins\uff0cElement Dialog \u7ec4\u4ef6\u7ee7\u627f\u4e86 Popup \u4e2d\u5b9a\u4e49\u7684 visible \u5c5e\u6027\u53ca\u5176\u5904\u7406\u903b\u8f91\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5373\u4f7f\u5728 Element Dialog \u7ec4\u4ef6\u7684 props \u4e2d\u6ca1\u6709\u663e\u5f0f\u5b9a\u4e49 visible \u5c5e\u6027\uff0c\u5b83\u4ecd\u7136\u53ef\u4ee5\u4f7f\u7528\u8be5\u5c5e\u6027\u7684\u9ed8\u8ba4\u503c\u548c\u5904\u7406\u903b\u8f91\u3002<\/p>\n<p>\u4eca\u5929\u5173\u4e8e\u300aElement UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f \u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   \u5982\u4f55\u89e3\u51b3 HTML Ruby \u6807\u7b7e\u4e4b\u95f4\u7684\u7a7a\u767d\u95f4\u8ddd\u95ee\u9898\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Element UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f \u6700\u8fd1\u53d1\u73b0\u4e0d\u5c11\u5c0f\u4f19\u4f34\u90fd\u5bf9\u6587\u7ae0\u5f88\u611f\u5174\u8da3\uff0c\u6240\u4ee5\u4eca\u5929\u7ee7\u7eed\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u6587\u7ae0\u76f8\u5173\u7684\u77e5\u8bc6\uff0c\u672c\u6587\u300aElement UI Dialog \u7684\u53ef\u89c1\u6027\u5c5e\u6027\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f \u300b\u4e3b\u8981\u5185\u5bb9\u6d89\u53ca\u5230\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u80fd\u5e2e\u5230\u4f60\uff01\u5f53\u7136\u5982\u679c\u9605\u8bfb\u672c\u6587\u65f6\u5b58\u5728\u4e0d\u540c\u60f3\u6cd5\uff0c\u53ef\u4ee5\u5728\u8bc4\u8bba\u4e2d\u8868\u8fbe\uff0c\u4f46\u662f\u8bf7\u52ff\u4f7f\u7528\u8fc7\u6fc0\u7684\u63aa\u8f9e~ \u63a2\u8ba8 Element UI \u7684 Dialog \u6e90\u7801\uff1a\u53ef\u89c1\u6027\u5c5e\u6027\u4e4b\u8c1c \u5728 Element UI \u7684\u6e90\u7801\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u6ce8\u610f\u5230 Element Dialog \u7ec4\u4ef6\u4e2d\u6ca1\u6709\u76f4\u63a5\u5b9a\u4e49 visible \u5c5e\u6027\uff0c\u4f46\u5b83\u5374\u53ef\u4ee5\u88ab\u4f7f\u7528\u548c\u4f20\u503c\u3002\u8fd9\u4e0d\u7981\u4ee4\u4eba\u7591\u60d1\uff0cvisible \u5c5e\u6027\u662f\u5982\u4f55\u88ab\u4f7f\u7528\u7684\uff1f \u6df1\u5165\u6e90\u7801\u63a2\u7a76\u53d1\u73b0\uff0cvisible \u5c5e\u6027\u5b9e\u9645\u4e0a\u662f\u901a\u8fc7\u4e00\u4e2a\u540d\u4e3a Popup \u7684 mixins \u6df7\u5165\u7684\u3002Popup mixins \u4e2d\u5b9a\u4e49\u4e86 visible \u5c5e\u6027\u7684\u9ed8\u8ba4\u503c\u4e3a false\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5173\u7684\u5904\u7406\u903b\u8f91\u3002 element-ui\/src\/utils\/popup\/index.js \u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e86 Popup mixins \u7684\u4ee3\u7801\u5982\u4e0b\uff1a export default { props: { visible: { type: Boolean, default: false }, }, }; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-53055","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=53055"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53055\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=53055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=53055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=53055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}