zhonghai_admin/index/assets/index-cb4c4d90.js
2025-08-18 11:04:38 +08:00

8 lines
12 KiB
JavaScript

import{c as et,g as nt}from"./tinymce-3184e0f1.js";import{_ as ot}from"./index-2a45336b.js";import{b as F,o as rt,c as it,w as S,e as v,K as C,u as T,aZ as at,E as k,G as ct,a_ as M,aa as z,M as st,N as ut}from"./ant-design-vue-710243d9.js";import"./echarts-ca5d9323.js";import"./cropper-47c8e461.js";import"./lodash-es-7cb071db.js";import"./qrcode-bec2257a.js";import"./jschardet-bd496279.js";var V={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/(function(O,E){(function(A,h){O.exports=h()})(et,function(){return function(){var _={686:function(a,c,t){t.d(c,{default:function(){return tt}});var u=t(279),l=t.n(u),f=t(370),m=t.n(f),y=t(817),b=t.n(y);function p(i){try{return document.execCommand(i)}catch(n){return!1}}var g=function(n){var e=b()(n);return p("cut"),e},d=g;function w(i){var n=document.documentElement.getAttribute("dir")==="rtl",e=document.createElement("textarea");e.style.fontSize="12pt",e.style.border="0",e.style.padding="0",e.style.margin="0",e.style.position="absolute",e.style[n?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;return e.style.top="".concat(o,"px"),e.setAttribute("readonly",""),e.value=i,e}var $=function(n,e){var o=w(n);e.container.appendChild(o);var r=b()(o);return p("copy"),o.remove(),r},B=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},o="";return typeof n=="string"?o=$(n,e):n instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(n==null?void 0:n.type)?o=$(n.value,e):(o=b()(n),p("copy")),o},j=B;function L(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(e){return typeof e}:L=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(i)}var U=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.action,o=e===void 0?"copy":e,r=n.container,s=n.target,x=n.text;if(o!=="copy"&&o!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(s!==void 0)if(s&&L(s)==="object"&&s.nodeType===1){if(o==="copy"&&s.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(o==="cut"&&(s.hasAttribute("readonly")||s.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(x)return j(x,{container:r});if(s)return o==="cut"?d(s):j(s,{container:r})},Y=U;function P(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(e){return typeof e}:P=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(i)}function G(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function H(i,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}function J(i,n,e){return n&&H(i.prototype,n),e&&H(i,e),i}function K(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),n&&I(i,n)}function I(i,n){return I=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},I(i,n)}function X(i){var n=Q();return function(){var o=N(i),r;if(n){var s=N(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return Z(this,r)}}function Z(i,n){return n&&(P(n)==="object"||typeof n=="function")?n:q(i)}function q(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Q(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}function N(i){return N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},N(i)}function D(i,n){var e="data-clipboard-".concat(i);if(n.hasAttribute(e))return n.getAttribute(e)}var W=function(i){K(e,i);var n=X(e);function e(o,r){var s;return G(this,e),s=n.call(this),s.resolveOptions(r),s.listenClick(o),s}return J(e,[{key:"resolveOptions",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof r.action=="function"?r.action:this.defaultAction,this.target=typeof r.target=="function"?r.target:this.defaultTarget,this.text=typeof r.text=="function"?r.text:this.defaultText,this.container=P(r.container)==="object"?r.container:document.body}},{key:"listenClick",value:function(r){var s=this;this.listener=m()(r,"click",function(x){return s.onClick(x)})}},{key:"onClick",value:function(r){var s=r.delegateTarget||r.currentTarget,x=this.action(s)||"copy",R=Y({action:x,container:this.container,target:this.target(s),text:this.text(s)});this.emit(R?"success":"error",{action:x,text:R,trigger:s,clearSelection:function(){s&&s.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(r){return D("action",r)}},{key:"defaultTarget",value:function(r){var s=D("target",r);if(s)return document.querySelector(s)}},{key:"defaultText",value:function(r){return D("text",r)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return j(r,s)}},{key:"cut",value:function(r){return d(r)}},{key:"isSupported",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],s=typeof r=="string"?[r]:r,x=!!document.queryCommandSupported;return s.forEach(function(R){x=x&&!!document.queryCommandSupported(R)}),x}}]),e}(l()),tt=W},828:function(a){var c=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}function u(l,f){for(;l&&l.nodeType!==c;){if(typeof l.matches=="function"&&l.matches(f))return l;l=l.parentNode}}a.exports=u},438:function(a,c,t){var u=t(828);function l(y,b,p,g,d){var w=m.apply(this,arguments);return y.addEventListener(p,w,d),{destroy:function(){y.removeEventListener(p,w,d)}}}function f(y,b,p,g,d){return typeof y.addEventListener=="function"?l.apply(null,arguments):typeof p=="function"?l.bind(null,document).apply(null,arguments):(typeof y=="string"&&(y=document.querySelectorAll(y)),Array.prototype.map.call(y,function(w){return l(w,b,p,g,d)}))}function m(y,b,p,g){return function(d){d.delegateTarget=u(d.target,b),d.delegateTarget&&g.call(y,d)}}a.exports=f},879:function(a,c){c.node=function(t){return t!==void 0&&t instanceof HTMLElement&&t.nodeType===1},c.nodeList=function(t){var u=Object.prototype.toString.call(t);return t!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in t&&(t.length===0||c.node(t[0]))},c.string=function(t){return typeof t=="string"||t instanceof String},c.fn=function(t){var u=Object.prototype.toString.call(t);return u==="[object Function]"}},370:function(a,c,t){var u=t(879),l=t(438);function f(p,g,d){if(!p&&!g&&!d)throw new Error("Missing required arguments");if(!u.string(g))throw new TypeError("Second argument must be a String");if(!u.fn(d))throw new TypeError("Third argument must be a Function");if(u.node(p))return m(p,g,d);if(u.nodeList(p))return y(p,g,d);if(u.string(p))return b(p,g,d);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function m(p,g,d){return p.addEventListener(g,d),{destroy:function(){p.removeEventListener(g,d)}}}function y(p,g,d){return Array.prototype.forEach.call(p,function(w){w.addEventListener(g,d)}),{destroy:function(){Array.prototype.forEach.call(p,function(w){w.removeEventListener(g,d)})}}}function b(p,g,d){return l(document.body,p,g,d)}a.exports=f},817:function(a){function c(t){var u;if(t.nodeName==="SELECT")t.focus(),u=t.value;else if(t.nodeName==="INPUT"||t.nodeName==="TEXTAREA"){var l=t.hasAttribute("readonly");l||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),l||t.removeAttribute("readonly"),u=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var f=window.getSelection(),m=document.createRange();m.selectNodeContents(t),f.removeAllRanges(),f.addRange(m),u=f.toString()}return u}a.exports=c},279:function(a){function c(){}c.prototype={on:function(t,u,l){var f=this.e||(this.e={});return(f[t]||(f[t]=[])).push({fn:u,ctx:l}),this},once:function(t,u,l){var f=this;function m(){f.off(t,m),u.apply(l,arguments)}return m._=u,this.on(t,m,l)},emit:function(t){var u=[].slice.call(arguments,1),l=((this.e||(this.e={}))[t]||[]).slice(),f=0,m=l.length;for(f;f<m;f++)l[f].fn.apply(l[f].ctx,u);return this},off:function(t,u){var l=this.e||(this.e={}),f=l[t],m=[];if(f&&u)for(var y=0,b=f.length;y<b;y++)f[y].fn!==u&&f[y].fn._!==u&&m.push(f[y]);return m.length?l[t]=m:delete l[t],this}},a.exports=c,a.exports.TinyEmitter=c}},A={};function h(a){if(A[a])return A[a].exports;var c=A[a]={exports:{}};return _[a](c,c.exports,h),c.exports}return function(){h.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return h.d(c,{a:c}),c}}(),function(){h.d=function(a,c){for(var t in c)h.o(c,t)&&!h.o(a,t)&&Object.defineProperty(a,t,{enumerable:!0,get:c[t]})}}(),function(){h.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)}}(),h(686)}().default})})(V);var lt=V.exports;const ft=nt(lt);const pt=O=>(st("data-v-bccde159"),O=O(),ut(),O),dt={class:"display-flex align-items-center",style:{"background-color":"#f6ffec",padding:"10px","box-sizing":"border-box",width:"100%"}},yt=pt(()=>C("p",null,"Open your browser and visit http://localhost:8040/swagger/index.html",-1)),gt=Object.assign({name:"home"},{__name:"index",setup(O){const E=()=>{const _=new ft(".copy-btn");_.on("success",A=>{A.clearSelection(),z.success("copy success!")}),_.on("error",()=>{z.error("copy error!")})};return(_,A)=>{const h=F("a-row"),a=F("a-card"),c=F("a-col");return rt(),it(h,{gutter:16},{default:S(()=>[v(c,{lg:24},{default:S(()=>[v(a,null,{default:S(()=>[v(h,{class:"align-center",type:"flex"},{default:S(()=>[C("p",dt,[v(T(at),{class:"mr-4-1 color-success"}),k(" "+ct(_.$t("pages.welcome.alertMessage")),1)])]),_:1})]),_:1}),v(a,{class:"mt-8-2",title:_.$t("pages.welcome.link")},{default:S(()=>[C("p",null,[k(" gin-admin-cli new -d ~/go/src --name testapp --desc 'A test API service based on golang.' --pkg 'github.com/xxx/testapp "),v(T(M),{style:{color:"#10a6fa"},class:"copy-btn","data-clipboard-text":` gin-admin-cli new -d ~/go/src --name testapp --desc 'A test API service based on golang.' --pkg\r
'github.com/xxx/testapp`,onClick:E})])]),_:1},8,["title"]),v(a,{class:"mt-8-2",title:_.$t("pages.welcome.quickStart")},{default:S(()=>[C("p",null,[k(" 1, gin-admin-cli new -d ~/go/src --name testapp --desc 'A test API service based on golang.' --pkg 'github.com/xxx/testapp' "),v(T(M),{style:{color:"#10a6fa"},class:"copy-btn","data-clipboard-text":"gin-admin-cli new -d ~/go/src --name testapp --desc 'A test API service based on golang.' --pkg 'github.com/xxx/testapp'",onClick:E})]),C("p",null,[k(" 2, cd ~/go/src/testapp "),v(T(M),{style:{color:"#10a6fa"},class:"copy-btn","data-clipboard-text":"cd ~/go/src/testapp",onClick:E})]),C("p",null,[k(" 3, make start "),v(T(M),{style:{color:"#10a6fa"},class:"copy-btn","data-clipboard-text":"make start",onClick:E})]),yt]),_:1},8,["title"]),v(a,{class:"mt-8-2",title:_.$t("pages.welcome.generate")},{default:S(()=>[C("p",null,[k(" gin-admin-cli gen -d . -m CMS -s Category --structs-comment 'Category management' "),v(T(M),{style:{color:"#10a6fa"},class:"copy-btn","data-clipboard-text":"gin-admin-cli gen -d . -m CMS -s Category --structs-comment 'Category management'",onClick:E})])]),_:1},8,["title"]),v(a,{class:"mt-8-2",title:_.$t("pages.welcome.remove")},{default:S(()=>[C("p",null,[k(" gin-admin-cli rm -d . -m CMS -s Category "),v(T(M),{style:{color:"#10a6fa"},class:"copy-btn","data-clipboard-text":"gin-admin-cli rm -d . -m CMS -s Category",onClick:E})])]),_:1},8,["title"])]),_:1})]),_:1})}}}),Et=ot(gt,[["__scopeId","data-v-bccde159"]]);export{Et as default};