st-comp 0.0.248 → 0.0.249
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/components.d.ts +1 -0
- package/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +82 -80
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +36 -35
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +20 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +83 -82
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +19 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +22 -21
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +63 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +28 -26
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +121 -120
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -30
- package/es/User.cjs +1 -1
- package/es/User.js +157 -155
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +29 -27
- package/es/VarietyAiHelper.cjs +4 -0
- package/es/VarietyAiHelper.js +270 -0
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +13 -12
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +70 -68
- package/es/{VarietySelect-2fd501da.cjs → VarietySelect-5c845562.cjs} +1 -1
- package/es/{VarietySelect-b9fe3000.js → VarietySelect-9f267958.js} +4 -4
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +24 -22
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-3823a101.cjs → _initCloneObject-2b82e9f7.cjs} +1 -1
- package/es/{_initCloneObject-382335b2.js → _initCloneObject-69c8ae23.js} +7 -7
- package/es/aiTools.js +36 -0
- package/es/{base-ff0e366f.js → base-29f73b05.js} +40 -40
- package/es/{castArray-15070be9.js → castArray-609a313e.js} +1 -1
- package/es/{config-provider-2182708a.cjs → config-provider-2ae47cc8.cjs} +1 -1
- package/es/{config-provider-2e85eee8.js → config-provider-7860903c.js} +6 -6
- package/es/{debounce-e9e47f9a.js → debounce-a09ce9a3.js} +1 -1
- package/es/{dropdown-2b35a683.js → dropdown-497442b7.js} +30 -29
- package/es/dropdown-eba9eaf5.cjs +1 -0
- package/es/{el-autocomplete-18be2c5a.js → el-autocomplete-27c60cc8.js} +24 -23
- package/es/el-autocomplete-b59eb529.cjs +1 -0
- package/es/{el-button-68baab7b.cjs → el-button-974ff9e9.cjs} +1 -1
- package/es/{el-button-f08c0639.js → el-button-e2c63c08.js} +39 -39
- package/es/el-checkbox-08185353.cjs +1 -0
- package/es/{el-checkbox-058dba2d.js → el-checkbox-71ebd862.js} +31 -31
- package/es/el-dialog-1b185570.cjs +1 -0
- package/es/{el-dialog-d328e0d8.js → el-dialog-eedcfd3e.js} +15 -15
- package/es/{el-divider-4fe55ebe.js → el-divider-523e5874.js} +1 -1
- package/es/{el-empty-ceecb81c.js → el-empty-f5a1607a.js} +5 -5
- package/es/{el-form-item-cb328886.js → el-form-item-bdcfd297.js} +36 -36
- package/es/{el-form-item-4076e55f.cjs → el-form-item-c997b4fa.cjs} +1 -1
- package/es/{el-input-0f6ead19.js → el-input-d47281da.js} +91 -91
- package/es/el-input-fa18ef84.cjs +1 -0
- package/es/el-input-number-3d94fa58.cjs +1 -0
- package/es/{el-input-number-66e68609.js → el-input-number-c8018cb1.js} +28 -28
- package/es/{el-loading-412370c7.js → el-loading-0cd81d05.js} +5 -5
- package/es/{el-loading-05826e64.cjs → el-loading-969a79ca.cjs} +1 -1
- package/es/el-menu-item-26071fd6.cjs +1 -0
- package/es/{el-menu-item-0ee8ad18.js → el-menu-item-dac65bb3.js} +31 -30
- package/es/el-message-0ea8fbf8.cjs +1 -0
- package/es/el-message-4ed993c7.js +1 -0
- package/es/el-message-box-31e0aa98.cjs +1 -0
- package/es/{el-message-box-6db52b29.js → el-message-box-fea4fca8.js} +11 -11
- package/es/{el-overlay-981f8d49.js → el-overlay-1ee0338d.js} +63 -63
- package/es/el-overlay-ea65cb05.cjs +1 -0
- package/es/{el-popconfirm-005013fa.js → el-popconfirm-089b8bec.js} +17 -16
- package/es/el-popconfirm-9e232436.cjs +1 -0
- package/es/el-popper-2d3914e4.cjs +1 -0
- package/es/el-popper-c9b3d3cf.js +1662 -0
- package/es/el-segmented-140ac042.cjs +1 -0
- package/es/{el-segmented-050d0090.js → el-segmented-9d3a9e11.js} +8 -8
- package/es/el-select-a11f33e8.cjs +1 -0
- package/es/{el-select-23a1f302.js → el-select-e51e11c1.js} +92 -91
- package/es/{el-table-column-d0c374cf.js → el-table-column-05d292a8.js} +25 -24
- package/es/el-table-column-98570a4d.cjs +14 -0
- package/es/{el-tag-f13f463b.js → el-tag-17cd04a1.js} +14 -14
- package/es/el-tag-6d8e653e.cjs +1 -0
- package/es/{el-text-27cef2be.js → el-text-2710fff3.js} +2 -2
- package/es/{el-text-1470de46.cjs → el-text-a18106cb.cjs} +1 -1
- package/es/{index-09bd2621.js → index-0ee486ad.js} +43 -43
- package/es/index-0f79095c.js +440 -0
- package/es/{index-e0901394.js → index-1d9b50de.js} +34 -34
- package/es/index-28e03bad.cjs +1 -0
- package/es/{index-269b22da.cjs → index-299ee017.cjs} +1 -1
- package/es/{index-cebc7160.cjs → index-33f80550.cjs} +1 -1
- package/es/{index-4f48940d.cjs → index-37b8d3c6.cjs} +1 -1
- package/es/{index-2375023e.cjs → index-5befc414.cjs} +4 -4
- package/es/{index-696b6a94.cjs → index-6b99def3.cjs} +1 -1
- package/es/index-6ca95c8a.cjs +1 -0
- package/es/index-7dce9f59.cjs +1 -0
- package/es/{index-269b8a8c.js → index-8391a3df.js} +37 -37
- package/es/{index-c266c23a.js → index-8f9d0d17.js} +16 -15
- package/es/{index-15b9603e.js → index-95e5d454.js} +3 -3
- package/es/{index-b937ea22.js → index-b0117ba2.js} +2 -2
- package/es/{index-80a7ad32.js → index-bcd895a0.js} +17 -17
- package/es/{index-ec7ad93f.js → index-c2b9bbfd.js} +95 -65
- package/es/{index-4a3f30c5.js → index-c71e37dc.js} +11 -11
- package/es/{index-93a8960e.js → index-de24705f.js} +1 -1
- package/es/index-e8eeea22.cjs +1 -0
- package/es/{index-ee977f79.cjs → index-eb99b188.cjs} +1 -1
- package/es/{el-message-e6c755df.js → index-f30561d3.js} +33 -33
- package/es/{python-c67c8901.cjs → python-27ece6fa.cjs} +2 -2
- package/es/{python-823b276b.js → python-656db04f.js} +30 -28
- package/es/raf-744cf95a.js +6 -0
- package/es/{scroll-41b4f625.js → scroll-6799bafc.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-631cacae.js → use-form-common-props-cb0ca65c.js} +72 -72
- package/es/{use-form-common-props-344056f9.cjs → use-form-common-props-d3ed62c6.cjs} +1 -1
- package/es/{use-global-config-cf78ebac.cjs → use-global-config-c80f33a4.cjs} +1 -1
- package/es/{use-global-config-5d001623.js → use-global-config-cdaeca54.js} +14 -14
- package/es/{validator-3cad04b2.cjs → validator-07160325.cjs} +1 -1
- package/es/{validator-4160d9e7.js → validator-4ab9774f.js} +1 -1
- package/es/{vnode-06571d5b.js → vnode-a83e6de8.js} +1 -1
- package/es/{zh-cn-aabfaa94.cjs → zh-cn-6a0f844c.cjs} +1 -1
- package/es/{zh-cn-5df98ac2.js → zh-cn-8a6390a4.js} +2 -2
- package/lib/aiTools.js +36 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +157 -154
- package/lib/{index-f00d1e1f.js → index-6ac0579e.js} +16077 -15806
- package/lib/{python-0f34e2e6.js → python-0432340a.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/index.ts +8 -0
- package/packages/VarietyAiHelper/index.vue +430 -0
- package/packages/index.ts +2 -0
- package/public/aiTools.js +36 -0
- package/src/App.vue +24 -14
- package/src/pages/VarietyAiHelper/index.vue +20 -0
- package/src/pages/VarietySearch/index.vue +75 -51
- package/src/router/routes.ts +5 -0
- package/es/dropdown-89b74bc9.cjs +0 -1
- package/es/el-autocomplete-b9a3054a.cjs +0 -1
- package/es/el-checkbox-b982e2ef.cjs +0 -1
- package/es/el-dialog-ad7309e9.cjs +0 -1
- package/es/el-input-172c49f8.cjs +0 -1
- package/es/el-input-number-c2e71528.cjs +0 -1
- package/es/el-menu-item-7f986598.cjs +0 -1
- package/es/el-message-a86c0efa.cjs +0 -1
- package/es/el-message-box-40ff2af5.cjs +0 -1
- package/es/el-overlay-d7a6e4a9.cjs +0 -1
- package/es/el-popconfirm-737a015b.cjs +0 -1
- package/es/el-popper-7ba87e05.cjs +0 -1
- package/es/el-popper-fdc7c793.js +0 -2094
- package/es/el-segmented-3fd66a0e.cjs +0 -1
- package/es/el-select-12f6deb7.cjs +0 -1
- package/es/el-table-column-516a0ed9.cjs +0 -14
- package/es/el-tag-789f05d3.cjs +0 -1
- package/es/index-8de94a49.cjs +0 -1
- package/es/index-c04f444f.cjs +0 -1
- package/es/raf-8e05a7f4.js +0 -6
package/es/VarSelectDialog.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";require("./base-ef747d02.cjs");const I=require("./el-dialog-
|
|
1
|
+
"use strict";require("./base-ef747d02.cjs");const I=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");require("./el-tooltip-0ea8fbf8.cjs");const L=require("./el-popper-2d3914e4.cjs"),D=require("./el-button-974ff9e9.cjs"),$=require("./el-input-fa18ef84.cjs");require("./el-tag-6d8e653e.cjs");const B=require("./el-select-a11f33e8.cjs");require("./el-scrollbar-bc3f790d.cjs");const e=require("vue"),x=require("./index-33f80550.cjs"),F=require("./VarietySelect-5c845562.cjs");require("./el-message-0ea8fbf8.cjs");const U=require("./_plugin-vue_export-helper-f246444f.cjs"),N=require("./index-6ca95c8a.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./use-form-common-props-d3ed62c6.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./index-e8eeea22.cjs");require("./index-6b99def3.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");require("./el-autocomplete-b59eb529.cjs");require("./index-8901a38c.cjs");require("./config-provider-2ae47cc8.cjs");const z=m=>(e.pushScopeId("data-v-e4f6c06a"),m=m(),e.popScopeId(),m),T={class:"custom-header"},j={class:"left"},M=z(()=>e.createElementVNode("span",null," 选择变量 ",-1)),P={class:"right"},A={class:"custom-body"},O={class:"config-list"},H={class:"config-item"},R={key:0},G={key:0},J={key:1},K={key:0},Q={style:{"max-width":"820px"}},W={style:{"white-space":"pre-line"}},X={__name:"index",props:{useCase:{type:String,default:"1"}},setup(m,{expose:C}){const E=e.inject("stConfig"),g=m,_=e.ref(null),V=e.ref(!1),f=e.ref(null),h=e.ref([]),q=e.computed(()=>{var r;return((r=h.value.find(n=>n.varName===f.value))==null?void 0:r.formatList)??[]}),b=r=>r.replace(/^\[|\]$/g,"").split("],[").map(c=>{const s=c.replace(/\[|\]/g,""),[k,u]=s.split(",");return{label:k.trim(),value:u.trim()}}),S=r=>{const n=[];for(let i=0;i<r.length;i++){const o=r[i];switch(console.log(o),o.vtype){case"text":{n.push(o.param);break}default:{if(!o.modelValue)return N.ElMessage.error("请检查插入格式内是否填写完整");let t=o.modelValue;o.prefix&&(t=`${o.prefix}${t}`),o.suffix&&(t=`${t}${o.suffix}`),n.push(t);break}}}if(!_.value)return N.ElMessage.error("未检测到编辑器实例");const v=n.join("_"),c=_.value.getInstance(),s=c.getPosition(),u=_.value.getValue().split(`
|
|
2
2
|
`);if(s.lineNumber<=u.length){const i=s.lineNumber-1,o=u[i],t=s.column-1,d=t>0?o[t-1]:"",l=t<o.length?o[t]:"";let p=v;d&&d!==" "&&!/[\s({[ ]/.test(d)&&(p=" "+p),l&&l!==" "&&!/[\s)}\]]/.test(l)&&(p=p+" ");const a=o.substring(0,t)+p+o.substring(t);u[i]=a;const y=u.join(`
|
|
3
|
-
`);_.value.setValue(y);const w=s.column+p.length;c.setPosition({lineNumber:s.lineNumber,column:w}),c.focus()}};return e.onMounted(async()=>{const{body:r}=await
|
|
3
|
+
`);_.value.setValue(y);const w=s.column+p.length;c.setPosition({lineNumber:s.lineNumber,column:w}),c.focus()}};return e.onMounted(async()=>{const{body:r}=await E.request.post("/common/conf/queryAllBackVariables",{useCase:g.useCase});h.value=r??[]}),C({open:r=>{_.value=r,V.value=!0},close:()=>{V.value=!1}}),(r,n)=>{const v=B.ElOption,c=B.ElSelect,s=x.ElIcon,k=$.ElInput,u=D.ElButton,i=L.ElTooltip,o=I.ElDialog;return e.openBlock(),e.createBlock(o,{"modal-class":"var-select-dialog",modelValue:V.value,"onUpdate:modelValue":n[2]||(n[2]=t=>V.value=t),"align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:e.withCtx(()=>[e.createElementVNode("div",T,[e.createElementVNode("div",j,[M,e.createVNode(c,{modelValue:f.value,"onUpdate:modelValue":n[0]||(n[0]=t=>f.value=t),placeholder:"选择变量",filterable:"",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(t,d)=>(e.openBlock(),e.createBlock(v,{key:d,label:t.varName,value:t.varName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",P,[e.createVNode(s,{class:"el-icon--left",onClick:n[1]||(n[1]=t=>V.value=!1)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.close_default))]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",A,[q.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(q.value,(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:"format-item",key:d},[e.createElementVNode("span",null,"格式"+e.toDisplayString(d+1)+":",1),e.createElementVNode("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.configList,(l,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",H,[l.vtype==="text"?(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString(l.param),1)):e.createCommentVNode("",!0),l.vtype==="inputVariety"?(e.openBlock(),e.createBlock(F.VarietySelect,{key:1,size:"small",placeholder:l.param,selectClearEnable:!1,labelShowEnable:!1,onSelect:({name:a,code:y})=>l.modelValue=y,onChange:a=>l.modelValue=a,style:{width:"100px"}},null,8,["placeholder","onSelect","onChange"])):e.createCommentVNode("",!0),l.vtype==="input"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.prefix?(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(l.prefix),1)):e.createCommentVNode("",!0),e.createVNode(k,{modelValue:l.modelValue,"onUpdate:modelValue":a=>l.modelValue=a,placeholder:l.param,size:"small"},null,8,["modelValue","onUpdate:modelValue","placeholder"]),l.suffix?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(l.suffix),1)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.vtype==="select"?(e.openBlock(),e.createBlock(c,{key:3,modelValue:l.modelValue,"onUpdate:modelValue":a=>l.modelValue=a,placeholder:l.param,clearable:"",size:"small"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b(l.optionsStr),a=>(e.openBlock(),e.createBlock(v,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),p!==t.configList.length-1?(e.openBlock(),e.createElementBlock("span",K,"_")):e.createCommentVNode("",!0)],64))),256))]),e.createVNode(u,{type:"primary",plain:"",size:"small",onClick:l=>S(t.configList)},{default:e.withCtx(()=>[e.createTextVNode(" 插入变量 ")]),_:2},1032,["onClick"]),e.createVNode(i,{effect:"dark",placement:"top-start"},{content:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createElementVNode("span",W,e.toDisplayString(t.tip),1)])]),default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.info_filled_default))]),_:1})]),_:2},1024)]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}},Y=U._export_sfc(X,[["__scopeId","data-v-e4f6c06a"]]),Z={install(m){m.component("st-varSelectDialog",Y)}};module.exports=Z;
|
package/es/VarSelectDialog.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as M } from "./el-dialog-
|
|
3
|
-
import "./el-overlay-
|
|
1
|
+
import "./base-29f73b05.js";
|
|
2
|
+
import { E as M } from "./el-dialog-eedcfd3e.js";
|
|
3
|
+
import "./el-overlay-1ee0338d.js";
|
|
4
4
|
import "./el-tooltip-4ed993c7.js";
|
|
5
|
-
import { E as O } from "./el-popper-
|
|
6
|
-
import { E as P } from "./el-button-
|
|
7
|
-
import { E as F } from "./el-input-
|
|
8
|
-
import "./el-tag-
|
|
9
|
-
import { E as R, a as G } from "./el-select-
|
|
5
|
+
import { E as O } from "./el-popper-c9b3d3cf.js";
|
|
6
|
+
import { E as P } from "./el-button-e2c63c08.js";
|
|
7
|
+
import { E as F } from "./el-input-d47281da.js";
|
|
8
|
+
import "./el-tag-17cd04a1.js";
|
|
9
|
+
import { E as R, a as G } from "./el-select-e51e11c1.js";
|
|
10
10
|
import "./el-scrollbar-323542e7.js";
|
|
11
11
|
import { inject as H, ref as S, computed as J, onMounted as K, openBlock as o, createBlock as g, withCtx as p, createElementVNode as u, createVNode as f, createElementBlock as r, Fragment as y, renderList as w, unref as U, toDisplayString as E, createCommentVNode as h, createTextVNode as Q, pushScopeId as W, popScopeId as X } from "vue";
|
|
12
|
-
import {
|
|
13
|
-
import { V as te } from "./VarietySelect-
|
|
14
|
-
import
|
|
12
|
+
import { c as Y, i as Z, E as ee } from "./index-c2b9bbfd.js";
|
|
13
|
+
import { V as te } from "./VarietySelect-9f267958.js";
|
|
14
|
+
import "./el-message-4ed993c7.js";
|
|
15
15
|
import { _ as le } from "./_plugin-vue_export-helper-dad06003.js";
|
|
16
|
-
import "./
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
16
|
+
import { E as B } from "./index-f30561d3.js";
|
|
17
|
+
import "./index-0f79095c.js";
|
|
18
|
+
import "./index-8391a3df.js";
|
|
19
|
+
import "./use-form-common-props-cb0ca65c.js";
|
|
20
|
+
import "./index-de24705f.js";
|
|
19
21
|
import "./index-2e331d74.js";
|
|
20
|
-
import "./vnode-
|
|
21
|
-
import "./scroll-
|
|
22
|
-
import "./use-global-config-
|
|
23
|
-
import "./index-
|
|
22
|
+
import "./vnode-a83e6de8.js";
|
|
23
|
+
import "./scroll-6799bafc.js";
|
|
24
|
+
import "./use-global-config-cdaeca54.js";
|
|
25
|
+
import "./index-0ee486ad.js";
|
|
24
26
|
import "./index-657047bb.js";
|
|
25
27
|
import "./typescript-7ae59c4c.js";
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./index-
|
|
28
|
-
import "./index-
|
|
29
|
-
import "./castArray-
|
|
30
|
-
import "./debounce-
|
|
31
|
-
import "./el-autocomplete-
|
|
28
|
+
import "./index-c71e37dc.js";
|
|
29
|
+
import "./index-1d9b50de.js";
|
|
30
|
+
import "./index-95e5d454.js";
|
|
31
|
+
import "./castArray-609a313e.js";
|
|
32
|
+
import "./debounce-a09ce9a3.js";
|
|
33
|
+
import "./el-autocomplete-27c60cc8.js";
|
|
32
34
|
import "./index-7ed0999e.js";
|
|
33
|
-
import "./config-provider-
|
|
35
|
+
import "./config-provider-7860903c.js";
|
|
34
36
|
const oe = (V) => (W("data-v-e4f6c06a"), V = V(), X(), V), ae = { class: "custom-header" }, ne = { class: "left" }, se = /* @__PURE__ */ oe(() => /* @__PURE__ */ u("span", null, " 选择变量 ", -1)), re = { class: "right" }, ie = { class: "custom-body" }, ue = { class: "config-list" }, pe = { class: "config-item" }, ce = { key: 0 }, me = { key: 0 }, de = { key: 1 }, _e = { key: 0 }, ve = { style: { "max-width": "820px" } }, fe = { style: { "white-space": "pre-line" } }, he = {
|
|
35
37
|
__name: "index",
|
|
36
38
|
props: {
|
|
@@ -241,11 +243,11 @@ const oe = (V) => (W("data-v-e4f6c06a"), V = V(), X(), V), ae = { class: "custom
|
|
|
241
243
|
}, 8, ["modelValue"]);
|
|
242
244
|
};
|
|
243
245
|
}
|
|
244
|
-
}, Ve = /* @__PURE__ */ le(he, [["__scopeId", "data-v-e4f6c06a"]]),
|
|
246
|
+
}, Ve = /* @__PURE__ */ le(he, [["__scopeId", "data-v-e4f6c06a"]]), et = {
|
|
245
247
|
install(V) {
|
|
246
248
|
V.component("st-varSelectDialog", Ve);
|
|
247
249
|
}
|
|
248
250
|
};
|
|
249
251
|
export {
|
|
250
|
-
|
|
252
|
+
et as default
|
|
251
253
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const l=require("./base-ef747d02.cjs"),q=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");const B=require("./el-button-974ff9e9.cjs"),x=require("./el-input-fa18ef84.cjs"),e=require("vue"),g=require("./dayjs.min-2c20abe6.cjs"),h=require("./index-33f80550.cjs"),T=require("./_plugin-vue_export-helper-f246444f.cjs"),k=require("./index-6ca95c8a.cjs"),V=require("./use-form-common-props-d3ed62c6.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./config-provider-2ae47cc8.cjs");const z=l.buildProps({size:{type:[Number,String],values:V.componentSizes,default:"",validator:s=>l.isNumber(s)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:V.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:l.definePropType(String),default:"cover"}}),A={error:s=>s instanceof Event},C=e.defineComponent({name:"ElAvatar"}),I=e.defineComponent({...C,props:z,emits:A,setup(s,{emit:_}){const c=s,a=l.useNamespace("avatar"),o=e.ref(!1),n=e.computed(()=>{const{size:t,icon:y,shape:d}=c,r=[a.b()];return l.isString(t)&&r.push(a.m(t)),y&&r.push(a.m("icon")),d&&r.push(a.m(d)),r}),p=e.computed(()=>{const{size:t}=c;return l.isNumber(t)?a.cssVarBlock({size:l.addUnit(t)||""}):void 0}),m=e.computed(()=>({objectFit:c.fit}));e.watch(()=>c.src,()=>o.value=!1);function f(t){o.value=!0,_("error",t)}return(t,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(n)),style:e.normalizeStyle(e.unref(p))},[(t.src||t.srcSet)&&!o.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:e.normalizeStyle(e.unref(m)),onError:f},null,44,["src","alt","srcset"])):t.icon?(e.openBlock(),e.createBlock(e.unref(h.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),_:1})):e.renderSlot(t.$slots,"default",{key:2})],6))}});var H=l._export_sfc(I,[["__file","avatar.vue"]]);const $=l.withInstall(H);const j=async({appId:s,apiKey:_,value:c})=>{var a;try{const o=await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${s}/completion`,{method:"POST",headers:{Authorization:`Bearer ${_}`,"Content-Type":"application/json"},body:JSON.stringify({input:{prompt:c},parameters:{incremental_output:!1}})});if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);const n=await o.json();return(a=n==null?void 0:n.output)==null?void 0:a.text}catch(o){throw o.name==="AbortError"?new Error("请求超时"):o}};const N=s=>(e.pushScopeId("data-v-3b75cb12"),s=s(),e.popScopeId(),s),P={class:"chat-container"},L={class:"avatar"},D={class:"message-content"},K={class:"message-text"},M={class:"message-time"},R={key:0,class:"message-item assistant"},F={class:"avatar"},O=N(()=>e.createElementVNode("div",{class:"message-content"},[e.createElementVNode("div",{class:"typing-indicator"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)),U={class:"input-area"},J={class:"input-actions"},G=N(()=>e.createElementVNode("div",{class:"input-hint"},[e.createElementVNode("span",null,"Ctrl + Enter 发送")],-1)),Q={__name:"index",emits:["callBack"],setup(s,{expose:_,emit:c}){const a=c,o=e.ref(!1),n=e.ref(!1),p=e.ref(!1),m=e.ref(null),f=e.ref([{role:"assistant",time:g.dayjs().format("HH:mm"),content:`你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
|
|
2
|
+
|
|
3
|
+
示例:
|
|
4
|
+
帮我查找A股,总市值1000亿,流通股本大于等于1000万`}]),t=e.ref(""),y=async()=>{const r=t.value.trim();if(!r)return k.ElMessage.warning("请输入消息内容");if(n.value)return;f.value.push({role:"user",time:g.dayjs().format("HH:mm"),content:r}),t.value="",await d(),n.value=!0,p.value=!0;let i="{}";try{i=await j({appId:"9e54d112acfe4531bd1fc4fee8827fef",apiKey:"sk-d995eb26a4334bdeb2ccb4cbfaf51de8",value:r}),f.value.push({role:"assistant",time:g.dayjs().format("HH:mm"),content:i}),await d()}catch(v){k.ElMessage.error(`AI响应异常: ${v}`),console.error("AI响应异常:",v)}finally{n.value=!1,p.value=!1}a("callBack",JSON.parse(i))},d=async()=>{await e.nextTick(),m.value&&(m.value.scrollTop=m.value.scrollHeight)};return e.watch(()=>f.value,()=>{d()},{deep:!0}),_({open:r=>{o.value=!0,e.nextTick(()=>{d()})}}),(r,i)=>{const v=$,E=x.ElInput,w=B.ElButton,S=q.ElDialog;return e.openBlock(),e.createBlock(S,{class:"ai-dialog",modelValue:o.value,"onUpdate:modelValue":i[1]||(i[1]=u=>o.value=u),title:"✨ 品种池参数解析AI助手",width:"500px",center:"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:e.withCtx(()=>[e.createElementVNode("div",P,[e.createElementVNode("div",{ref_key:"messageListRef",ref:m,class:"message-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(u,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:e.normalizeClass(["message-item",u.role])},[e.createElementVNode("div",L,[e.createVNode(v,{size:32,icon:u.role==="user"?e.unref(h.user_filled_default):e.unref(h.service_default)},null,8,["icon"])]),e.createElementVNode("div",D,[e.createElementVNode("div",K,e.toDisplayString(u.content),1),e.createElementVNode("div",M,e.toDisplayString(u.time),1)])],2))),128)),p.value?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",F,[e.createVNode(v,{size:32,icon:e.unref(h.service_default)},null,8,["icon"])]),O])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",U,[e.createVNode(E,{class:"message-input",modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=u=>t.value=u),type:"textarea",rows:4,autosize:{minRows:2,maxRows:4},placeholder:"输入您想查询的品种条件...",onKeydown:e.withKeys(e.withModifiers(y,["ctrl"]),["enter"])},null,8,["modelValue","onKeydown"]),e.createElementVNode("div",J,[G,e.createVNode(w,{class:"send-btn",type:"primary",icon:e.unref(h.promotion_default),loading:n.value,onClick:y,round:""},{default:e.withCtx(()=>[e.createTextVNode(" 发送 ")]),_:1},8,["icon","loading"])])])])]),_:1},8,["modelValue"])}}},W=T._export_sfc(Q,[["__scopeId","data-v-3b75cb12"]]),X={install(s){s.component("st-varietyAiHelper",W)}};module.exports=X;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { b as j, p as H, e as M, u as D, c as O, n as U, _ as F, w as J } from "./base-29f73b05.js";
|
|
2
|
+
import { E as q } from "./el-dialog-eedcfd3e.js";
|
|
3
|
+
import "./el-overlay-1ee0338d.js";
|
|
4
|
+
import { E as G } from "./el-button-e2c63c08.js";
|
|
5
|
+
import { E as Q } from "./el-input-d47281da.js";
|
|
6
|
+
import { defineComponent as N, ref as d, computed as S, watch as C, openBlock as p, createElementBlock as w, normalizeClass as $, unref as u, normalizeStyle as x, createBlock as k, withCtx as T, resolveDynamicComponent as W, renderSlot as X, nextTick as I, createElementVNode as t, Fragment as Y, renderList as Z, createVNode as b, toDisplayString as z, createCommentVNode as ee, withKeys as te, withModifiers as se, createTextVNode as ae, pushScopeId as oe, popScopeId as ne } from "vue";
|
|
7
|
+
import { d as E } from "./dayjs.min-8313b006.js";
|
|
8
|
+
import { E as re, u as ie, s as V, p as le } from "./index-c2b9bbfd.js";
|
|
9
|
+
import { _ as ce } from "./_plugin-vue_export-helper-dad06003.js";
|
|
10
|
+
import { E as B } from "./index-f30561d3.js";
|
|
11
|
+
import { k as pe, i as ue } from "./use-form-common-props-cb0ca65c.js";
|
|
12
|
+
import "./index-0f79095c.js";
|
|
13
|
+
import "./index-8391a3df.js";
|
|
14
|
+
import "./index-de24705f.js";
|
|
15
|
+
import "./index-2e331d74.js";
|
|
16
|
+
import "./vnode-a83e6de8.js";
|
|
17
|
+
import "./scroll-6799bafc.js";
|
|
18
|
+
import "./use-global-config-cdaeca54.js";
|
|
19
|
+
import "./index-0ee486ad.js";
|
|
20
|
+
import "./index-657047bb.js";
|
|
21
|
+
import "./typescript-7ae59c4c.js";
|
|
22
|
+
import "./index-c71e37dc.js";
|
|
23
|
+
import "./config-provider-7860903c.js";
|
|
24
|
+
const me = j({
|
|
25
|
+
size: {
|
|
26
|
+
type: [Number, String],
|
|
27
|
+
values: pe,
|
|
28
|
+
default: "",
|
|
29
|
+
validator: (a) => H(a)
|
|
30
|
+
},
|
|
31
|
+
shape: {
|
|
32
|
+
type: String,
|
|
33
|
+
values: ["circle", "square"],
|
|
34
|
+
default: "circle"
|
|
35
|
+
},
|
|
36
|
+
icon: {
|
|
37
|
+
type: ue
|
|
38
|
+
},
|
|
39
|
+
src: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
alt: String,
|
|
44
|
+
srcSet: String,
|
|
45
|
+
fit: {
|
|
46
|
+
type: M(String),
|
|
47
|
+
default: "cover"
|
|
48
|
+
}
|
|
49
|
+
}), de = {
|
|
50
|
+
error: (a) => a instanceof Event
|
|
51
|
+
}, fe = N({
|
|
52
|
+
name: "ElAvatar"
|
|
53
|
+
}), ve = /* @__PURE__ */ N({
|
|
54
|
+
...fe,
|
|
55
|
+
props: me,
|
|
56
|
+
emits: de,
|
|
57
|
+
setup(a, { emit: h }) {
|
|
58
|
+
const i = a, o = D("avatar"), s = d(!1), n = S(() => {
|
|
59
|
+
const { size: e, icon: g, shape: m } = i, r = [o.b()];
|
|
60
|
+
return O(e) && r.push(o.m(e)), g && r.push(o.m("icon")), m && r.push(o.m(m)), r;
|
|
61
|
+
}), f = S(() => {
|
|
62
|
+
const { size: e } = i;
|
|
63
|
+
return H(e) ? o.cssVarBlock({
|
|
64
|
+
size: U(e) || ""
|
|
65
|
+
}) : void 0;
|
|
66
|
+
}), v = S(() => ({
|
|
67
|
+
objectFit: i.fit
|
|
68
|
+
}));
|
|
69
|
+
C(() => i.src, () => s.value = !1);
|
|
70
|
+
function _(e) {
|
|
71
|
+
s.value = !0, h("error", e);
|
|
72
|
+
}
|
|
73
|
+
return (e, g) => (p(), w("span", {
|
|
74
|
+
class: $(u(n)),
|
|
75
|
+
style: x(u(f))
|
|
76
|
+
}, [
|
|
77
|
+
(e.src || e.srcSet) && !s.value ? (p(), w("img", {
|
|
78
|
+
key: 0,
|
|
79
|
+
src: e.src,
|
|
80
|
+
alt: e.alt,
|
|
81
|
+
srcset: e.srcSet,
|
|
82
|
+
style: x(u(v)),
|
|
83
|
+
onError: _
|
|
84
|
+
}, null, 44, ["src", "alt", "srcset"])) : e.icon ? (p(), k(u(re), { key: 1 }, {
|
|
85
|
+
default: T(() => [
|
|
86
|
+
(p(), k(W(e.icon)))
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
})) : X(e.$slots, "default", { key: 2 })
|
|
90
|
+
], 6));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
var _e = /* @__PURE__ */ F(ve, [["__file", "avatar.vue"]]);
|
|
94
|
+
const ye = J(_e);
|
|
95
|
+
const he = async ({ appId: a, apiKey: h, value: i }) => {
|
|
96
|
+
var o;
|
|
97
|
+
try {
|
|
98
|
+
const s = await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${a}/completion`, {
|
|
99
|
+
method: "POST",
|
|
100
|
+
headers: {
|
|
101
|
+
Authorization: `Bearer ${h}`,
|
|
102
|
+
"Content-Type": "application/json"
|
|
103
|
+
},
|
|
104
|
+
body: JSON.stringify({
|
|
105
|
+
input: { prompt: i },
|
|
106
|
+
parameters: {
|
|
107
|
+
incremental_output: !1
|
|
108
|
+
// 非流式
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
if (!s.ok)
|
|
113
|
+
throw new Error(`HTTP ${s.status}: ${s.statusText}`);
|
|
114
|
+
const n = await s.json();
|
|
115
|
+
return (o = n == null ? void 0 : n.output) == null ? void 0 : o.text;
|
|
116
|
+
} catch (s) {
|
|
117
|
+
throw s.name === "AbortError" ? new Error("请求超时") : s;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const L = (a) => (oe("data-v-3b75cb12"), a = a(), ne(), a), ge = { class: "chat-container" }, we = { class: "avatar" }, be = { class: "message-content" }, Se = { class: "message-text" }, Ee = { class: "message-time" }, ke = {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: "message-item assistant"
|
|
123
|
+
}, Te = { class: "avatar" }, Ae = /* @__PURE__ */ L(() => /* @__PURE__ */ t("div", { class: "message-content" }, [
|
|
124
|
+
/* @__PURE__ */ t("div", { class: "typing-indicator" }, [
|
|
125
|
+
/* @__PURE__ */ t("span"),
|
|
126
|
+
/* @__PURE__ */ t("span"),
|
|
127
|
+
/* @__PURE__ */ t("span")
|
|
128
|
+
])
|
|
129
|
+
], -1)), xe = { class: "input-area" }, Ie = { class: "input-actions" }, ze = /* @__PURE__ */ L(() => /* @__PURE__ */ t("div", { class: "input-hint" }, [
|
|
130
|
+
/* @__PURE__ */ t("span", null, "Ctrl + Enter 发送")
|
|
131
|
+
], -1)), Ve = {
|
|
132
|
+
__name: "index",
|
|
133
|
+
emits: ["callBack"],
|
|
134
|
+
setup(a, { expose: h, emit: i }) {
|
|
135
|
+
const o = i, s = d(!1), n = d(!1), f = d(!1), v = d(null), _ = d([
|
|
136
|
+
{
|
|
137
|
+
role: "assistant",
|
|
138
|
+
time: E().format("HH:mm"),
|
|
139
|
+
content: `你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
|
|
140
|
+
|
|
141
|
+
示例:
|
|
142
|
+
帮我查找A股,总市值1000亿,流通股本大于等于1000万`
|
|
143
|
+
}
|
|
144
|
+
]), e = d(""), g = async () => {
|
|
145
|
+
const r = e.value.trim();
|
|
146
|
+
if (!r)
|
|
147
|
+
return B.warning("请输入消息内容");
|
|
148
|
+
if (n.value)
|
|
149
|
+
return;
|
|
150
|
+
_.value.push({
|
|
151
|
+
role: "user",
|
|
152
|
+
time: E().format("HH:mm"),
|
|
153
|
+
content: r
|
|
154
|
+
}), e.value = "", await m(), n.value = !0, f.value = !0;
|
|
155
|
+
let l = "{}";
|
|
156
|
+
try {
|
|
157
|
+
l = await he({ appId: "9e54d112acfe4531bd1fc4fee8827fef", apiKey: "sk-d995eb26a4334bdeb2ccb4cbfaf51de8", value: r }), _.value.push({
|
|
158
|
+
role: "assistant",
|
|
159
|
+
time: E().format("HH:mm"),
|
|
160
|
+
content: l
|
|
161
|
+
}), await m();
|
|
162
|
+
} catch (y) {
|
|
163
|
+
B.error(`AI响应异常: ${y}`), console.error("AI响应异常:", y);
|
|
164
|
+
} finally {
|
|
165
|
+
n.value = !1, f.value = !1;
|
|
166
|
+
}
|
|
167
|
+
o("callBack", JSON.parse(l));
|
|
168
|
+
}, m = async () => {
|
|
169
|
+
await I(), v.value && (v.value.scrollTop = v.value.scrollHeight);
|
|
170
|
+
};
|
|
171
|
+
return C(
|
|
172
|
+
() => _.value,
|
|
173
|
+
() => {
|
|
174
|
+
m();
|
|
175
|
+
},
|
|
176
|
+
{ deep: !0 }
|
|
177
|
+
), h({
|
|
178
|
+
open: (r) => {
|
|
179
|
+
s.value = !0, I(() => {
|
|
180
|
+
m();
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}), (r, l) => {
|
|
184
|
+
const y = ye, A = Q, P = G, K = q;
|
|
185
|
+
return p(), k(K, {
|
|
186
|
+
class: "ai-dialog",
|
|
187
|
+
modelValue: s.value,
|
|
188
|
+
"onUpdate:modelValue": l[1] || (l[1] = (c) => s.value = c),
|
|
189
|
+
title: "✨ 品种池参数解析AI助手",
|
|
190
|
+
width: "500px",
|
|
191
|
+
center: "",
|
|
192
|
+
draggable: "",
|
|
193
|
+
overflow: "",
|
|
194
|
+
modal: !1,
|
|
195
|
+
"modal-penetrable": !0
|
|
196
|
+
}, {
|
|
197
|
+
default: T(() => [
|
|
198
|
+
t("div", ge, [
|
|
199
|
+
t("div", {
|
|
200
|
+
ref_key: "messageListRef",
|
|
201
|
+
ref: v,
|
|
202
|
+
class: "message-list"
|
|
203
|
+
}, [
|
|
204
|
+
(p(!0), w(Y, null, Z(_.value, (c, R) => (p(), w("div", {
|
|
205
|
+
key: R,
|
|
206
|
+
class: $(["message-item", c.role])
|
|
207
|
+
}, [
|
|
208
|
+
t("div", we, [
|
|
209
|
+
b(y, {
|
|
210
|
+
size: 32,
|
|
211
|
+
icon: c.role === "user" ? u(ie) : u(V)
|
|
212
|
+
}, null, 8, ["icon"])
|
|
213
|
+
]),
|
|
214
|
+
t("div", be, [
|
|
215
|
+
t("div", Se, z(c.content), 1),
|
|
216
|
+
t("div", Ee, z(c.time), 1)
|
|
217
|
+
])
|
|
218
|
+
], 2))), 128)),
|
|
219
|
+
f.value ? (p(), w("div", ke, [
|
|
220
|
+
t("div", Te, [
|
|
221
|
+
b(y, {
|
|
222
|
+
size: 32,
|
|
223
|
+
icon: u(V)
|
|
224
|
+
}, null, 8, ["icon"])
|
|
225
|
+
]),
|
|
226
|
+
Ae
|
|
227
|
+
])) : ee("", !0)
|
|
228
|
+
], 512),
|
|
229
|
+
t("div", xe, [
|
|
230
|
+
b(A, {
|
|
231
|
+
class: "message-input",
|
|
232
|
+
modelValue: e.value,
|
|
233
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => e.value = c),
|
|
234
|
+
type: "textarea",
|
|
235
|
+
rows: 4,
|
|
236
|
+
autosize: { minRows: 2, maxRows: 4 },
|
|
237
|
+
placeholder: "输入您想查询的品种条件...",
|
|
238
|
+
onKeydown: te(se(g, ["ctrl"]), ["enter"])
|
|
239
|
+
}, null, 8, ["modelValue", "onKeydown"]),
|
|
240
|
+
t("div", Ie, [
|
|
241
|
+
ze,
|
|
242
|
+
b(P, {
|
|
243
|
+
class: "send-btn",
|
|
244
|
+
type: "primary",
|
|
245
|
+
icon: u(le),
|
|
246
|
+
loading: n.value,
|
|
247
|
+
onClick: g,
|
|
248
|
+
round: ""
|
|
249
|
+
}, {
|
|
250
|
+
default: T(() => [
|
|
251
|
+
ae(" 发送 ")
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
}, 8, ["icon", "loading"])
|
|
255
|
+
])
|
|
256
|
+
])
|
|
257
|
+
])
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["modelValue"]);
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
}, Be = /* @__PURE__ */ ce(Ve, [["__scopeId", "data-v-3b75cb12"]]), tt = {
|
|
264
|
+
install(a) {
|
|
265
|
+
a.component("st-varietyAiHelper", Be);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
export {
|
|
269
|
+
tt as default
|
|
270
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ef747d02.cjs");const
|
|
1
|
+
"use strict";require("./base-ef747d02.cjs");const y=require("./el-autocomplete-b59eb529.cjs");require("./el-input-fa18ef84.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-popper-2d3914e4.cjs");const e=require("vue"),f=require("./index-8901a38c.cjs"),x=require("./_plugin-vue_export-helper-f246444f.cjs");require("./use-form-common-props-d3ed62c6.cjs");require("./index-9780a537.cjs");require("./index-33f80550.cjs");require("./index-e8eeea22.cjs");require("./index-28e03bad.cjs");require("./debounce-62f5b6e8.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");const S={class:"variety-auto-complete"},b={key:0,class:"label"},v={class:"label"},C={__name:"index",props:{width:{type:String,default:"200px"},size:{type:String,default:"default"},label:{type:String,default:"品种搜索"},placeholder:{type:String,default:"请输入品种名称或代码"},selectClearEnable:{type:Boolean,default:!0}},emits:["input","select","change"],setup(o,{emit:u}){const d=e.inject("stConfig"),s=u,r=o,i=e.ref(""),p=async(t,l)=>{if(t===""||t==="null")l([]);else{const a={keyWord:t,pageNum:1,pageSize:999,userId:f.V("id"),hotSearchFlag:1},{body:n}=await d.request.post("/common/qt/quickSearch",a),g=n.list.map(({code:c,featureName:q})=>({label:`${c} ${q}`,value:c}));l(g)}},m=t=>{s("input",t)},_=({label:t,value:l})=>{const a=t.split(" ").at(-1);s("select",{name:a,code:l}),r.selectClearEnable&&(i.value="")},h=t=>{s("change",t)};return(t,l)=>{const a=y.ElAutocomplete;return e.openBlock(),e.createElementBlock("div",S,[o.label?(e.openBlock(),e.createElementBlock("span",b,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(a,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=n=>i.value=n),clearable:"",size:r.size,placeholder:r.placeholder,"fetch-suggestions":p,onInput:m,onSelect:_,onChange:h,style:e.normalizeStyle({width:o.width})},{default:e.withCtx(({item:n})=>[e.createElementVNode("div",v,e.toDisplayString(n.label),1)]),_:1},8,["modelValue","size","placeholder","style"])])}}},V=x._export_sfc(C,[["__scopeId","data-v-279b3fa1"]]),k={install(o){o.component("st-varietyAutoComplete",V)}};module.exports=k;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as S } from "./el-autocomplete-
|
|
3
|
-
import "./el-input-
|
|
1
|
+
import "./base-29f73b05.js";
|
|
2
|
+
import { E as S } from "./el-autocomplete-27c60cc8.js";
|
|
3
|
+
import "./el-input-d47281da.js";
|
|
4
4
|
import "./el-scrollbar-323542e7.js";
|
|
5
|
-
import "./el-popper-
|
|
5
|
+
import "./el-popper-c9b3d3cf.js";
|
|
6
6
|
import { inject as b, ref as C, openBlock as r, createElementBlock as p, toDisplayString as m, createCommentVNode as v, createVNode as V, normalizeStyle as z, withCtx as E, createElementVNode as w } from "vue";
|
|
7
7
|
import { V as k } from "./index-7ed0999e.js";
|
|
8
8
|
import { _ as I } from "./_plugin-vue_export-helper-dad06003.js";
|
|
9
|
-
import "./use-form-common-props-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./
|
|
9
|
+
import "./use-form-common-props-cb0ca65c.js";
|
|
10
|
+
import "./index-8391a3df.js";
|
|
11
|
+
import "./index-c2b9bbfd.js";
|
|
12
|
+
import "./index-1d9b50de.js";
|
|
13
|
+
import "./index-0f79095c.js";
|
|
14
|
+
import "./debounce-a09ce9a3.js";
|
|
14
15
|
import "./typescript-7ae59c4c.js";
|
|
15
|
-
import "./index-
|
|
16
|
+
import "./index-c71e37dc.js";
|
|
16
17
|
const N = { class: "variety-auto-complete" }, q = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "label"
|
|
@@ -76,11 +77,11 @@ const N = { class: "variety-auto-complete" }, q = {
|
|
|
76
77
|
]);
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
|
-
}, $ = /* @__PURE__ */ I(B, [["__scopeId", "data-v-279b3fa1"]]),
|
|
80
|
+
}, $ = /* @__PURE__ */ I(B, [["__scopeId", "data-v-279b3fa1"]]), X = {
|
|
80
81
|
install(o) {
|
|
81
82
|
o.component("st-varietyAutoComplete", $);
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
85
|
export {
|
|
85
|
-
|
|
86
|
+
X as default
|
|
86
87
|
};
|