@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,370 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTTPMethod, HTTPParamsValue, ParamItem, PartyLoginConfig, PartyLoginParamItem } from './type';
|
|
3
|
+
import StepOne from './steps/One.vue';
|
|
4
|
+
import StepTwo from './steps/Two.vue';
|
|
5
|
+
import { usePartyRequest } from './usePartyRequest';
|
|
6
|
+
|
|
7
|
+
defineOptions({
|
|
8
|
+
name: 'ThirdPartyLogin',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
modelValue?: PartyLoginConfig
|
|
13
|
+
targetUrl?: string
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
'update:modelValue': [value: PartyLoginConfig]
|
|
18
|
+
}>();
|
|
19
|
+
|
|
20
|
+
const open = defineModel<boolean>('open', {
|
|
21
|
+
default: false,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Step management
|
|
25
|
+
const currentStep = ref<number>(0);
|
|
26
|
+
|
|
27
|
+
// Step 1 data (preserved when switching)
|
|
28
|
+
const httpURL = ref<string>('');
|
|
29
|
+
const httpMethod = ref<HTTPMethod>('GET');
|
|
30
|
+
const httpParams = ref<HTTPParamsValue>('query');
|
|
31
|
+
|
|
32
|
+
// Keep items per panel; preserve when switching panels
|
|
33
|
+
const panelItems = reactive<Record<HTTPParamsValue, ParamItem[]>>({
|
|
34
|
+
query: [],
|
|
35
|
+
body: [],
|
|
36
|
+
header: [],
|
|
37
|
+
cookie: [],
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Step 2 data
|
|
41
|
+
const oauthParams = ref<ParamItem[]>([]);
|
|
42
|
+
|
|
43
|
+
// 计算第三方登录的目标URL (iframe或link地址)
|
|
44
|
+
const partyLoginTargetUrl = computed(() => {
|
|
45
|
+
return props.targetUrl || '';
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
function handleOpenModal(value: boolean = true) {
|
|
49
|
+
open.value = value;
|
|
50
|
+
// Reset all data when closing
|
|
51
|
+
if (!value) {
|
|
52
|
+
resetAllData();
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
// Load existing data when opening
|
|
56
|
+
loadExistingData();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Helper functions to create default items
|
|
61
|
+
let uid = 0;
|
|
62
|
+
function createEmptyItem(): ParamItem {
|
|
63
|
+
return {
|
|
64
|
+
id: ++uid,
|
|
65
|
+
checked: true,
|
|
66
|
+
keyName: '',
|
|
67
|
+
type: 'string',
|
|
68
|
+
value: '',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function createHeaderDefaultItem(): ParamItem {
|
|
73
|
+
return {
|
|
74
|
+
id: ++uid,
|
|
75
|
+
checked: true,
|
|
76
|
+
keyName: 'Content-Type',
|
|
77
|
+
type: 'string',
|
|
78
|
+
value: 'application/json;',
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Initialize default data
|
|
83
|
+
function initializeDefaultData() {
|
|
84
|
+
const items: HTTPParamsValue[] = ['query', 'body', 'header', 'cookie'];
|
|
85
|
+
items.forEach((k) => {
|
|
86
|
+
if (panelItems[k].length === 0) {
|
|
87
|
+
if (k === 'header') {
|
|
88
|
+
panelItems[k].push(createHeaderDefaultItem());
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
panelItems[k].push(createEmptyItem());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Initialize Step 2 oauth params with one empty item
|
|
97
|
+
if (oauthParams.value.length === 0) {
|
|
98
|
+
oauthParams.value.push(createEmptyItem());
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Initialize on mount
|
|
103
|
+
onMounted(() => {
|
|
104
|
+
initializeDefaultData();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Load existing configuration data
|
|
108
|
+
function loadExistingData() {
|
|
109
|
+
if (!props.modelValue || props.modelValue.length === 0) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Helper to convert PartyLoginParamItem back to ParamItem
|
|
114
|
+
const convertToParamItem = (item: PartyLoginParamItem): ParamItem => {
|
|
115
|
+
const paramItem: ParamItem = {
|
|
116
|
+
id: ++uid,
|
|
117
|
+
checked: true,
|
|
118
|
+
keyName: item.key,
|
|
119
|
+
type: item.type,
|
|
120
|
+
value: (item.value ?? '') as ParamItem['value'],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
if (item.type === 'system' && item.field) {
|
|
124
|
+
paramItem.systemKey = item.field;
|
|
125
|
+
}
|
|
126
|
+
else if (item.type === 'request' && item.field) {
|
|
127
|
+
paramItem.requestKey = item.field;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return paramItem;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
props.modelValue.forEach((stepConfig) => {
|
|
134
|
+
if (stepConfig.step === 1 && stepConfig.request) {
|
|
135
|
+
// Load step 1 data
|
|
136
|
+
httpURL.value = stepConfig.request.url;
|
|
137
|
+
httpMethod.value = stepConfig.request.method;
|
|
138
|
+
|
|
139
|
+
// Load params for each panel
|
|
140
|
+
const paramKeys: HTTPParamsValue[] = ['query', 'body', 'header', 'cookie'];
|
|
141
|
+
paramKeys.forEach((key) => {
|
|
142
|
+
const items = stepConfig.request!.params[key];
|
|
143
|
+
if (items && items.length > 0) {
|
|
144
|
+
panelItems[key] = items.map(convertToParamItem);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
else if (stepConfig.step === 2 && stepConfig.oauth) {
|
|
149
|
+
// Load step 2 data - params only, no URL
|
|
150
|
+
if (stepConfig.oauth.params && stepConfig.oauth.params.length > 0) {
|
|
151
|
+
oauthParams.value = stepConfig.oauth.params.map(convertToParamItem);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Reset all data to initial state
|
|
158
|
+
function resetAllData() {
|
|
159
|
+
// Reset step
|
|
160
|
+
currentStep.value = 0;
|
|
161
|
+
|
|
162
|
+
// Reset form data
|
|
163
|
+
httpURL.value = '';
|
|
164
|
+
httpMethod.value = 'GET';
|
|
165
|
+
httpParams.value = 'query';
|
|
166
|
+
|
|
167
|
+
// Clear all panel items
|
|
168
|
+
panelItems.query = [];
|
|
169
|
+
panelItems.body = [];
|
|
170
|
+
panelItems.header = [];
|
|
171
|
+
panelItems.cookie = [];
|
|
172
|
+
|
|
173
|
+
// Reset step 2 data
|
|
174
|
+
oauthParams.value = [];
|
|
175
|
+
|
|
176
|
+
// Re-initialize default data
|
|
177
|
+
initializeDefaultData();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// use hook for sending request and result states
|
|
181
|
+
const requestParams = computed(() => {
|
|
182
|
+
const params: Record<string, any> = {
|
|
183
|
+
query: {},
|
|
184
|
+
body: {},
|
|
185
|
+
header: {},
|
|
186
|
+
cookie: {},
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// Convert panelItems to simple objects
|
|
190
|
+
Object.keys(panelItems).forEach((key) => {
|
|
191
|
+
const items = panelItems[key as HTTPParamsValue];
|
|
192
|
+
items.filter(i => i.checked && i.keyName.trim().length).forEach((item) => {
|
|
193
|
+
const keyName = item.keyName.trim();
|
|
194
|
+
let value: any = item.value;
|
|
195
|
+
if (item.type === 'number') {
|
|
196
|
+
const n = Number(value);
|
|
197
|
+
value = Number.isFinite(n) ? n : value;
|
|
198
|
+
}
|
|
199
|
+
else if (item.type === 'boolean') {
|
|
200
|
+
value = item.value === 'true';
|
|
201
|
+
}
|
|
202
|
+
params[key][keyName] = value;
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
return params;
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const { send, isFinished, isFetching, statusCode, data, elapsedTime } = usePartyRequest({
|
|
210
|
+
url: httpURL,
|
|
211
|
+
method: httpMethod,
|
|
212
|
+
params: requestParams,
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
// Handle send request (stay in step 1)
|
|
216
|
+
async function handleSend() {
|
|
217
|
+
await send();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Step navigation
|
|
221
|
+
function handlePrevStep() {
|
|
222
|
+
if (currentStep.value > 0) {
|
|
223
|
+
currentStep.value--;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function handleNextStep() {
|
|
228
|
+
// Allow navigation to next step anytime (request is optional)
|
|
229
|
+
if (currentStep.value < 1) {
|
|
230
|
+
currentStep.value++;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Generate final JSON data
|
|
235
|
+
function generateFinalJSON() {
|
|
236
|
+
// Helper to format param items - preserve field names for system/request types
|
|
237
|
+
const formatParamItem = (item: ParamItem) => {
|
|
238
|
+
const base = {
|
|
239
|
+
key: item.keyName,
|
|
240
|
+
type: item.type,
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// For system/request types, store the field key (variable) instead of value
|
|
244
|
+
if (item.type === 'system' && item.systemKey) {
|
|
245
|
+
return { ...base, field: item.systemKey };
|
|
246
|
+
}
|
|
247
|
+
if (item.type === 'request' && item.requestKey) {
|
|
248
|
+
return { ...base, field: item.requestKey };
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// For other types (string/number/boolean), store the actual value
|
|
252
|
+
return { ...base, value: item.value };
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// Format step 1 params - convert panelItems to array format
|
|
256
|
+
const step1Params: Record<HTTPParamsValue, any[]> = {
|
|
257
|
+
query: [],
|
|
258
|
+
body: [],
|
|
259
|
+
header: [],
|
|
260
|
+
cookie: [],
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
Object.keys(panelItems).forEach((key) => {
|
|
264
|
+
const items = panelItems[key as HTTPParamsValue];
|
|
265
|
+
step1Params[key as HTTPParamsValue] = items
|
|
266
|
+
.filter(i => i.checked && i.keyName.trim().length > 0)
|
|
267
|
+
.map(formatParamItem);
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
const finalData = [
|
|
271
|
+
{
|
|
272
|
+
step: 1,
|
|
273
|
+
request: {
|
|
274
|
+
url: httpURL.value,
|
|
275
|
+
method: httpMethod.value,
|
|
276
|
+
params: step1Params,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
step: 2,
|
|
281
|
+
oauth: {
|
|
282
|
+
params: oauthParams.value
|
|
283
|
+
.filter(item => item.checked && item.keyName.trim().length > 0)
|
|
284
|
+
.map(formatParamItem),
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
];
|
|
288
|
+
|
|
289
|
+
return finalData;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Handle complete button
|
|
293
|
+
function handleComplete() {
|
|
294
|
+
const finalJSON = generateFinalJSON();
|
|
295
|
+
// Emit the data to parent component
|
|
296
|
+
emit('update:modelValue', finalJSON);
|
|
297
|
+
handleOpenModal(false);
|
|
298
|
+
}
|
|
299
|
+
</script>
|
|
300
|
+
|
|
301
|
+
<template>
|
|
302
|
+
<div>
|
|
303
|
+
<div @click="handleOpenModal(true)">
|
|
304
|
+
<slot name="trigger" />
|
|
305
|
+
</div>
|
|
306
|
+
<a-modal
|
|
307
|
+
v-model:open="open"
|
|
308
|
+
title="第三方登录"
|
|
309
|
+
:centered="true"
|
|
310
|
+
:mask-closable="false"
|
|
311
|
+
:width="1020"
|
|
312
|
+
@cancel="handleOpenModal(false)"
|
|
313
|
+
>
|
|
314
|
+
<div class="of-y-auto! h-500px relative">
|
|
315
|
+
<!-- Step 1: Configure Request & View Response -->
|
|
316
|
+
<StepOne
|
|
317
|
+
v-if="currentStep === 0"
|
|
318
|
+
v-model:url="httpURL"
|
|
319
|
+
v-model:method="httpMethod"
|
|
320
|
+
v-model:params="httpParams"
|
|
321
|
+
v-model:panel-items="panelItems"
|
|
322
|
+
:is-fetching="isFetching"
|
|
323
|
+
:is-finished="isFinished"
|
|
324
|
+
:status-code="statusCode"
|
|
325
|
+
:elapsed-time="elapsedTime"
|
|
326
|
+
:data="data"
|
|
327
|
+
@send="handleSend"
|
|
328
|
+
/>
|
|
329
|
+
|
|
330
|
+
<!-- Step 2: Empty Blank Page -->
|
|
331
|
+
<StepTwo
|
|
332
|
+
v-if="currentStep === 1"
|
|
333
|
+
v-model:oauth-params="oauthParams"
|
|
334
|
+
:url="partyLoginTargetUrl"
|
|
335
|
+
:request-data="data"
|
|
336
|
+
/>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<!-- Custom Footer -->
|
|
340
|
+
<template #footer>
|
|
341
|
+
<div class="flex justify-between items-center">
|
|
342
|
+
<div>
|
|
343
|
+
<a-button v-if="currentStep > 0" @click="handlePrevStep">
|
|
344
|
+
上一步
|
|
345
|
+
</a-button>
|
|
346
|
+
</div>
|
|
347
|
+
<div class="flex gap-2">
|
|
348
|
+
<a-button @click="handleOpenModal(false)">
|
|
349
|
+
取消
|
|
350
|
+
</a-button>
|
|
351
|
+
<a-button
|
|
352
|
+
v-if="currentStep === 0"
|
|
353
|
+
type="primary"
|
|
354
|
+
@click="handleNextStep"
|
|
355
|
+
>
|
|
356
|
+
下一步
|
|
357
|
+
</a-button>
|
|
358
|
+
<a-button
|
|
359
|
+
v-if="currentStep === 1"
|
|
360
|
+
type="primary"
|
|
361
|
+
@click="handleComplete"
|
|
362
|
+
>
|
|
363
|
+
完成
|
|
364
|
+
</a-button>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
</template>
|
|
368
|
+
</a-modal>
|
|
369
|
+
</div>
|
|
370
|
+
</template>
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DefaultOptionType, SelectValue } from 'ant-design-vue/es/select';
|
|
3
|
+
import type { ItemType } from './type';
|
|
4
|
+
import RequestFieldSelector from './RequestFieldSelector.vue';
|
|
5
|
+
import SystemFieldSelector from './SystemFieldSelector.vue';
|
|
6
|
+
|
|
7
|
+
defineOptions({
|
|
8
|
+
name: 'ParamsItem',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<{
|
|
12
|
+
mode?: Mode
|
|
13
|
+
requestData?: any
|
|
14
|
+
}>(), {
|
|
15
|
+
mode: 'http',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const emit = defineEmits<{
|
|
19
|
+
(e: 'remove'): void
|
|
20
|
+
}>();
|
|
21
|
+
|
|
22
|
+
type Mode = 'http' | 'oauth';
|
|
23
|
+
|
|
24
|
+
const checked = defineModel<boolean>('checked', {
|
|
25
|
+
default: true,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Controlled models from parent
|
|
29
|
+
const keyName = defineModel<string>('keyName', {
|
|
30
|
+
default: '',
|
|
31
|
+
});
|
|
32
|
+
const itemType = defineModel<ItemType>('type', {
|
|
33
|
+
default: 'string',
|
|
34
|
+
});
|
|
35
|
+
const paramValue = defineModel<string | number | 'true' | 'false'>('value', {
|
|
36
|
+
default: '',
|
|
37
|
+
});
|
|
38
|
+
const systemKey = defineModel<string | undefined>('systemKey', {
|
|
39
|
+
default: undefined,
|
|
40
|
+
});
|
|
41
|
+
const requestKey = defineModel<string | undefined>('requestKey', {
|
|
42
|
+
default: undefined,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const typeOptions = ref<{
|
|
46
|
+
label: string
|
|
47
|
+
value: ItemType
|
|
48
|
+
type: Mode[]
|
|
49
|
+
tooltip?: string
|
|
50
|
+
}[]>([
|
|
51
|
+
{
|
|
52
|
+
label: 'String',
|
|
53
|
+
value: 'string',
|
|
54
|
+
type: ['http', 'oauth'],
|
|
55
|
+
tooltip: '请求参数设置为字符串类型',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Number',
|
|
59
|
+
value: 'number',
|
|
60
|
+
type: ['http', 'oauth'],
|
|
61
|
+
tooltip: '请求参数设置为数字类型',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: 'Boolean',
|
|
65
|
+
value: 'boolean',
|
|
66
|
+
type: ['http', 'oauth'],
|
|
67
|
+
tooltip: '请求参数设置为布尔类型',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: 'System',
|
|
71
|
+
value: 'system',
|
|
72
|
+
type: ['http', 'oauth'],
|
|
73
|
+
tooltip: '请求参数设置为系统中的字段,这些字段是在 pinia 中的',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'Request',
|
|
77
|
+
value: 'request',
|
|
78
|
+
type: ['oauth'],
|
|
79
|
+
tooltip: '请求参数设置为上一步的请求结果中的字段',
|
|
80
|
+
},
|
|
81
|
+
]);
|
|
82
|
+
|
|
83
|
+
const systemSelectorRef = ref<InstanceType<typeof SystemFieldSelector>>();
|
|
84
|
+
const requestSelectorRef = ref<InstanceType<typeof RequestFieldSelector>>();
|
|
85
|
+
|
|
86
|
+
function handleChangeType(value: SelectValue, _option: DefaultOptionType) {
|
|
87
|
+
// Only reset value if type actually changes
|
|
88
|
+
const previousType = itemType.value;
|
|
89
|
+
|
|
90
|
+
switch (value) {
|
|
91
|
+
case 'string':
|
|
92
|
+
itemType.value = 'string';
|
|
93
|
+
if (previousType !== 'string') {
|
|
94
|
+
paramValue.value = '';
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
case 'number':
|
|
98
|
+
itemType.value = 'number';
|
|
99
|
+
if (previousType !== 'number') {
|
|
100
|
+
paramValue.value = 0;
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case 'boolean':
|
|
104
|
+
itemType.value = 'boolean';
|
|
105
|
+
if (previousType !== 'boolean') {
|
|
106
|
+
paramValue.value = 'true';
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
case 'system':
|
|
110
|
+
itemType.value = 'system';
|
|
111
|
+
if (previousType !== 'system') {
|
|
112
|
+
nextTick(() => {
|
|
113
|
+
systemSelectorRef.value?.initSystemSelection();
|
|
114
|
+
paramValue.value = '';
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
case 'request':
|
|
119
|
+
itemType.value = 'request';
|
|
120
|
+
if (previousType !== 'request') {
|
|
121
|
+
nextTick(() => {
|
|
122
|
+
requestSelectorRef.value?.initRequestSelection();
|
|
123
|
+
paramValue.value = '';
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<template>
|
|
132
|
+
<div class="flex gap-2 items-center">
|
|
133
|
+
<!-- enable -->
|
|
134
|
+
<a-checkbox v-model:checked="checked" class="flex-shrink-0" />
|
|
135
|
+
<!-- key -->
|
|
136
|
+
<a-input v-model:value="keyName" placeholder="Key" class="w-92 flex-shrink-0" />
|
|
137
|
+
<!-- value -->
|
|
138
|
+
<div class="w-92 flex-shrink-0">
|
|
139
|
+
<template v-if="itemType === 'string'">
|
|
140
|
+
<a-input v-model:value="paramValue" placeholder="Value" class="w-full" />
|
|
141
|
+
</template>
|
|
142
|
+
<template v-else-if="itemType === 'number'">
|
|
143
|
+
<a-input-number v-model:value="paramValue" placeholder="Value" class="w-full!" />
|
|
144
|
+
</template>
|
|
145
|
+
<template v-else-if="itemType === 'boolean'">
|
|
146
|
+
<a-select v-model:value="paramValue" placeholder="Value" class="w-full!">
|
|
147
|
+
<a-select-option value="true">
|
|
148
|
+
true
|
|
149
|
+
</a-select-option>
|
|
150
|
+
<a-select-option value="false">
|
|
151
|
+
false
|
|
152
|
+
</a-select-option>
|
|
153
|
+
</a-select>
|
|
154
|
+
</template>
|
|
155
|
+
<template v-else-if="itemType === 'system'">
|
|
156
|
+
<SystemFieldSelector
|
|
157
|
+
ref="systemSelectorRef"
|
|
158
|
+
v-model:value="paramValue"
|
|
159
|
+
v-model:system-key="systemKey"
|
|
160
|
+
class="w-full!"
|
|
161
|
+
/>
|
|
162
|
+
</template>
|
|
163
|
+
<template v-else-if="itemType === 'request'">
|
|
164
|
+
<RequestFieldSelector
|
|
165
|
+
ref="requestSelectorRef"
|
|
166
|
+
v-model:value="paramValue"
|
|
167
|
+
v-model:request-key="requestKey"
|
|
168
|
+
:request-data="requestData"
|
|
169
|
+
class="w-full!"
|
|
170
|
+
/>
|
|
171
|
+
</template>
|
|
172
|
+
</div>
|
|
173
|
+
<!-- type select -->
|
|
174
|
+
<a-select
|
|
175
|
+
v-model:value="itemType"
|
|
176
|
+
class="w-24 flex-shrink-0"
|
|
177
|
+
@select="handleChangeType"
|
|
178
|
+
>
|
|
179
|
+
<template v-for="option in typeOptions">
|
|
180
|
+
<a-select-option v-if="option.type.includes(props.mode)" :key="option.value" :value="option.value">
|
|
181
|
+
<a-tooltip v-if="option.tooltip" :title="option.tooltip">
|
|
182
|
+
{{ option.label }}
|
|
183
|
+
</a-tooltip>
|
|
184
|
+
<template v-else>
|
|
185
|
+
?
|
|
186
|
+
{{ option.label }}
|
|
187
|
+
</template>
|
|
188
|
+
</a-select-option>
|
|
189
|
+
</template>
|
|
190
|
+
</a-select>
|
|
191
|
+
<!-- remove -->
|
|
192
|
+
<a-button class="flex-shrink-0" @click="emit('remove')">
|
|
193
|
+
<DeleteOutlined />
|
|
194
|
+
</a-button>
|
|
195
|
+
</div>
|
|
196
|
+
</template>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTTPMethod, HTTPParamsLabel, HTTPParamsValue } from './type';
|
|
3
|
+
import PubinfoIcon from '../PubinfoIcon/index.vue';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'HTTPParamsPanel',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
method: HTTPMethod
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const value = defineModel<HTTPParamsValue>('modelValue', {
|
|
14
|
+
default: 'query',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const paramsList = ref<{
|
|
18
|
+
icon: string
|
|
19
|
+
label: HTTPParamsLabel
|
|
20
|
+
value: HTTPParamsValue
|
|
21
|
+
status: HTTPMethod[]
|
|
22
|
+
}[]>([
|
|
23
|
+
{
|
|
24
|
+
icon: 'i-ph:question',
|
|
25
|
+
label: 'Query',
|
|
26
|
+
value: 'query',
|
|
27
|
+
status: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
icon: 'i-ph:file-text',
|
|
31
|
+
label: 'Body',
|
|
32
|
+
value: 'body',
|
|
33
|
+
status: ['POST', 'PUT', 'DELETE', 'PATCH'],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
icon: 'i-ph:file-html',
|
|
37
|
+
label: 'Header',
|
|
38
|
+
value: 'header',
|
|
39
|
+
status: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
icon: 'i-ph:cookie',
|
|
43
|
+
label: 'Cookie',
|
|
44
|
+
value: 'cookie',
|
|
45
|
+
status: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'],
|
|
46
|
+
},
|
|
47
|
+
]);
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<a-radio-group v-model:value="value" button-style="solid">
|
|
52
|
+
<template v-for="param in paramsList">
|
|
53
|
+
<a-radio-button v-if="param.status.includes(props.method)" :key="param.value" :value="param.value">
|
|
54
|
+
<div class="flex items-center justify-center gap-1">
|
|
55
|
+
<PubinfoIcon :name="param.icon" />
|
|
56
|
+
{{ param.label }}
|
|
57
|
+
</div>
|
|
58
|
+
</a-radio-button>
|
|
59
|
+
</template>
|
|
60
|
+
</a-radio-group>
|
|
61
|
+
</template>
|