mirror of
https://gitee.com/dcren/cloud-native-app-initializer.git
synced 2025-07-16 16:50:41 +08:00
2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{231:function(e,t,n){var a=n(42),o=n(232);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var c={insert:"head",singleton:!1};a(o,c);e.exports=o.locals||{}},232:function(e,t,n){(t=n(43)(!1)).push([e.i,".modal-fetch{padding:10px 30px 10px 30px;height:300px;width:700px}.modal-fetch h2{border-bottom:solid 3px #ff6a00;padding-bottom:10px}.modal-fetch .fetch-method{margin-bottom:20px}.modal-fetch .fetch-method span{display:inline-block;width:150px;font-weight:bold}.modal-fetch .fetch-method input{padding-right:70px;display:inline-block}.modal-fetch .fetch-method a{width:60px;position:absolute;right:20px;color:#ff6a00}.modal-fetch .fetch-method a:visited{color:#ff6a00}\n",""]),e.exports=t},236:function(e,t,n){"use strict";n.r(t);var a=n(19),o=n.n(a),c=n(23),l=n.n(c),r=n(3),i=n.n(r),s=(n(231),n(2)),p=n.n(s),u=n(1),d=n.n(u),f=n(0),h=n.n(f),m=n(15),v=n(120),b=n(106),x=n(119),g=n.n(x),E=n(29),w=n(10),y=n(7),C=n(9);function k(e){var t=e.open,n=e.onClose,a=Object(E.a)(),c="".concat(a.origin),r=Object(f.useContext)(w.a).values,s=Object(f.useContext)(C.a).dependencies,u=p()(s,"list"),d=Object(y.d)(r,u),x='git clone "'+"".concat(c,"/").concat(d,"/").concat(r.meta.artifact,".git")+'" '+"".concat(r.meta.artifact),k="".concat(c,"/starter.zip?").concat(d),j=Object(f.useState)("复制"),O=i()(j,2),z=O[0],R=O[1],T=(Object(f.useRef)(null),function(){var e=l()(o.a.mark((function e(){var t,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(a.origin,"/starter.zip"),e.next=3,Object(y.c)(t,r,p()(s,"list")).catch((function(){m.b.error("Could not connect to server. Please check your network.")}));case 3:c=e.sent,g.a.saveAs(c,"".concat(p()(r,"meta.artifact"),".zip")),n(),R("复制");case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());return h.a.createElement("div",null,h.a.createElement(v.a,{open:t,onClose:function(){n(),R("复制")},classNames:{modal:"modal-fetch",overlay:"overlay"},center:!0},h.a.createElement("div",null,h.a.createElement("h2",null,"获取完整项目代码"),h.a.createElement("div",null,h.a.createElement("div",{class:"fetch-method control"},h.a.createElement("span",null,"下载代码包:"),h.a.createElement("input",{class:"control-input",value:k,readonly:!0}),h.a.createElement("a",{href:"/#",onClick:function(e){e.preventDefault(),T()}},"下载")),h.a.createElement("div",{class:"fetch-method control"},h.a.createElement("span",null,"Git Clone 命令:"),h.a.createElement("input",{class:"control-input",value:x,readonly:!0}),h.a.createElement(b.CopyToClipboard,{onCopy:function(){R("已复制!"),setTimeout((function(){n(),R("复制")}),500)},text:x},h.a.createElement("a",{href:"/#",onClick:function(e){e.preventDefault()}},z)))))))}k.propTypes={open:d.a.bool.isRequired,onClose:d.a.func.isRequired},t.default=k}}]);
|
|
//# sourceMappingURL=chunk-9441d43ec76a401e7ca7.js.map
|