@fangzhongya/vue-archive 0.0.50 → 0.0.51
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/node/index.cjs
CHANGED
|
@@ -3549,7 +3549,7 @@ function getSpecType(val, v) {
|
|
|
3549
3549
|
let type = v || ds.type;
|
|
3550
3550
|
if (tarr.length == 1) {
|
|
3551
3551
|
type = tarr[0].split("<")[0];
|
|
3552
|
-
} else if (tarr.length >
|
|
3552
|
+
} else if (tarr.length > 1) {
|
|
3553
3553
|
type = "any";
|
|
3554
3554
|
}
|
|
3555
3555
|
let selectable = (val?.selectable || "").trim();
|
package/dist/node/index.js
CHANGED
|
@@ -3534,7 +3534,7 @@ function getSpecType(val, v) {
|
|
|
3534
3534
|
let type = v || ds.type;
|
|
3535
3535
|
if (tarr.length == 1) {
|
|
3536
3536
|
type = tarr[0].split("<")[0];
|
|
3537
|
-
} else if (tarr.length >
|
|
3537
|
+
} else if (tarr.length > 1) {
|
|
3538
3538
|
type = "any";
|
|
3539
3539
|
}
|
|
3540
3540
|
let selectable = (val?.selectable || "").trim();
|
|
@@ -18,4 +18,4 @@ ${c.vueFormat(h," ")}
|
|
|
18
18
|
${c.vueFormat(c.getFunBody(t.body)," ")}
|
|
19
19
|
}`;return`function (${t.param}) ${n}`}else return"undefined"}function Z(e){const t=c.parseParamString(e.selectable),n=L(t);let s="";e.return&&(s="return ");let i=`{
|
|
20
20
|
${c.vueFormat(c.getFunBody(s)," ")}
|
|
21
|
-
}`;return`function (${n}) ${i}`}function G(e){const t=e.trim();return/^\(/.test(t)?j(t):JSON.stringify(e)}function D(e,t,n){const s=n?n[t]:"";return s?typeof s=="string"?V(s):s:typeof e=="string"?G(e+""):JSON.stringify(e)}function E(e,t){let n=c.parseTypeDefinition(e?.type),s=n.dataType,i=t||n.type;s.length==1?i=s[0].split("<")[0]:s.length>
|
|
21
|
+
}`;return`function (${n}) ${i}`}function G(e){const t=e.trim();return/^\(/.test(t)?j(t):JSON.stringify(e)}function D(e,t,n){const s=n?n[t]:"";return s?typeof s=="string"?V(s):s:typeof e=="string"?G(e+""):JSON.stringify(e)}function E(e,t){let n=c.parseTypeDefinition(e?.type),s=n.dataType,i=t||n.type;s.length==1?i=s[0].split("<")[0]:s.length>1&&(i="any");let h=(e?.selectable||"").trim(),a=[];return h&&i!="boolean"&&(h.includes("|")?h.split("|").forEach(r=>{if(r){let $=r.split(":");a.push({label:r,prop:V($[0].trim())})}}):a=c.parseParamString(h),i=="function"?i="function":i=="array"?i="choice":a.length>1&&(i="select")),{arr:a,type:i.toLowerCase(),dataType:s}}function V(e,t){try{if(t?.toLowerCase()=="function")if(typeof e=="string"){if(/^\((.|\n|\r)*\)$/.test(e))return e=e.substring(1,e.length-1),new Function(`{ return ${e} }`)()}else return e;else return new Function(`{ return ${e} }`)()}catch{return""+e}}function I(e,t=!0){const n=E(e),s=c.getTypeValue(n.dataType);if(t){const i=(e.default||"").trim();return V(i||s,n.dataType[0])}else{const i=(e.default||"").trim();return V(i,n.dataType[0])}}exports.getDefaultValue=I;exports.getHmtl=A;exports.getSpecType=E;exports.setValStringify=D;
|
|
@@ -156,7 +156,7 @@ function L(t, e, n) {
|
|
|
156
156
|
}
|
|
157
157
|
function z(t, e) {
|
|
158
158
|
let n = q(t?.type), s = n.dataType, o = e || n.type;
|
|
159
|
-
s.length == 1 ? o = s[0].split("<")[0] : s.length >
|
|
159
|
+
s.length == 1 ? o = s[0].split("<")[0] : s.length > 1 && (o = "any");
|
|
160
160
|
let h = (t?.selectable || "").trim(), l = [];
|
|
161
161
|
return h && o != "boolean" && (h.includes("|") ? h.split("|").forEach((r) => {
|
|
162
162
|
if (r) {
|