@fangzhongya/vue-archive 0.0.45 → 0.0.47
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 +184 -112
- package/dist/node/index.js +184 -112
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +98 -85
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +18 -16
- package/dist/packages/components/compo/info-top.vue.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue.js +32 -0
- package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue2.js +4 -0
- package/dist/packages/components/compo/props.vue.cjs +1 -1
- package/dist/packages/components/compo/props.vue.js +44 -40
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.js +69 -48
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/components/main/index.vue.js +30 -25
- package/dist/packages/components/test/index.cjs +1 -1
- package/dist/packages/components/test/index.js +24 -22
- package/dist/packages/components/test/top.cjs +1 -1
- package/dist/packages/components/test/top.js +69 -84
- package/dist/packages/components/use/code.cjs +6 -6
- package/dist/packages/components/use/code.js +74 -66
- package/dist/packages/components/use/retrie/array/index.vue.cjs +2 -2
- package/dist/packages/components/use/retrie/array/index.vue.js +16 -16
- package/dist/packages/components/use/retrie/object/index.vue.cjs +2 -2
- package/dist/packages/components/use/retrie/object/index.vue.js +17 -17
- package/dist/packages/page/develop/index.vue2.cjs +1 -1
- package/dist/packages/page/develop/index.vue2.js +2 -1
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -2594,6 +2594,9 @@ function addTags(tag, obj) {
|
|
|
2594
2594
|
case "text":
|
|
2595
2595
|
addTitle(obj);
|
|
2596
2596
|
return true;
|
|
2597
|
+
case "html":
|
|
2598
|
+
addTitle(obj);
|
|
2599
|
+
return true;
|
|
2597
2600
|
default:
|
|
2598
2601
|
return false;
|
|
2599
2602
|
}
|
|
@@ -2726,22 +2729,32 @@ function getTopDom(props2, h4, isZy) {
|
|
|
2726
2729
|
if (is) {
|
|
2727
2730
|
setDivision();
|
|
2728
2731
|
}
|
|
2729
|
-
let type = obj.title.type || "div";
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
{
|
|
2734
|
-
class: "compo-top-title"
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
]
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2732
|
+
let type = (obj.title.type || "div").split(".");
|
|
2733
|
+
let c = type[1] || "";
|
|
2734
|
+
if (type[0] == "html") {
|
|
2735
|
+
doms.push(
|
|
2736
|
+
h4("div", {
|
|
2737
|
+
class: "compo-top-title " + c,
|
|
2738
|
+
innerHTML: obj.title.name + " " + obj.title.description
|
|
2739
|
+
})
|
|
2740
|
+
);
|
|
2741
|
+
} else {
|
|
2742
|
+
doms.push(
|
|
2743
|
+
h4(
|
|
2744
|
+
type[0],
|
|
2745
|
+
{
|
|
2746
|
+
class: "compo-top-title " + c
|
|
2747
|
+
},
|
|
2748
|
+
[
|
|
2749
|
+
h4("span", {}, [
|
|
2750
|
+
getValue(
|
|
2751
|
+
obj.title.name + " " + obj.title.description
|
|
2752
|
+
)
|
|
2753
|
+
])
|
|
2754
|
+
]
|
|
2755
|
+
)
|
|
2756
|
+
);
|
|
2757
|
+
}
|
|
2745
2758
|
}
|
|
2746
2759
|
if (is) {
|
|
2747
2760
|
if (list.length > 0) {
|
|
@@ -2758,24 +2771,46 @@ function getTopDom(props2, h4, isZy) {
|
|
|
2758
2771
|
)
|
|
2759
2772
|
);
|
|
2760
2773
|
}
|
|
2761
|
-
if (obj.
|
|
2762
|
-
let type = obj.
|
|
2774
|
+
if (obj.html) {
|
|
2775
|
+
let type = (obj.html.type || "div").split(".");
|
|
2776
|
+
let c = type[1] || "";
|
|
2763
2777
|
list.push(
|
|
2764
|
-
h4(
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
},
|
|
2769
|
-
[
|
|
2770
|
-
h4("span", {}, [
|
|
2771
|
-
getValue(
|
|
2772
|
-
obj.text.name + " " + obj.text.description
|
|
2773
|
-
)
|
|
2774
|
-
])
|
|
2775
|
-
]
|
|
2776
|
-
)
|
|
2778
|
+
h4(type[0], {
|
|
2779
|
+
class: "compo-top-html " + c,
|
|
2780
|
+
innerHTML: obj.html.name + " " + obj.html.description
|
|
2781
|
+
})
|
|
2777
2782
|
);
|
|
2778
2783
|
}
|
|
2784
|
+
["text"].forEach((v) => {
|
|
2785
|
+
if (obj[v]) {
|
|
2786
|
+
let type = (obj[v].type || "div").split(".");
|
|
2787
|
+
let c = type[1] || "";
|
|
2788
|
+
if (type[0] == "html") {
|
|
2789
|
+
list.push(
|
|
2790
|
+
h4("div", {
|
|
2791
|
+
class: "compo-top-" + v + " " + c,
|
|
2792
|
+
innerHTML: obj[v].name + " " + obj[v].description
|
|
2793
|
+
})
|
|
2794
|
+
);
|
|
2795
|
+
} else {
|
|
2796
|
+
list.push(
|
|
2797
|
+
h4(
|
|
2798
|
+
type[0],
|
|
2799
|
+
{
|
|
2800
|
+
class: "compo-top-" + v + " " + c
|
|
2801
|
+
},
|
|
2802
|
+
[
|
|
2803
|
+
h4("span", {}, [
|
|
2804
|
+
getValue(
|
|
2805
|
+
obj[v].name + " " + obj[v].description
|
|
2806
|
+
)
|
|
2807
|
+
])
|
|
2808
|
+
]
|
|
2809
|
+
)
|
|
2810
|
+
);
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2779
2814
|
});
|
|
2780
2815
|
setTitle3();
|
|
2781
2816
|
setDivision();
|
|
@@ -2887,22 +2922,32 @@ function getTestTopDom(props2, h4, isZy) {
|
|
|
2887
2922
|
if (is) {
|
|
2888
2923
|
setDivision();
|
|
2889
2924
|
}
|
|
2890
|
-
let type = obj.title.type || "div";
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
{
|
|
2895
|
-
class: "test-top-title"
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
]
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2925
|
+
let type = (obj.title.type || "div").split(".");
|
|
2926
|
+
let c = type[1] || "";
|
|
2927
|
+
if (type[0] == "html") {
|
|
2928
|
+
doms.push(
|
|
2929
|
+
h4("div", {
|
|
2930
|
+
class: "test-top-title " + c,
|
|
2931
|
+
innerHTML: obj.title.name + " " + obj.title.description
|
|
2932
|
+
})
|
|
2933
|
+
);
|
|
2934
|
+
} else {
|
|
2935
|
+
doms.push(
|
|
2936
|
+
h4(
|
|
2937
|
+
type[0],
|
|
2938
|
+
{
|
|
2939
|
+
class: "test-top-title " + c
|
|
2940
|
+
},
|
|
2941
|
+
[
|
|
2942
|
+
h4("span", {}, [
|
|
2943
|
+
getValue(
|
|
2944
|
+
obj.title.name + " " + obj.title.description
|
|
2945
|
+
)
|
|
2946
|
+
])
|
|
2947
|
+
]
|
|
2948
|
+
)
|
|
2949
|
+
);
|
|
2950
|
+
}
|
|
2906
2951
|
}
|
|
2907
2952
|
if (is) {
|
|
2908
2953
|
if (list.length > 0) {
|
|
@@ -2919,60 +2964,46 @@ function getTestTopDom(props2, h4, isZy) {
|
|
|
2919
2964
|
)
|
|
2920
2965
|
);
|
|
2921
2966
|
}
|
|
2922
|
-
if (obj.
|
|
2923
|
-
let type = obj.
|
|
2924
|
-
|
|
2925
|
-
h4(
|
|
2926
|
-
type,
|
|
2927
|
-
{
|
|
2928
|
-
class: "test-top-text"
|
|
2929
|
-
},
|
|
2930
|
-
[
|
|
2931
|
-
h4("span", {}, [
|
|
2932
|
-
getValue(
|
|
2933
|
-
obj.text.name + " " + obj.text.description
|
|
2934
|
-
)
|
|
2935
|
-
])
|
|
2936
|
-
]
|
|
2937
|
-
)
|
|
2938
|
-
);
|
|
2939
|
-
}
|
|
2940
|
-
if (obj.proposal) {
|
|
2941
|
-
let type = obj.proposal.type || "div";
|
|
2942
|
-
list.push(
|
|
2943
|
-
h4(
|
|
2944
|
-
type,
|
|
2945
|
-
{
|
|
2946
|
-
class: "test-top-proposal"
|
|
2947
|
-
},
|
|
2948
|
-
[
|
|
2949
|
-
h4("span", {}, [
|
|
2950
|
-
getValue(
|
|
2951
|
-
obj.proposal.name + " " + obj.proposal.description
|
|
2952
|
-
)
|
|
2953
|
-
])
|
|
2954
|
-
]
|
|
2955
|
-
)
|
|
2956
|
-
);
|
|
2957
|
-
}
|
|
2958
|
-
if (obj.error) {
|
|
2959
|
-
let type = obj.error.type || "div";
|
|
2967
|
+
if (obj.html) {
|
|
2968
|
+
let type = (obj.html.type || "div").split(".");
|
|
2969
|
+
let c = type[1] || "";
|
|
2960
2970
|
list.push(
|
|
2961
|
-
h4(
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
},
|
|
2966
|
-
[
|
|
2967
|
-
h4("span", {}, [
|
|
2968
|
-
getValue(
|
|
2969
|
-
obj.error.name + " " + obj.error.description
|
|
2970
|
-
)
|
|
2971
|
-
])
|
|
2972
|
-
]
|
|
2973
|
-
)
|
|
2971
|
+
h4(type[0], {
|
|
2972
|
+
class: "test-top-html " + c,
|
|
2973
|
+
innerHTML: obj.html.name + " " + obj.html.description
|
|
2974
|
+
})
|
|
2974
2975
|
);
|
|
2975
2976
|
}
|
|
2977
|
+
["text", "proposal", "error"].forEach((v) => {
|
|
2978
|
+
if (obj[v]) {
|
|
2979
|
+
let type = (obj[v].type || "div").split(".");
|
|
2980
|
+
let c = type[1] || "";
|
|
2981
|
+
if (type[0] == "html") {
|
|
2982
|
+
list.push(
|
|
2983
|
+
h4("div", {
|
|
2984
|
+
class: "test-top-" + v + " " + c,
|
|
2985
|
+
innerHTML: obj[v].name + " " + obj[v].description
|
|
2986
|
+
})
|
|
2987
|
+
);
|
|
2988
|
+
} else {
|
|
2989
|
+
list.push(
|
|
2990
|
+
h4(
|
|
2991
|
+
type[0],
|
|
2992
|
+
{
|
|
2993
|
+
class: "test-top-" + v + " " + c
|
|
2994
|
+
},
|
|
2995
|
+
[
|
|
2996
|
+
h4("span", {}, [
|
|
2997
|
+
getValue(
|
|
2998
|
+
obj[v].name + " " + obj[v].description
|
|
2999
|
+
)
|
|
3000
|
+
])
|
|
3001
|
+
]
|
|
3002
|
+
)
|
|
3003
|
+
);
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
});
|
|
2976
3007
|
});
|
|
2977
3008
|
setTitle3();
|
|
2978
3009
|
setDivision();
|
|
@@ -3452,7 +3483,13 @@ ${vueFormat(v, " ")}
|
|
|
3452
3483
|
function getFunctionBody(v, key, propsText) {
|
|
3453
3484
|
const text = propsText ? propsText[key] : "";
|
|
3454
3485
|
if (text) {
|
|
3455
|
-
|
|
3486
|
+
if (text.includes("=>")) {
|
|
3487
|
+
return text;
|
|
3488
|
+
} else if (text.includes("function")) {
|
|
3489
|
+
return text;
|
|
3490
|
+
} else {
|
|
3491
|
+
return funstr(v.toString());
|
|
3492
|
+
}
|
|
3456
3493
|
} else {
|
|
3457
3494
|
return funstr(v.toString());
|
|
3458
3495
|
}
|
|
@@ -3555,22 +3592,33 @@ function getType(value) {
|
|
|
3555
3592
|
});
|
|
3556
3593
|
return [...new Set(arr)].sort();
|
|
3557
3594
|
}
|
|
3558
|
-
function getObjValue(d) {
|
|
3595
|
+
function getObjValue(d, type) {
|
|
3559
3596
|
try {
|
|
3560
|
-
|
|
3597
|
+
if (type?.toLowerCase() == "function") {
|
|
3598
|
+
if (typeof d === "string") {
|
|
3599
|
+
if (/^\((.|\n|\r)*\)$/.test(d)) {
|
|
3600
|
+
d = d.substring(1, d.length - 1);
|
|
3601
|
+
return new Function(`{ return ${d} }`)();
|
|
3602
|
+
}
|
|
3603
|
+
} else {
|
|
3604
|
+
return d;
|
|
3605
|
+
}
|
|
3606
|
+
} else {
|
|
3607
|
+
return new Function(`{ return ${d} }`)();
|
|
3608
|
+
}
|
|
3561
3609
|
} catch (error) {
|
|
3562
3610
|
return "" + d;
|
|
3563
3611
|
}
|
|
3564
3612
|
}
|
|
3565
3613
|
function getDefaultValue(obj, is = true) {
|
|
3614
|
+
const vo = getSpecType(obj);
|
|
3615
|
+
const v = getTypeValue(vo.dataType);
|
|
3566
3616
|
if (is) {
|
|
3567
|
-
const vo = getSpecType(obj);
|
|
3568
|
-
const v = getTypeValue(vo.dataType);
|
|
3569
3617
|
const d = (obj.default || "").trim();
|
|
3570
|
-
return getObjValue(d || v);
|
|
3618
|
+
return getObjValue(d || v, vo.dataType[0]);
|
|
3571
3619
|
} else {
|
|
3572
3620
|
const d = (obj.default || "").trim();
|
|
3573
|
-
return getObjValue(d);
|
|
3621
|
+
return getObjValue(d, vo.dataType[0]);
|
|
3574
3622
|
}
|
|
3575
3623
|
}
|
|
3576
3624
|
|
|
@@ -3595,13 +3643,37 @@ function getDefault(ss, iss) {
|
|
|
3595
3643
|
const cs = css.map((o) => o[0]);
|
|
3596
3644
|
let ci = cs.indexOf(c);
|
|
3597
3645
|
if (ci != -1) {
|
|
3598
|
-
let
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3646
|
+
let bracketStack = [c];
|
|
3647
|
+
for (let i = 1; i < ss.length; i++) {
|
|
3648
|
+
const char = ss[i];
|
|
3649
|
+
if (cs.includes(char)) {
|
|
3650
|
+
bracketStack.push(char);
|
|
3651
|
+
} else {
|
|
3652
|
+
let is = false;
|
|
3653
|
+
char === "]" && bracketStack[bracketStack.length - 1] === "[";
|
|
3654
|
+
for (let v of css) {
|
|
3655
|
+
if (char === v[1] && bracketStack[bracketStack.length - 1] === v[0]) {
|
|
3656
|
+
is = true;
|
|
3657
|
+
break;
|
|
3658
|
+
}
|
|
3659
|
+
}
|
|
3660
|
+
if (is) {
|
|
3661
|
+
bracketStack.pop();
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
if (bracketStack.length === 0) {
|
|
3665
|
+
if (iss && ss[i + 1] === " ") {
|
|
3666
|
+
return ss.substring(0, i + 1);
|
|
3667
|
+
} else {
|
|
3668
|
+
return ss.substring(0, i + 1);
|
|
3669
|
+
}
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
} else {
|
|
3673
|
+
if (iss) {
|
|
3674
|
+
return ss.substring(0, ss.indexOf(" "));
|
|
3675
|
+
} else {
|
|
3676
|
+
return ss;
|
|
3605
3677
|
}
|
|
3606
3678
|
}
|
|
3607
3679
|
}
|