@pubinfo/core 2.0.12 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AppSetting-B3jGWi0s.js → AppSetting-Df8mPhxN.js} +34 -34
- package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-D2OA6DQk.js → HCheckList.vue_vue_type_script_setup_true_lang-CD2VmdPG.js} +7 -6
- package/dist/{HToggle-wdIhtmUo.js → HToggle-CcxWxVmB.js} +1 -1
- package/dist/HeaderThinMenu-BMjyPDYS.js +4 -0
- package/dist/{PreferencesContent-BKKNflrp.js → PreferencesContent-Bu8-g2qs.js} +117 -117
- package/dist/{SettingBreadcrumb-DugZlP9x.js → SettingBreadcrumb-CTLEf4nt.js} +7 -7
- package/dist/{SettingCopyright-D6WXUaya.js → SettingCopyright-B_ZS9FXO.js} +5 -5
- package/dist/{SettingEnableTransition-Cl7uPofT.js → SettingEnableTransition-DgZyY8Rh.js} +16 -16
- package/dist/{SettingHome-Cbzfn9ko.js → SettingHome-BN6WzWxX.js} +10 -10
- package/dist/{SettingMenu-BfHW7kFB.js → SettingMenu-CNgEpRN_.js} +14 -14
- package/dist/{SettingMode-D4UfX577.js → SettingMode-B_Sf7CqN.js} +4 -4
- package/dist/{SettingNavSearch-B9_82zYn.js → SettingNavSearch-SQuD6lr7.js} +8 -8
- package/dist/{SettingOther-BcCr5K4d.js → SettingOther-CrgOHNra.js} +16 -16
- package/dist/{SettingPage-T9eoEZks.js → SettingPage-B4hfRME8.js} +4 -4
- package/dist/{SettingTabbar-DAnxa039.js → SettingTabbar-7EcsmyZo.js} +12 -12
- package/dist/{SettingThemes-D7JBXPTs.js → SettingThemes-CVjQoEk4.js} +9 -9
- package/dist/{SettingToolbar-DMiyIQkh.js → SettingToolbar-Bls_SdlL.js} +12 -12
- package/dist/{SettingTopbar-BX1DcBp9.js → SettingTopbar-jqUqG5vW.js} +10 -10
- package/dist/{SettingWidthMode-h2-4_TUO.js → SettingWidthMode-8LFo6UKy.js} +9 -9
- package/dist/abap-Y8Dl9g_6.js +6 -0
- package/dist/actionscript-3-DZzbMeqX.js +6 -0
- package/dist/ada-vP6ak0IW.js +6 -0
- package/dist/andromeeda-BIpZ7gaU.js +4 -0
- package/dist/angular-html-BmadGEgW.js +32 -0
- package/dist/angular-ts-D-QQnnGT.js +21 -0
- package/dist/apache-BUjz-sD2.js +6 -0
- package/dist/apex-D_wPycVx.js +6 -0
- package/dist/apl-sitt7C8I.js +16 -0
- package/dist/applescript-BPx7YFFu.js +6 -0
- package/dist/ara-Z2fSOxSw.js +6 -0
- package/dist/asciidoc-B-pCoB3G.js +6 -0
- package/dist/asm-BTWLY5ym.js +6 -0
- package/dist/astro-DHnp0xIo.js +18 -0
- package/dist/aurora-x-BwoVEUWZ.js +4 -0
- package/dist/awk-Fb0P9dkn.js +6 -0
- package/dist/ayu-dark-CxPZkpb2.js +4 -0
- package/dist/ballerina-oZK-YekG.js +6 -0
- package/dist/bat-0FvbqU9S.js +6 -0
- package/dist/beancount-DEfTbbFX.js +6 -0
- package/dist/berry-PwsHPR_K.js +6 -0
- package/dist/bibtex-EULQRLY5.js +6 -0
- package/dist/bicep-DFU2oTl7.js +6 -0
- package/dist/blade-OPzGcV14.js +20 -0
- package/dist/bsl-NkNNwerW.js +8 -0
- package/dist/built-in/layout-component/components/ui/HDialog.vue.d.ts +2 -2
- package/dist/built-in/layout-component/components/ui/HSlideover.vue.d.ts +2 -2
- package/dist/c-eeMepfLm.js +6 -0
- package/dist/cadence-DMRWHJp4.js +6 -0
- package/dist/cairo-DM6WF2e3.js +8 -0
- package/dist/catppuccin-frappe-5udUqgsX.js +4 -0
- package/dist/catppuccin-latte-ufkS-HWv.js +4 -0
- package/dist/catppuccin-macchiato-DzL2LPek.js +4 -0
- package/dist/catppuccin-mocha-DDDDwkUT.js +4 -0
- package/dist/clarity-BseSxcHx.js +6 -0
- package/dist/clojure-CXJfHrL3.js +6 -0
- package/dist/cmake-BJz8BOTU.js +6 -0
- package/dist/cobol-R4Vn9a46.js +10 -0
- package/dist/codeowners-Bt9yU6NX.js +6 -0
- package/dist/codeql-DHkodjjI.js +6 -0
- package/dist/coffee-Dl27lzbd.js +8 -0
- package/dist/common-lisp-EVqT9Zhp.js +6 -0
- package/dist/coq-B0L9upzn.js +6 -0
- package/dist/core/ctx.d.ts +1 -0
- package/dist/core/interface.d.ts +4 -2
- package/dist/cpp-Cj177cuW.js +18 -0
- package/dist/crystal-ymVvJzbZ.js +18 -0
- package/dist/csharp-DmxfTLWR.js +6 -0
- package/dist/css-CECN5uSL.js +6 -0
- package/dist/csv-CmYOceLb.js +6 -0
- package/dist/cue-ZzumE7IT.js +6 -0
- package/dist/cypher-jpdmjtA6.js +6 -0
- package/dist/d-CBagWSwH.js +6 -0
- package/dist/dark-plus-pUHDTVV0.js +4 -0
- package/dist/dart-6ObCrKr9.js +6 -0
- package/dist/dax-CcDT-8dH.js +6 -0
- package/dist/desktop-B93p9R9O.js +6 -0
- package/dist/diff-BxzP2J8R.js +6 -0
- package/dist/docker-CsHqm9tx.js +6 -0
- package/dist/dotenv-BMjVjUL1.js +6 -0
- package/dist/dracula-BtZx2Kac.js +4 -0
- package/dist/dracula-soft-BKa-aqBv.js +4 -0
- package/dist/dream-maker-PAx17jaB.js +6 -0
- package/dist/edge-_LvgTcmu.js +12 -0
- package/dist/elixir-BTCUAmQk.js +8 -0
- package/dist/elm-BtNbw_Cd.js +8 -0
- package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
- package/dist/erb-D0PIpZCP.js +10 -0
- package/dist/erlang-DNcDT8Hi.js +8 -0
- package/dist/everforest-dark-DMCBqXCK.js +4 -0
- package/dist/everforest-light-BbXl82Em.js +4 -0
- package/dist/features/components/PartyLogin/MethodSelect.vue.d.ts +10 -0
- package/dist/features/components/PartyLogin/Modal.vue.d.ts +31 -0
- package/dist/features/components/PartyLogin/ParamsItem.vue.d.ts +94 -0
- package/dist/features/components/PartyLogin/ParamsPanel.vue.d.ts +13 -0
- package/dist/features/components/PartyLogin/RequestFieldSelector.vue.d.ts +18 -0
- package/dist/features/components/PartyLogin/SystemFieldSelector.vue.d.ts +15 -0
- package/dist/features/components/PartyLogin/steps/One.vue.d.ts +28 -0
- package/dist/features/components/PartyLogin/steps/Two.vue.d.ts +14 -0
- package/dist/features/components/PartyLogin/type.d.ts +37 -0
- package/dist/features/components/PartyLogin/usePartyRequest.d.ts +21 -0
- package/dist/features/components/PubinfoIcon/props.d.ts +7 -0
- package/dist/features/components/index.d.ts +1 -0
- package/dist/features/composables/partyLogin.d.ts +13 -0
- package/dist/features/stores/modules/menu.d.ts +1 -0
- package/dist/features/stores/modules/route.d.ts +9 -0
- package/dist/features/stores/utils/routerHelper.d.ts +2 -1
- package/dist/fennel-N4WcXuKx.js +6 -0
- package/dist/fish-B6QqlqeT.js +6 -0
- package/dist/fluent-BMXUxfv1.js +6 -0
- package/dist/fortran-fixed-form-DUsA-VGo.js +8 -0
- package/dist/fortran-free-form-DPIT_jbP.js +6 -0
- package/dist/fsharp-Pr2u3cIG.js +8 -0
- package/dist/gdresource-BwtMIoBm.js +10 -0
- package/dist/gdscript-BifyeYhI.js +6 -0
- package/dist/gdshader-Bk8fF6yr.js +6 -0
- package/dist/genie-DzUvd7U9.js +6 -0
- package/dist/gherkin-DHRaV0YP.js +6 -0
- package/dist/git-commit-Bd32YZ0K.js +8 -0
- package/dist/git-rebase-ZWUFO_T4.js +8 -0
- package/dist/github-dark-DenFmJkN.js +4 -0
- package/dist/github-dark-default-BJPUVz4H.js +4 -0
- package/dist/github-dark-dimmed-DUshB20C.js +4 -0
- package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
- package/dist/github-light-JYsPkUQd.js +4 -0
- package/dist/github-light-default-D99KPAby.js +4 -0
- package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
- package/dist/gleam-Bv284lvN.js +6 -0
- package/dist/glimmer-js-CkxRszZZ.js +14 -0
- package/dist/glimmer-ts-Bi6BYQCn.js +14 -0
- package/dist/glsl-CkUcVZNK.js +8 -0
- package/dist/gnuplot-yPG9-sE_.js +6 -0
- package/dist/go-ChxJuLYK.js +6 -0
- package/dist/graphql-BLaPX4fU.js +14 -0
- package/dist/groovy-CJQTphOW.js +6 -0
- package/dist/gruvbox-dark-hard-C2ND4cMr.js +4 -0
- package/dist/gruvbox-dark-medium-C8k4c8au.js +4 -0
- package/dist/gruvbox-dark-soft-xx9Q6FaG.js +4 -0
- package/dist/gruvbox-light-hard-BpUXv5in.js +4 -0
- package/dist/gruvbox-light-medium-D3XFCoU1.js +4 -0
- package/dist/gruvbox-light-soft-u7hpfz6Z.js +4 -0
- package/dist/hack-Bx1jMtBC.js +10 -0
- package/dist/haml-6FagfhCM.js +10 -0
- package/dist/handlebars-Bd5Y4M6I.js +14 -0
- package/dist/haskell-WeIwNIP6.js +6 -0
- package/dist/haxe-TztHsm5T.js +6 -0
- package/dist/hcl-D438OF-I.js +6 -0
- package/dist/hjson-DYBUbqOl.js +6 -0
- package/dist/hlsl-Bk8TCZNL.js +6 -0
- package/dist/houston-BDYrDoDW.js +4 -0
- package/dist/html-7XVNRwN7.js +10 -0
- package/dist/html-derivative-BNxZ5Yf6.js +8 -0
- package/dist/http-WC357zBG.js +14 -0
- package/dist/hxml-GbqSQCLa.js +8 -0
- package/dist/hy-Brt5EZ7-.js +6 -0
- package/dist/imba-CimUv-Uh.js +6 -0
- package/dist/{index-BAIUGhyE.js → index-BX0RSX9i.js} +5 -5
- package/dist/index-Bl4PBBmY.js +2827 -0
- package/dist/{index-CfPeR7ym.js → index-C6HIzbdv.js} +1 -1
- package/dist/index-CUbMQSBZ.js +4 -0
- package/dist/{index-BqHnVVhW.js → index-Cc8zVLOC.js} +11 -10
- package/dist/{index-D77TmeiT.js → index-Cjl98Ty_.js} +7 -7
- package/dist/{index-Q4dgy_3e.js → index-Dalsj2EI.js} +58900 -33442
- package/dist/index-Dw9-vGGZ.js +24519 -0
- package/dist/index.js +59 -58
- package/dist/ini-BZIuRIvJ.js +6 -0
- package/dist/java-DY6VlHhP.js +6 -0
- package/dist/javascript-Dp1Jmi5H.js +6 -0
- package/dist/jinja-WEhOU5ES.js +11 -0
- package/dist/jison-c2JI40PB.js +8 -0
- package/dist/json-DxJze_jm.js +6 -0
- package/dist/json5-BT4Fjg39.js +6 -0
- package/dist/jsonc-CHjZD8gR.js +6 -0
- package/dist/jsonl-BGuvDmy9.js +6 -0
- package/dist/jsonnet-Bx2cfsXg.js +6 -0
- package/dist/jssm-BcADi6EI.js +6 -0
- package/dist/jsx-BtKADgXT.js +6 -0
- package/dist/julia-DcoDQokW.js +16 -0
- package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
- package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
- package/dist/kanagawa-wave-CQwozSzG.js +4 -0
- package/dist/kotlin-ByBMgTeR.js +6 -0
- package/dist/kusto-VWFLl2T0.js +6 -0
- package/dist/laserwave-6a00oqik.js +4 -0
- package/dist/latex-MZCpjnva.js +8 -0
- package/dist/lean-DXqEE_d1.js +6 -0
- package/dist/less-B1GLI2Di.js +6 -0
- package/dist/light-plus-CZuVqSLX.js +4 -0
- package/dist/liquid-3HHuHOZ2.js +14 -0
- package/dist/llvm-6RQLId6G.js +6 -0
- package/dist/log-Al8wyEFV.js +6 -0
- package/dist/logo-DBa4JDzV.js +6 -0
- package/dist/lua-kX5WP_P5.js +8 -0
- package/dist/luau-DtBSxLyz.js +6 -0
- package/dist/make-CsMclxtr.js +6 -0
- package/dist/markdown-CrScaQ96.js +6 -0
- package/dist/marko-DDi9qpQP.js +14 -0
- package/dist/material-theme-D6KBX41T.js +4 -0
- package/dist/material-theme-darker-CkRroheE.js +4 -0
- package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
- package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
- package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
- package/dist/matlab-BOAaUVP0.js +6 -0
- package/dist/mdc-FI2x3BiY.js +12 -0
- package/dist/mdx-BOhZZUJ8.js +6 -0
- package/dist/mermaid-B0ixDHKN.js +6 -0
- package/dist/min-dark-C7ak0t6c.js +4 -0
- package/dist/min-light-CKFxVcPp.js +4 -0
- package/dist/mipsasm-CTx18fBl.js +6 -0
- package/dist/mojo-BD611d7o.js +6 -0
- package/dist/monokai-C1KBYcO0.js +4 -0
- package/dist/move-DSb5dTSj.js +6 -0
- package/dist/narrat-DmhDCBs-.js +6 -0
- package/dist/nextflow-BAAEJxI_.js +6 -0
- package/dist/nginx-5vhPAEw3.js +8 -0
- package/dist/night-owl-Bm2rzalh.js +4 -0
- package/dist/nim-BhS8gg0S.js +20 -0
- package/dist/nix-ceY58Dty.js +6 -0
- package/dist/nord-CC5OiUXg.js +4 -0
- package/dist/nushell-CQi4NV-2.js +6 -0
- package/dist/objective-c-Itk8tzmv.js +6 -0
- package/dist/objective-cpp-DGt5UKRO.js +6 -0
- package/dist/ocaml-eSVK32Eg.js +6 -0
- package/dist/one-dark-pro-DTA3VF0_.js +4 -0
- package/dist/one-light-D9sNaUtq.js +4 -0
- package/dist/pascal-xy8pJNns.js +6 -0
- package/dist/perl-BoEn6HmT.js +16 -0
- package/dist/php-BRU9zhoN.js +18 -0
- package/dist/pick-Cghe_Z7L.js +12 -0
- package/dist/plastic-CSTz3KZp.js +4 -0
- package/dist/plsql-pVbGZfOv.js +6 -0
- package/dist/po-BNfHvqmm.js +6 -0
- package/dist/poimandres-C-VADXHD.js +4 -0
- package/dist/polar-CAZahv3u.js +6 -0
- package/dist/postcss-05aHdL-n.js +6 -0
- package/dist/powerquery-DI9HkTvs.js +6 -0
- package/dist/powershell-Clc4ydu-.js +6 -0
- package/dist/prisma-FZjmVtSl.js +6 -0
- package/dist/prolog-C5-yg4TO.js +6 -0
- package/dist/proto-MmCPeFAD.js +6 -0
- package/dist/pug-CJWI-qSo.js +12 -0
- package/dist/puppet-CUJHmnxV.js +6 -0
- package/dist/purescript-rUfGld-4.js +6 -0
- package/dist/python-BFNSHbwJ.js +6 -0
- package/dist/qml-D3ATcgGh.js +8 -0
- package/dist/qmldir-BInDYbpo.js +6 -0
- package/dist/qss-AeJTysr_.js +6 -0
- package/dist/r-Bm0uF0U2.js +6 -0
- package/dist/racket-B83wSAja.js +6 -0
- package/dist/raku-nEQ4ZJJ7.js +6 -0
- package/dist/razor-BPFYEoc9.js +10 -0
- package/dist/red-7y8PH7HH.js +4 -0
- package/dist/reg-m_s_Kiip.js +6 -0
- package/dist/regexp-BazyLpPg.js +6 -0
- package/dist/rel-BcRfyd6Q.js +6 -0
- package/dist/riscv-Ce8MAQLP.js +6 -0
- package/dist/rose-pine-Cr4kwgAY.js +4 -0
- package/dist/rose-pine-dawn-ClRRUdXX.js +4 -0
- package/dist/rose-pine-moon-ucNn3Gm8.js +4 -0
- package/dist/rst-B6mPMsKo.js +22 -0
- package/dist/ruby-DInklMmU.js +30 -0
- package/dist/rust-CLzF9zIN.js +6 -0
- package/dist/sas-fpEvgATw.js +8 -0
- package/dist/sass-DxHp5rTx.js +6 -0
- package/dist/scala-D4grkFkl.js +6 -0
- package/dist/scheme-BCRWuEm4.js +6 -0
- package/dist/scss-B1FaCqwR.js +8 -0
- package/dist/sdbl-B7T8abf4.js +6 -0
- package/dist/shaderlab-Cr62-Wb4.js +8 -0
- package/dist/shellscript-InADTalH.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +8 -0
- package/dist/slack-dark-i7wN4OET.js +4 -0
- package/dist/slack-ochin-ndHf0LoP.js +4 -0
- package/dist/smalltalk-BlI1_OkM.js +6 -0
- package/dist/snazzy-light-BlSJXAu4.js +4 -0
- package/dist/solarized-dark-UTmkh7lw.js +4 -0
- package/dist/solarized-light-BheCkDPT.js +4 -0
- package/dist/solidity-CneOhxmR.js +6 -0
- package/dist/soy-LybuU3Y_.js +8 -0
- package/dist/sparql-B0KWFEri.js +8 -0
- package/dist/splunk-CRXR8A9s.js +6 -0
- package/dist/sql-Cn_v3PB0.js +6 -0
- package/dist/ssh-config-DP-hNVbF.js +6 -0
- package/dist/stata-B8c5fTjX.js +8 -0
- package/dist/style.css +1 -1
- package/dist/stylus-CyKEU1Ej.js +6 -0
- package/dist/svelte-BjDUPxZ1.js +14 -0
- package/dist/swift-9UzSvamq.js +6 -0
- package/dist/synthwave-84-NU3C_KFZ.js +4 -0
- package/dist/system-verilog-BCm7smPJ.js +6 -0
- package/dist/systemd-C-4qm6XH.js +6 -0
- package/dist/talonscript-CFF3LF_O.js +6 -0
- package/dist/tasl-Cg_WBUAe.js +6 -0
- package/dist/tcl-DN7buRTF.js +6 -0
- package/dist/templ-Brj2RH7A.js +12 -0
- package/dist/terraform-DGvcn9zM.js +6 -0
- package/dist/tex-CmrLTxbG.js +8 -0
- package/dist/tokyo-night-DP4TmcQl.js +4 -0
- package/dist/toml-DY62mUL_.js +6 -0
- package/dist/ts-tags-CZMzuZh-.js +41 -0
- package/dist/tsv-BtvSkaG0.js +6 -0
- package/dist/tsx-B8rCNbgL.js +6 -0
- package/dist/turtle-_H59FV7D.js +6 -0
- package/dist/twig-GjIxYqCX.js +18 -0
- package/dist/typescript-mg6ATTE8.js +6 -0
- package/dist/typespec-Djmco60m.js +6 -0
- package/dist/typst-D_1QKWns.js +6 -0
- package/dist/v-BW14IZv7.js +6 -0
- package/dist/vala-uxaPR7d1.js +6 -0
- package/dist/vb-D8_c5-KN.js +6 -0
- package/dist/verilog-B-bybjPF.js +6 -0
- package/dist/vesper-BckBta1U.js +4 -0
- package/dist/vhdl-CUlNa8ac.js +6 -0
- package/dist/viml-DsfA-sWm.js +6 -0
- package/dist/vitesse-black-BoGvW84i.js +4 -0
- package/dist/vitesse-dark-Cym-eLtO.js +4 -0
- package/dist/vitesse-light-CcmG315c.js +4 -0
- package/dist/vue-D-ba2-Rx.js +31 -0
- package/dist/vue-html-Dn2ZoOSz.js +10 -0
- package/dist/vue-vine-Jmfkm6lF.js +20 -0
- package/dist/vyper-CPQuu50u.js +6 -0
- package/dist/wasm-BBXxrAl7.js +6 -0
- package/dist/wasm-DQxwEHae.js +7 -0
- package/dist/wenyan-pbVjoM9_.js +6 -0
- package/dist/wgsl-DY4iK1q1.js +6 -0
- package/dist/wikitext-Z-MoUasO.js +6 -0
- package/dist/wit-CQMQOlTg.js +6 -0
- package/dist/wolfram-Dz4KXISs.js +6 -0
- package/dist/xml-C2J0sS9M.js +8 -0
- package/dist/xsl-BmSZphgC.js +8 -0
- package/dist/yaml-DaO7k5B1.js +6 -0
- package/dist/zenscript-CxBjpf9c.js +6 -0
- package/dist/zig-Vm0PO9wB.js +6 -0
- package/package.json +7 -5
- package/src/built-in/layout-component/components/Content/IframeView.vue +28 -2
- package/src/built-in/layout-component/components/Header/HeaderFullMenu/index.vue +2 -1
- package/src/built-in/layout-component/components/Header/index.vue +9 -2
- package/src/built-in/layout-component/components/Menu/index.vue +13 -2
- package/src/built-in/layout-component/components/Menu/item.vue +2 -0
- package/src/built-in/layout-component/components/Sidebar/SubSidebar.vue +6 -2
- package/src/built-in/layout-component/components/Topbar/Tabbar/index.vue +2 -0
- package/src/built-in/layout-component/components/Topbar/index.vue +21 -7
- package/src/built-in/layout-component/composables/useContext.ts +1 -1
- package/src/core/create.ts +3 -0
- package/src/core/ctx.ts +14 -0
- package/src/core/interface.ts +5 -2
- package/src/features/components/PartyLogin/MethodSelect.vue +32 -0
- package/src/features/components/PartyLogin/Modal.vue +370 -0
- package/src/features/components/PartyLogin/ParamsItem.vue +196 -0
- package/src/features/components/PartyLogin/ParamsPanel.vue +61 -0
- package/src/features/components/PartyLogin/README.md +621 -0
- package/src/features/components/PartyLogin/RequestFieldSelector.vue +205 -0
- package/src/features/components/PartyLogin/SystemFieldSelector.vue +213 -0
- package/src/features/components/PartyLogin/steps/One.vue +212 -0
- package/src/features/components/PartyLogin/steps/Two.vue +86 -0
- package/src/features/components/PartyLogin/type.ts +43 -0
- package/src/features/components/PartyLogin/usePartyRequest.ts +244 -0
- package/src/features/components/PubinfoIcon/index.vue +26 -4
- package/src/features/components/PubinfoIcon/props.ts +7 -0
- package/src/features/components/index.ts +2 -1
- package/src/features/composables/partyLogin.ts +423 -0
- package/src/features/settings/index.ts +0 -1
- package/src/features/stores/modules/menu.ts +10 -20
- package/src/features/stores/modules/route.ts +140 -39
- package/src/features/stores/utils/routerHelper.ts +8 -23
- package/types/components.d.ts +11 -0
- package/types/menu.d.ts +2 -0
- package/types/settings.d.ts +0 -6
- package/types/vue-router.d.ts +5 -1
- package/dist/HeaderThinMenu-CzAyTOhQ.js +0 -4
- package/dist/colors-CIY2S0v0.js +0 -25
- package/dist/features/components/MicroAppContainer/index.vue.d.ts +0 -2
- package/dist/index-7WoSPUpd.js +0 -8135
- package/dist/index-B041J475.js +0 -271
- package/dist/index-Bk-Yxmj1.js +0 -4
- package/dist/index-LOaJK4GI.js +0 -35319
- package/dist/pick-Drqqoyjl.js +0 -12
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface TreeNode {
|
|
3
|
+
title: string
|
|
4
|
+
value: string
|
|
5
|
+
key: string
|
|
6
|
+
selectable?: boolean
|
|
7
|
+
disabled?: boolean
|
|
8
|
+
children?: TreeNode[]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
defineOptions({
|
|
12
|
+
name: 'RequestFieldSelector',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
requestData?: any
|
|
17
|
+
}>();
|
|
18
|
+
|
|
19
|
+
const value = defineModel<string | number | 'true' | 'false'>('value', {
|
|
20
|
+
default: '',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const requestKey = defineModel<string | undefined>('requestKey', {
|
|
24
|
+
default: undefined,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
function isPrimitive(val: unknown): val is string | number | boolean | null | undefined {
|
|
28
|
+
const t = typeof val;
|
|
29
|
+
return val == null || t === 'string' || t === 'number' || t === 'boolean';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function normalizeParamValue(val: unknown): string | number | 'true' | 'false' {
|
|
33
|
+
if (typeof val === 'boolean') {
|
|
34
|
+
return val ? 'true' : 'false';
|
|
35
|
+
}
|
|
36
|
+
if (typeof val === 'number') {
|
|
37
|
+
return val;
|
|
38
|
+
}
|
|
39
|
+
if (val == null) {
|
|
40
|
+
return '';
|
|
41
|
+
}
|
|
42
|
+
return String(val);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function stringifyPreview(val: unknown): string {
|
|
46
|
+
if (typeof val === 'boolean') {
|
|
47
|
+
return val ? 'true' : 'false';
|
|
48
|
+
}
|
|
49
|
+
if (typeof val === 'number') {
|
|
50
|
+
return String(val);
|
|
51
|
+
}
|
|
52
|
+
if (val == null) {
|
|
53
|
+
return '';
|
|
54
|
+
}
|
|
55
|
+
if (typeof val === 'string') {
|
|
56
|
+
return val;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
return JSON.stringify(val);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return String(val);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function buildChildren(obj: any, path: string[] = []): TreeNode[] {
|
|
67
|
+
const nodes: TreeNode[] = [];
|
|
68
|
+
Object.keys(obj ?? {}).forEach((k) => {
|
|
69
|
+
const v = obj[k];
|
|
70
|
+
const nextPath = [...path, k];
|
|
71
|
+
const key = nextPath.join('.');
|
|
72
|
+
|
|
73
|
+
// 处理数组类型:每个元素作为独立节点,但标题显示元素值而不是索引
|
|
74
|
+
if (Array.isArray(v)) {
|
|
75
|
+
const children: TreeNode[] = [];
|
|
76
|
+
v.forEach((item, index) => {
|
|
77
|
+
const itemKey = `${key}.${index}`;
|
|
78
|
+
if (isPrimitive(item)) {
|
|
79
|
+
// 对于原始类型的数组元素,标题显示实际值
|
|
80
|
+
children.push({ title: String(item), value: itemKey, key: itemKey });
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
// 对于对象类型的数组元素,标题显示索引,然后递归处理
|
|
84
|
+
const itemChildren = buildChildren(item, [...nextPath, String(index)]);
|
|
85
|
+
children.push({ title: `[${index}]`, value: itemKey, key: itemKey, selectable: false, children: itemChildren });
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
nodes.push({ title: k, value: key, key, selectable: false, children });
|
|
89
|
+
}
|
|
90
|
+
else if (v && typeof v === 'object' && !isPrimitive(v)) {
|
|
91
|
+
const children = buildChildren(v, nextPath);
|
|
92
|
+
nodes.push({ title: k, value: key, key, selectable: false, children });
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
// 只显示字段名,不显示值
|
|
96
|
+
nodes.push({ title: k, value: key, key });
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return nodes;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const treeData = computed<TreeNode[]>(() => {
|
|
103
|
+
if (!props.requestData) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
return buildChildren(props.requestData);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
function resolveValueByKey(key: string): unknown {
|
|
110
|
+
if (!props.requestData) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
let cur: any = props.requestData;
|
|
114
|
+
for (const seg of key.split('.')) {
|
|
115
|
+
if (!seg) {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
cur = cur?.[seg];
|
|
119
|
+
}
|
|
120
|
+
return cur;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const requestSelect = ref<{ value: string, label: string } | undefined>();
|
|
124
|
+
|
|
125
|
+
function updateParamFromRequestKey(key: string) {
|
|
126
|
+
const raw = resolveValueByKey(key);
|
|
127
|
+
const normalized = normalizeParamValue(raw);
|
|
128
|
+
value.value = normalized;
|
|
129
|
+
requestKey.value = key;
|
|
130
|
+
// 在选择器中显示实际数据值
|
|
131
|
+
requestSelect.value = { value: key, label: stringifyPreview(raw) };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function initRequestSelection() {
|
|
135
|
+
// 不自动选择,让用户手动选择
|
|
136
|
+
requestSelect.value = undefined;
|
|
137
|
+
value.value = '';
|
|
138
|
+
requestKey.value = undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Restore selection when component mounts if requestKey exists
|
|
142
|
+
onMounted(() => {
|
|
143
|
+
if (requestKey.value && props.requestData) {
|
|
144
|
+
const raw = resolveValueByKey(requestKey.value);
|
|
145
|
+
requestSelect.value = { value: requestKey.value, label: stringifyPreview(raw) };
|
|
146
|
+
}
|
|
147
|
+
// 如果没有请求数据但有 requestKey,确保 value 有值用于显示
|
|
148
|
+
else if (requestKey.value && !props.requestData) {
|
|
149
|
+
// requestKey 本身就是字段路径,直接显示即可
|
|
150
|
+
if (!value.value) {
|
|
151
|
+
value.value = requestKey.value;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
function handleRequestChange(v: any) {
|
|
157
|
+
if (v && v.value) {
|
|
158
|
+
updateParamFromRequestKey(v.value);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
requestSelect.value = undefined;
|
|
162
|
+
value.value = '';
|
|
163
|
+
requestKey.value = undefined;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 如果有请求数据,实时跟随数据的变化更新值
|
|
168
|
+
watchEffect(() => {
|
|
169
|
+
if (requestSelect.value?.value && props.requestData) {
|
|
170
|
+
const raw = resolveValueByKey(requestSelect.value.value);
|
|
171
|
+
value.value = normalizeParamValue(raw);
|
|
172
|
+
requestSelect.value = { value: requestSelect.value.value, label: stringifyPreview(raw) };
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// 暴露初始化方法给父组件
|
|
177
|
+
defineExpose({
|
|
178
|
+
initRequestSelection,
|
|
179
|
+
});
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<template>
|
|
183
|
+
<div>
|
|
184
|
+
<!-- 如果有请求数据,显示树形选择器 -->
|
|
185
|
+
<a-tree-select
|
|
186
|
+
v-if="requestData"
|
|
187
|
+
v-model:value="requestSelect"
|
|
188
|
+
label-in-value
|
|
189
|
+
:tree-data="treeData"
|
|
190
|
+
placeholder="Value"
|
|
191
|
+
allow-clear
|
|
192
|
+
show-search
|
|
193
|
+
class="w-full!"
|
|
194
|
+
@change="handleRequestChange"
|
|
195
|
+
/>
|
|
196
|
+
<!-- 如果没有请求数据,显示普通输入框 -->
|
|
197
|
+
<!-- 当回显时(有 requestKey),显示当前值;否则让用户手动输入 -->
|
|
198
|
+
<a-input
|
|
199
|
+
v-else
|
|
200
|
+
v-model:value="value"
|
|
201
|
+
:placeholder="requestKey ? '从请求结果获取的值' : 'Value'"
|
|
202
|
+
class="w-full"
|
|
203
|
+
/>
|
|
204
|
+
</div>
|
|
205
|
+
</template>
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { getActivePinia } from 'pinia';
|
|
3
|
+
|
|
4
|
+
interface TreeNode {
|
|
5
|
+
title: string
|
|
6
|
+
value: string
|
|
7
|
+
key: string
|
|
8
|
+
selectable?: boolean
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
children?: TreeNode[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
defineOptions({
|
|
14
|
+
name: 'SystemFieldSelector',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const value = defineModel<string | number | 'true' | 'false'>('value', {
|
|
18
|
+
default: '',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const systemKey = defineModel<string | undefined>('systemKey', {
|
|
22
|
+
default: undefined,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function isPrimitive(val: unknown): val is string | number | boolean | null | undefined {
|
|
26
|
+
const t = typeof val;
|
|
27
|
+
return val == null || t === 'string' || t === 'number' || t === 'boolean';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function normalizeParamValue(val: unknown): string | number | 'true' | 'false' {
|
|
31
|
+
if (typeof val === 'boolean') {
|
|
32
|
+
return val ? 'true' : 'false';
|
|
33
|
+
}
|
|
34
|
+
if (typeof val === 'number') {
|
|
35
|
+
return val;
|
|
36
|
+
}
|
|
37
|
+
if (val == null) {
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
40
|
+
return String(val);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function stringifyPreview(val: unknown): string {
|
|
44
|
+
if (typeof val === 'boolean') {
|
|
45
|
+
return val ? 'true' : 'false';
|
|
46
|
+
}
|
|
47
|
+
if (typeof val === 'number') {
|
|
48
|
+
return String(val);
|
|
49
|
+
}
|
|
50
|
+
if (val == null) {
|
|
51
|
+
return '';
|
|
52
|
+
}
|
|
53
|
+
if (typeof val === 'string') {
|
|
54
|
+
return val;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
return JSON.stringify(val);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return String(val);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function buildChildren(storeId: string, obj: any, path: string[] = []): TreeNode[] {
|
|
65
|
+
const nodes: TreeNode[] = [];
|
|
66
|
+
Object.keys(obj ?? {}).forEach((k) => {
|
|
67
|
+
const v = obj[k];
|
|
68
|
+
const nextPath = [...path, k];
|
|
69
|
+
const key = `${storeId}:${nextPath.join('.')}`;
|
|
70
|
+
|
|
71
|
+
// 处理数组类型:每个元素作为独立节点,但标题显示元素值而不是索引
|
|
72
|
+
if (Array.isArray(v)) {
|
|
73
|
+
const children: TreeNode[] = [];
|
|
74
|
+
v.forEach((item, index) => {
|
|
75
|
+
const itemKey = `${key}.${index}`;
|
|
76
|
+
if (isPrimitive(item)) {
|
|
77
|
+
// 对于原始类型的数组元素,标题显示实际值
|
|
78
|
+
children.push({ title: String(item), value: itemKey, key: itemKey });
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
// 对于对象类型的数组元素,标题显示索引,然后递归处理
|
|
82
|
+
const itemChildren = buildChildren(storeId, item, [...nextPath, k, String(index)]);
|
|
83
|
+
children.push({ title: `[${index}]`, value: itemKey, key: itemKey, selectable: false, children: itemChildren });
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
nodes.push({ title: k, value: key, key, selectable: false, children });
|
|
87
|
+
}
|
|
88
|
+
else if (v && typeof v === 'object' && !isPrimitive(v)) {
|
|
89
|
+
const children = buildChildren(storeId, v, nextPath);
|
|
90
|
+
nodes.push({ title: k, value: key, key, selectable: false, children });
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
// 只显示字段名,不显示值
|
|
94
|
+
nodes.push({ title: k, value: key, key });
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return nodes;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const treeData = computed<TreeNode[]>(() => {
|
|
101
|
+
const pinia: any = getActivePinia?.();
|
|
102
|
+
if (!pinia || !pinia._s) {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
const items: TreeNode[] = [];
|
|
106
|
+
(pinia._s as Map<string, any>).forEach((store, id) => {
|
|
107
|
+
// 只显示 user store 的数据
|
|
108
|
+
if (id === 'user') {
|
|
109
|
+
const children = buildChildren(id, store.$state);
|
|
110
|
+
items.push({ title: id, value: id, key: id, selectable: false, children });
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return items;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
function resolveValueByKey(key: string): unknown {
|
|
117
|
+
const [storeId, ...rest] = key.split(':');
|
|
118
|
+
const path = rest.join(':');
|
|
119
|
+
const pinia: any = getActivePinia?.();
|
|
120
|
+
const store = pinia?._s?.get(storeId);
|
|
121
|
+
if (!store) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
let cur: any = store.$state;
|
|
125
|
+
if (!path) {
|
|
126
|
+
return cur;
|
|
127
|
+
}
|
|
128
|
+
for (const seg of path.split('.')) {
|
|
129
|
+
if (!seg) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
cur = cur?.[seg];
|
|
133
|
+
}
|
|
134
|
+
return cur;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function findFirstLeaf(nodes: TreeNode[]): TreeNode | undefined {
|
|
138
|
+
for (const n of nodes) {
|
|
139
|
+
if (!n.children || n.children.length === 0) {
|
|
140
|
+
return n;
|
|
141
|
+
}
|
|
142
|
+
const child = findFirstLeaf(n.children);
|
|
143
|
+
if (child) {
|
|
144
|
+
return child;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return undefined;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const systemSelect = ref<{ value: string, label: string } | undefined>();
|
|
151
|
+
|
|
152
|
+
function updateParamFromSystemKey(key: string) {
|
|
153
|
+
const raw = resolveValueByKey(key);
|
|
154
|
+
const normalized = normalizeParamValue(raw);
|
|
155
|
+
value.value = normalized;
|
|
156
|
+
systemKey.value = key;
|
|
157
|
+
// 在选择器中显示实际数据值
|
|
158
|
+
systemSelect.value = { value: key, label: stringifyPreview(raw) };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function initSystemSelection() {
|
|
162
|
+
// 不自动选择,让用户手动选择
|
|
163
|
+
systemSelect.value = undefined;
|
|
164
|
+
value.value = '';
|
|
165
|
+
systemKey.value = undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Restore selection when component mounts if systemKey exists
|
|
169
|
+
onMounted(() => {
|
|
170
|
+
if (systemKey.value) {
|
|
171
|
+
const raw = resolveValueByKey(systemKey.value);
|
|
172
|
+
systemSelect.value = { value: systemKey.value, label: stringifyPreview(raw) };
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
function handleSystemChange(v: any) {
|
|
177
|
+
if (v && v.value) {
|
|
178
|
+
updateParamFromSystemKey(v.value);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
systemSelect.value = undefined;
|
|
182
|
+
value.value = '';
|
|
183
|
+
systemKey.value = undefined;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
watchEffect(() => {
|
|
188
|
+
if (systemSelect.value?.value) {
|
|
189
|
+
// 跟随 pinia 状态的变化,实时刷新 paramValue 和选择器显示的值
|
|
190
|
+
const raw = resolveValueByKey(systemSelect.value.value);
|
|
191
|
+
value.value = normalizeParamValue(raw);
|
|
192
|
+
systemSelect.value = { value: systemSelect.value.value, label: stringifyPreview(raw) };
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
// 暴露初始化方法给父组件
|
|
197
|
+
defineExpose({
|
|
198
|
+
initSystemSelection,
|
|
199
|
+
});
|
|
200
|
+
</script>
|
|
201
|
+
|
|
202
|
+
<template>
|
|
203
|
+
<a-tree-select
|
|
204
|
+
v-model:value="systemSelect"
|
|
205
|
+
label-in-value
|
|
206
|
+
:tree-data="treeData"
|
|
207
|
+
placeholder="Value"
|
|
208
|
+
allow-clear
|
|
209
|
+
show-search
|
|
210
|
+
class="w-full!"
|
|
211
|
+
@change="handleSystemChange"
|
|
212
|
+
/>
|
|
213
|
+
</template>
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTTPMethod, HTTPParamsValue, ParamItem } from '../type';
|
|
3
|
+
import { DeleteOutlined, PlusOutlined, SendOutlined } from '@ant-design/icons-vue';
|
|
4
|
+
import { codeToHtml } from 'shiki';
|
|
5
|
+
import MethodSelect from '../MethodSelect.vue';
|
|
6
|
+
import HttpParamsItem from '../ParamsItem.vue';
|
|
7
|
+
import HttpParamsPanel from '../ParamsPanel.vue';
|
|
8
|
+
|
|
9
|
+
defineOptions({
|
|
10
|
+
name: 'PartyLoginStepOne',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const props = defineProps<{
|
|
14
|
+
isFetching: boolean
|
|
15
|
+
isFinished: boolean
|
|
16
|
+
statusCode: number | null | undefined
|
|
17
|
+
elapsedTime: number | null | undefined
|
|
18
|
+
data: any
|
|
19
|
+
}>();
|
|
20
|
+
|
|
21
|
+
const emit = defineEmits<{
|
|
22
|
+
send: []
|
|
23
|
+
}>();
|
|
24
|
+
|
|
25
|
+
const httpURL = defineModel<string>('url', {
|
|
26
|
+
default: '',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const httpMethod = defineModel<HTTPMethod>('method', {
|
|
30
|
+
default: 'GET',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const httpParams = defineModel<HTTPParamsValue>('params', {
|
|
34
|
+
default: 'query',
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const panelItems = defineModel<Record<HTTPParamsValue, ParamItem[]>>('panelItems', {
|
|
38
|
+
required: true,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const currentItems = computed(() => panelItems.value[httpParams.value]);
|
|
42
|
+
|
|
43
|
+
function handleAddItem() {
|
|
44
|
+
const uid = Date.now(); // Use timestamp for unique ID
|
|
45
|
+
panelItems.value[httpParams.value].push({
|
|
46
|
+
id: uid,
|
|
47
|
+
checked: true,
|
|
48
|
+
keyName: '',
|
|
49
|
+
type: 'string',
|
|
50
|
+
value: '',
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function handleClearAll() {
|
|
55
|
+
panelItems.value[httpParams.value] = [];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function handleRemoveItem(id: number) {
|
|
59
|
+
const list = panelItems.value[httpParams.value];
|
|
60
|
+
const idx = list.findIndex(i => i.id === id);
|
|
61
|
+
if (idx >= 0) {
|
|
62
|
+
list.splice(idx, 1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function handleSend() {
|
|
67
|
+
emit('send');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Response display computed properties
|
|
71
|
+
const statusColor = computed(() => {
|
|
72
|
+
const code = props.statusCode || 0;
|
|
73
|
+
if (code >= 200 && code < 300) {
|
|
74
|
+
return 'success';
|
|
75
|
+
}
|
|
76
|
+
if (code >= 300 && code < 400) {
|
|
77
|
+
return 'processing';
|
|
78
|
+
}
|
|
79
|
+
if (code >= 400 && code < 500) {
|
|
80
|
+
return 'warning';
|
|
81
|
+
}
|
|
82
|
+
if (code >= 500) {
|
|
83
|
+
return 'error';
|
|
84
|
+
}
|
|
85
|
+
return 'default';
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const elapsedTimeColor = computed(() => {
|
|
89
|
+
const time = props.elapsedTime || 0;
|
|
90
|
+
if (time < 80) {
|
|
91
|
+
return 'success';
|
|
92
|
+
}
|
|
93
|
+
if (time < 200) {
|
|
94
|
+
return 'processing';
|
|
95
|
+
}
|
|
96
|
+
if (time < 500) {
|
|
97
|
+
return 'warning';
|
|
98
|
+
}
|
|
99
|
+
return 'error';
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const formattedHtml = ref<string>('');
|
|
103
|
+
|
|
104
|
+
// Watch data changes and update formatted HTML
|
|
105
|
+
watch(() => props.data, async (newData) => {
|
|
106
|
+
if (newData != null) {
|
|
107
|
+
try {
|
|
108
|
+
// Convert data to formatted JSON string
|
|
109
|
+
const jsonString = typeof newData === 'string'
|
|
110
|
+
? newData
|
|
111
|
+
: JSON.stringify(newData, null, 2);
|
|
112
|
+
|
|
113
|
+
formattedHtml.value = await codeToHtml(jsonString, {
|
|
114
|
+
lang: 'json',
|
|
115
|
+
themes: {
|
|
116
|
+
light: 'vitesse-light',
|
|
117
|
+
dark: 'vitesse-dark',
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
console.error('Failed to format data:', error);
|
|
123
|
+
// Fallback to plain text display
|
|
124
|
+
formattedHtml.value = `<pre>${String(newData)}</pre>`;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
formattedHtml.value = '';
|
|
129
|
+
}
|
|
130
|
+
}, { immediate: true });
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<template>
|
|
134
|
+
<div class="size-full flex flex-col">
|
|
135
|
+
<!-- toolbar -->
|
|
136
|
+
<div class="flex flex-col gap-2 flex-none top-0 z-10! p-4">
|
|
137
|
+
<div class="flex gap-2 items-center">
|
|
138
|
+
<MethodSelect v-model="httpMethod" />
|
|
139
|
+
<a-input v-model:value="httpURL" placeholder="请输入调用的第三方的 http/https 请求地址" />
|
|
140
|
+
<a-button type="primary" :loading="isFetching" :disabled="!httpURL" @click="handleSend">
|
|
141
|
+
<SendOutlined />
|
|
142
|
+
</a-button>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
<!-- params -->
|
|
146
|
+
<div class="flex flex-wrap justify-between gap-2 items-center w-full text-sm text-center border-b-solid border-b border-b-[var(--g-border-color)] px-4 pb-2">
|
|
147
|
+
<HttpParamsPanel v-model="httpParams" :method="httpMethod" />
|
|
148
|
+
</div>
|
|
149
|
+
<div class="relative border-b-solid border-b border-b-[var(--g-border-color)]">
|
|
150
|
+
<div class="p-4 flex flex-col gap-4 max-h-xs of-y-auto">
|
|
151
|
+
<!-- items -->
|
|
152
|
+
<template v-if="currentItems.length">
|
|
153
|
+
<div class="flex flex-col gap-2">
|
|
154
|
+
<HttpParamsItem
|
|
155
|
+
v-for="item in currentItems"
|
|
156
|
+
:key="item.id"
|
|
157
|
+
v-model:checked="item.checked"
|
|
158
|
+
v-model:key-name="item.keyName"
|
|
159
|
+
v-model:type="item.type"
|
|
160
|
+
v-model:value="item.value"
|
|
161
|
+
v-model:system-key="item.systemKey"
|
|
162
|
+
@remove="handleRemoveItem(item.id)"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
166
|
+
<!-- item action -->
|
|
167
|
+
<div class="flex gap-4">
|
|
168
|
+
<a-button @click="handleAddItem">
|
|
169
|
+
<template #icon>
|
|
170
|
+
<PlusOutlined />
|
|
171
|
+
</template>
|
|
172
|
+
添加
|
|
173
|
+
</a-button>
|
|
174
|
+
<div class="flex-auto" />
|
|
175
|
+
<a-button v-if="currentItems.length" danger @click="handleClearAll">
|
|
176
|
+
<template #icon>
|
|
177
|
+
<DeleteOutlined />
|
|
178
|
+
</template>
|
|
179
|
+
删除全部
|
|
180
|
+
</a-button>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
<!-- content -->
|
|
185
|
+
<template v-if="isFinished">
|
|
186
|
+
<div class="border-b-solid border-b border-b-[var(--g-border-color)] flex gap-2 px-4 py-2 items-center">
|
|
187
|
+
<div>Response</div>
|
|
188
|
+
<a-tag :bordered="false" :color="statusColor">
|
|
189
|
+
{{ statusCode }}
|
|
190
|
+
</a-tag>
|
|
191
|
+
<div class="flex-auto" />
|
|
192
|
+
<div class="op-50">
|
|
193
|
+
Request finished in
|
|
194
|
+
</div>
|
|
195
|
+
<a-tag :bordered="false" :color="elapsedTimeColor">
|
|
196
|
+
{{ `${elapsedTime} ms` }}
|
|
197
|
+
</a-tag>
|
|
198
|
+
</div>
|
|
199
|
+
<pre class="w-full mt-2 rounded text-sm whitespace-pre-wrap break-all of-auto! flex-1 px-4" v-html="formattedHtml" />
|
|
200
|
+
</template>
|
|
201
|
+
<template v-else>
|
|
202
|
+
<div class="h-full border-b-solid border-b border-b-[var(--g-border-color)] flex gap-2 px-4 py-2 items-center justify-center">
|
|
203
|
+
<a-button :loading="isFetching" :disabled="!httpURL" @click="handleSend">
|
|
204
|
+
<template #icon>
|
|
205
|
+
<SendOutlined />
|
|
206
|
+
</template>
|
|
207
|
+
发送请求
|
|
208
|
+
</a-button>
|
|
209
|
+
</div>
|
|
210
|
+
</template>
|
|
211
|
+
</div>
|
|
212
|
+
</template>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ParamItem } from '../type';
|
|
3
|
+
import { DeleteOutlined, PlusOutlined } from '@ant-design/icons-vue';
|
|
4
|
+
import HttpParamsItem from '../ParamsItem.vue';
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
name: 'PartyLoginStepTwo',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
url?: string
|
|
12
|
+
requestData?: any
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
const oauthParams = defineModel<ParamItem[]>('oauthParams', {
|
|
16
|
+
default: () => [],
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function handleAddItem() {
|
|
20
|
+
const uid = Date.now(); // Use timestamp for unique ID
|
|
21
|
+
oauthParams.value.push({
|
|
22
|
+
id: uid,
|
|
23
|
+
checked: true,
|
|
24
|
+
keyName: '',
|
|
25
|
+
type: 'string',
|
|
26
|
+
value: '',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function handleClearAll() {
|
|
31
|
+
oauthParams.value = [];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function handleRemoveItem(id: number) {
|
|
35
|
+
const idx = oauthParams.value.findIndex(i => i.id === id);
|
|
36
|
+
if (idx >= 0) {
|
|
37
|
+
oauthParams.value.splice(idx, 1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<div class="size-full flex flex-col">
|
|
44
|
+
<div class="flex flex-col gap-2 flex-none top-0 z-10! p-4 border-b-solid border-b border-b-[var(--g-border-color)]">
|
|
45
|
+
<a-input :value="props.url" placeholder="跳转链接由外部配置提供" readonly />
|
|
46
|
+
</div>
|
|
47
|
+
<div class="relative border-b-solid border-b border-b-[var(--g-border-color)]">
|
|
48
|
+
<div class="p-4 flex flex-col gap-4 h-full of-y-auto">
|
|
49
|
+
<!-- items -->
|
|
50
|
+
<template v-if="oauthParams.length">
|
|
51
|
+
<div class="flex flex-col gap-2">
|
|
52
|
+
<HttpParamsItem
|
|
53
|
+
v-for="item in oauthParams"
|
|
54
|
+
:key="item.id"
|
|
55
|
+
v-model:checked="item.checked"
|
|
56
|
+
v-model:key-name="item.keyName"
|
|
57
|
+
v-model:type="item.type"
|
|
58
|
+
v-model:value="item.value"
|
|
59
|
+
v-model:system-key="item.systemKey"
|
|
60
|
+
v-model:request-key="item.requestKey"
|
|
61
|
+
mode="oauth"
|
|
62
|
+
:request-data="props.requestData"
|
|
63
|
+
@remove="handleRemoveItem(item.id)"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
<!-- item action -->
|
|
68
|
+
<div class="flex gap-4">
|
|
69
|
+
<a-button @click="handleAddItem">
|
|
70
|
+
<template #icon>
|
|
71
|
+
<PlusOutlined />
|
|
72
|
+
</template>
|
|
73
|
+
添加
|
|
74
|
+
</a-button>
|
|
75
|
+
<div class="flex-auto" />
|
|
76
|
+
<a-button v-if="oauthParams.length" danger @click="handleClearAll">
|
|
77
|
+
<template #icon>
|
|
78
|
+
<DeleteOutlined />
|
|
79
|
+
</template>
|
|
80
|
+
删除全部
|
|
81
|
+
</a-button>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|