{"id":101050,"date":"2020-05-22T18:48:17","date_gmt":"2020-05-22T10:48:17","guid":{"rendered":"http:\/\/4563.org\/?p=101050"},"modified":"2020-05-22T18:48:17","modified_gmt":"2020-05-22T10:48:17","slug":"sweetalert2-%e5%8f%b3%e4%b8%8a%e8%a7%92%e5%85%b3%e9%97%ad%e6%8c%89%e9%92%ae%e5%a6%82%e4%bd%95%e4%bf%ae%e6%94%b9%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=101050","title":{"rendered":"sweetalert2 \u53f3\u4e0a\u89d2\u5173\u95ed\u6309\u94ae\u5982\u4f55\u4fee\u6539\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  sweetalert2 \u53f3\u4e0a\u89d2\u5173\u95ed\u6309\u94ae\u5982\u4f55\u4fee\u6539\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wework <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u6211\u7b2c\u4e00\u6b21\u4f7f\u7528 https:\/\/github.com\/sweetalert2\/sweetalert2 \u505a modal \u5f39\u7a97 \uff0c\u5f15\u5165\u4e86\u4ee5\u4e0b\u6587\u4ef6<\/p>\n<p>&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/limonte-sweetalert2\/8.11.8\/sweetalert2.min.css&#8221; \/&gt;<\/p>\n<p> &lt;script src=&#8221;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/limonte-sweetalert2\/8.11.8\/sweetalert2.all.min.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>\u7136\u540e js \u914d\u7f6e\u5982\u4e0b<\/p>\n<p> Swal.fire({<br \/> title: data.title,<br \/> html: data.html,<br \/> type: &#8220;success&#8221;,<br \/> showCancelButton: false,<br \/> showConfirmButton: false,<br \/> showCloseButton: true<br \/> })<\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u91cc\u9762\uff0c\u6211\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u663e\u793a\u5173\u95ed\u6309\u94ae\uff0c\u5f39\u7a97\u53f3\u4e0a\u89d2\u786e\u5b9e\u6709\u4e86\u90a3\u4e2a\u6309\u94ae\uff0c\u4f46\u662f\u9ed8\u8ba4\u6309\u94ae\u6587\u672c\u662f submit<\/p>\n<p>&lt;button type=&#8221;button&#8221; class=&#8221;swal2-close&#8221; aria-label=&#8221;Close this dialog&#8221; style=&#8221;display: flex;&#8221;&gt;submit&lt;\/button&gt;<\/p>\n<p>\u6211\u5728\u5b98\u65b9\u6587\u6863\u90a3\u91cc\u597d\u50cf\u627e\u4e0d\u5230\u4fee\u6539 \u5173\u95ed\u6309\u94ae\u6587\u5b57\u7684\u65b9\u6cd5\uff0c\u6709\u54ea\u4f4d\u670b\u53cb\u77e5\u9053\u600e\u4e48\u4fee\u6539\u4e48\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1671305\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wework <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u54ce\uff0c\u81ea\u5df1\u5f3a\u5236\u7528 jquery \u7ed9\u4ed6\u6539\u503c\u4e86 $(&#8220;.swal2-close&#8221;).text(&#8216;X&#8217;);                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1671306\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : w292614191 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6539\u6e90\u7801<br \/>\u6216\u8005<br \/>buttonText \u4e4b\u7c7b\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1671307\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wework <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @w292614191 \u6ca1\u6709 closeButtonText \u7684\u5c5e\u6027\uff0c\u8d85\u6076\u5fc3\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1671308\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : w292614191 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u770b\u8d77\u6765\uff0c\u633a\u597d\u770b\u7684\u300217 \u5e74\u7684\u65f6\u5019\u7528\u8fc7\u4e00\u4e0b\u4e0b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1671309\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : w292614191 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wework <\/p>\n<p>closeButtonHtml <br \/>\u8fd9\u4e2a\u5c5e\u6027\uff0c\u53ef\u4ee5\u4f20\u5165 html \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1671310\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : w292614191 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wework <br \/>closeButtonHtml <br \/> Use this to change the content of the close button.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>sweetalert2 \u53f3\u4e0a\u89d2\u5173\u95ed&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/101050"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=101050"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/101050\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=101050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=101050"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=101050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}