vue-api-request-builder 0.2.8 → 0.2.9
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/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -9020,7 +9020,7 @@ function lu(t, e) {
|
|
|
9020
9020
|
return e;
|
|
9021
9021
|
try {
|
|
9022
9022
|
let n = t;
|
|
9023
|
-
const a = "function transformData(data)
|
|
9023
|
+
const a = "function transformData(data)", r = "}", s = n.trim(), o = s.indexOf(a), i = s.lastIndexOf(r);
|
|
9024
9024
|
return o !== -1 && i !== -1 && i > o + a.length && (n = s.substring(o + a.length, i).trim()), new Function("data", n)(e);
|
|
9025
9025
|
} catch (n) {
|
|
9026
9026
|
return console.error("执行数据转换函数失败:", n), e;
|
package/dist/index.umd.js
CHANGED
|
@@ -158,4 +158,4 @@ XID_Start XIDS`.split(/\s/).map(t=>[kt(t),t])),Ol=new Map([["s",F(383)],[F(383),
|
|
|
158
158
|
`))return`${d}
|
|
159
159
|
`},pre(d){var m;this.addClassToHast(d,"vp-code"),a.value=((m=d.properties)==null?void 0:m.style)||""}}]}),r.value=!1};const p=await Ri({themes:[Bi],langs:[Ti],engine:_c()});u.watch(e,c,{immediate:!0})}})();const s=u.ref(),o=u.ref();function i(){if(!o.value||!s.value)return;const c=o.value.children[0];c&&(c.scrollLeft=s.value.scrollLeft)}function l(){u.nextTick().then(()=>{i()})}return(c,p)=>(u.openBlock(),u.createElementBlock("div",{class:"language-ts vp-adaptive-theme transition-none! mini-playground shadow h-full overflow-y-auto overflow-x-hidden",style:u.normalizeStyle([a.value])},[u.createElementVNode("div",$c,[u.createElementVNode("div",{ref_key:"highlightContainerRef",ref:o,innerHTML:n.value,class:"h-full"},null,8,wc),u.withDirectives(u.createElementVNode("textarea",{ref_key:"textAreaRef",ref:s,"onUpdate:modelValue":p[0]||(p[0]=d=>e.value=d),class:"whitespace-pre p-0 border-none outline-none overflow-hidden w-full h-full font-mono bg-transparent absolute inset-0 text-transparent caret-gray tab-4 resize-none z-10 line-height-$vp-code-line-height font-$vp-font-family-mono text-size-$vp-code-font-size",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onInput:l,onScroll:i},null,544),[[u.vModelText,e.value]])])],4))}}),Cc={class:"w-full h-full data-transform-container"},xc={class:"monaco-editor-container"},vc=et(u.defineComponent({__name:"index",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=u.useModel(t,"modelValue");return u.onMounted(()=>{e.value||(e.value=`function transformData(data) {
|
|
160
160
|
return data
|
|
161
|
-
}`)}),(n,a)=>(u.openBlock(),u.createElementBlock("div",Cc,[u.createElementVNode("div",xc,[u.createVNode(u.unref(kc),{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=r=>e.value=r)},null,8,["modelValue"])])]))}}),[["__scopeId","data-v-d1a39038"]]);function Sc(t,e){if(!t)return e;try{let n=t;const a="function transformData(data)
|
|
161
|
+
}`)}),(n,a)=>(u.openBlock(),u.createElementBlock("div",Cc,[u.createElementVNode("div",xc,[u.createVNode(u.unref(kc),{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=r=>e.value=r)},null,8,["modelValue"])])]))}}),[["__scopeId","data-v-d1a39038"]]);function Sc(t,e){if(!t)return e;try{let n=t;const a="function transformData(data)",r="}",s=n.trim(),o=s.indexOf(a),i=s.lastIndexOf(r);return o!==-1&&i!==-1&&i>o+a.length&&(n=s.substring(o+a.length,i).trim()),new Function("data",n)(e)}catch(n){return console.error("执行数据转换函数失败:",n),e}}function Ec(t){if(!t)return!1;try{let e=t;const n="function transformData(data) {",a="}",r=e.trim(),s=r.indexOf(n),o=r.lastIndexOf(a);return s!==-1&&o!==-1&&o>s+n.length&&(e=r.substring(s+n.length,o).trim()),new Function("data",e),!0}catch(e){return console.error("数据转换函数无效:",e),!1}}E.DataTransform=vc,E.KeyValueInput=tt,E.RequestForm=Cn,E.ResponseSection=Vr,E.default=Cn,E.defaultRequestSchema=kn,E.executeRequest=xn,E.executeTransformFunction=Sc,E.validateTransformFunction=Ec,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-api-request-builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"monaco-editor-core": "^0.52.2",
|
|
34
34
|
"shiki": "^3.4.0",
|
|
35
35
|
"vue": "^3.5.13",
|
|
36
|
-
"vue-api-request-builder": "^0.2.
|
|
36
|
+
"vue-api-request-builder": "^0.2.8"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^20.0.0",
|