@fangzhongya/vue-archive 0.0.60 → 0.0.62
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.css +1 -1
- package/dist/node/index.cjs +206 -135
- package/dist/node/index.d.cts +28 -10
- package/dist/node/index.d.ts +28 -10
- package/dist/node/index.js +206 -135
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +12 -10
- package/dist/packages/components/use/code.d.ts +17 -25
- package/dist/packages/components/use/index.cjs +1 -1
- package/dist/packages/components/use/index.js +1 -1
- package/dist/packages/components/use/retrie/array/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/boolean/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/choice/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/function/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/number/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/object/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/other/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/select/index.d.ts +2 -2
- package/dist/packages/config.d.ts +26 -5
- package/dist/packages/page/index/index.vue2.cjs +1 -1
- package/dist/packages/page/index/index.vue2.js +1 -1
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.d.ts +11 -12
- package/dist/packages/utils/common.js +149 -84
- package/dist/packages/utils/glob.cjs +2 -2
- package/dist/packages/utils/glob.js +140 -158
- package/package.json +3 -3
package/dist/index.css
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
Updated for @stackoverflow/stacks v0.64.0
|
|
11
11
|
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
|
|
12
12
|
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
|
|
13
|
-
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-keyword,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-section,.hljs-attr{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-type,.hljs-number,.hljs-selector-id,.hljs-quote,.hljs-template-tag{color:#b75501}.hljs-selector-class{color:#015692}.hljs-string,.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-title,.hljs-literal{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.expose .expose-label{padding:10px 0;font-size:18px}.expose .expose-return{padding:5px;background-color:azure}.set-expose .set-expose-li{position:relative}.set-expose .set-expose-li .set-expose-delete{color:red;position:absolute;right:20px;top:10px}.code-edit{display:flex}.code-edit .edit-input{flex:1}.code-edit .edit-effect{flex:1;margin-right:10px}:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-code: rgb(255, 255, 255);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 20px 20px 10px}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .use .codemirror-div{background-color:var(--bg-code)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .box-url .box-url-box .box-div-but{padding:10px;cursor:pointer;color:var(--but-cor)}.__document .box-url .box-url-box .box-div-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{
|
|
13
|
+
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-keyword,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-section,.hljs-attr{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-type,.hljs-number,.hljs-selector-id,.hljs-quote,.hljs-template-tag{color:#b75501}.hljs-selector-class{color:#015692}.hljs-string,.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-title,.hljs-literal{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.expose .expose-label{padding:10px 0;font-size:18px}.expose .expose-return{padding:5px;background-color:azure}.set-expose .set-expose-li{position:relative}.set-expose .set-expose-li .set-expose-delete{color:red;position:absolute;right:20px;top:10px}.code-edit{display:flex}.code-edit .edit-input{flex:1}.code-edit .edit-effect{flex:1;margin-right:10px}:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-code: rgb(255, 255, 255);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{width:250px;overflow:hidden;padding:20px 20px 20px 10px}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .use .codemirror-div{background-color:var(--bg-code)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .box-url .box-url-box .box-div-but{padding:10px;cursor:pointer;color:var(--but-cor)}.__document .box-url .box-url-box .box-div-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;inset:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{box-sizing:border-box;height:100%;width:100%;position:relative;display:flex}.__document .__document-compon .__document-compon-body{padding:10px;flex:1;overflow-y:auto}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}
|
package/dist/node/index.cjs
CHANGED
|
@@ -872,17 +872,6 @@ function humpToLine(name) {
|
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
|
|
875
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
|
|
876
|
-
function appearNum(str, t) {
|
|
877
|
-
let reg = t;
|
|
878
|
-
if (typeof t == "string") {
|
|
879
|
-
reg = new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g");
|
|
880
|
-
}
|
|
881
|
-
let arr = str.match(reg);
|
|
882
|
-
let c = arr ? arr.length : 0;
|
|
883
|
-
return c;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
875
|
// node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
|
|
887
876
|
function firstLower(str) {
|
|
888
877
|
return str.slice(0, 1).toLowerCase() + str.slice(1);
|
|
@@ -980,93 +969,187 @@ function getVueTexts(content) {
|
|
|
980
969
|
};
|
|
981
970
|
}
|
|
982
971
|
|
|
972
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
|
|
973
|
+
function matchsStart2(key, matchs) {
|
|
974
|
+
if (matchs && matchs.length > 0) {
|
|
975
|
+
for (const value of matchs) {
|
|
976
|
+
if (typeof value == "string") {
|
|
977
|
+
if (key.startsWith(value)) {
|
|
978
|
+
return true;
|
|
979
|
+
}
|
|
980
|
+
} else {
|
|
981
|
+
if (value.test(key)) {
|
|
982
|
+
return true;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
return false;
|
|
987
|
+
} else {
|
|
988
|
+
return true;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
|
|
993
|
+
function matchsEnd2(key, matchs) {
|
|
994
|
+
if (matchs && matchs.length > 0) {
|
|
995
|
+
for (const value of matchs) {
|
|
996
|
+
if (typeof value == "string") {
|
|
997
|
+
if (key.endsWith(value)) {
|
|
998
|
+
return true;
|
|
999
|
+
}
|
|
1000
|
+
} else {
|
|
1001
|
+
if (value.test(key)) {
|
|
1002
|
+
return true;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
return false;
|
|
1007
|
+
} else {
|
|
1008
|
+
return true;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
983
1012
|
// packages/utils/common.ts
|
|
984
1013
|
var defaultExtensions = ["vue", "js", "ts"];
|
|
985
|
-
function getAliassNames(obj
|
|
1014
|
+
function getAliassNames(obj) {
|
|
986
1015
|
let vm = humpToLine(obj.name);
|
|
987
1016
|
let ass = [];
|
|
988
1017
|
if (obj.alias) {
|
|
989
1018
|
ass.push(obj.alias + "-" + vm);
|
|
990
1019
|
}
|
|
991
|
-
if (arr && arr.length > 0) {
|
|
992
|
-
arr.forEach((key) => {
|
|
993
|
-
if (obj.alias) {
|
|
994
|
-
ass.push(obj.alias + "-" + key + "-" + vm);
|
|
995
|
-
}
|
|
996
|
-
ass.push(key + "-" + vm);
|
|
997
|
-
});
|
|
998
|
-
}
|
|
999
1020
|
return ass;
|
|
1000
1021
|
}
|
|
1001
|
-
function
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
return b.length - a.length;
|
|
1022
|
+
function isMatchDir(url, matchs, nomatchs) {
|
|
1023
|
+
const is = matchsStart2(url, matchs);
|
|
1024
|
+
if (is && nomatchs && nomatchs.length > 0) {
|
|
1025
|
+
if (matchsStart2(url, nomatchs)) {
|
|
1026
|
+
return false;
|
|
1007
1027
|
} else {
|
|
1008
|
-
return
|
|
1028
|
+
return true;
|
|
1009
1029
|
}
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
}
|
|
1013
|
-
function getMatchs(matchexts = [], extensions = [], matchs = []) {
|
|
1014
|
-
let es = extensions;
|
|
1015
|
-
if (!es || es.length == 0) {
|
|
1016
|
-
es = defaultExtensions;
|
|
1030
|
+
} else {
|
|
1031
|
+
return is;
|
|
1017
1032
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1033
|
+
}
|
|
1034
|
+
function isMatchexts(url, matchs, nomatchs) {
|
|
1035
|
+
const is = matchsEnd2(url, matchs);
|
|
1036
|
+
if (is && nomatchs && nomatchs.length > 0) {
|
|
1037
|
+
if (matchsEnd2(url, nomatchs)) {
|
|
1038
|
+
return false;
|
|
1039
|
+
} else {
|
|
1040
|
+
return true;
|
|
1041
|
+
}
|
|
1042
|
+
} else {
|
|
1043
|
+
return is;
|
|
1021
1044
|
}
|
|
1045
|
+
}
|
|
1046
|
+
function checkSuffixBeforeMatch(str, regex) {
|
|
1047
|
+
regex.lastIndex = 0;
|
|
1048
|
+
const match = regex.exec(str);
|
|
1049
|
+
if (!match) return "";
|
|
1050
|
+
const matchStartIndex = match.index;
|
|
1051
|
+
return str.substring(0, matchStartIndex);
|
|
1052
|
+
}
|
|
1053
|
+
function createDynamicRegex(functKey) {
|
|
1054
|
+
const escapeRegExp = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1055
|
+
return new RegExp(`${escapeRegExp(functKey)}$`);
|
|
1056
|
+
}
|
|
1057
|
+
function getUrlsMatchi(key, matchs) {
|
|
1022
1058
|
if (matchs && matchs.length > 0) {
|
|
1023
|
-
matchs
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1059
|
+
for (const value of matchs) {
|
|
1060
|
+
if (typeof value == "string") {
|
|
1061
|
+
if (key.endsWith(value)) {
|
|
1062
|
+
const v = key.replace(createDynamicRegex(value), "");
|
|
1063
|
+
if (v) {
|
|
1064
|
+
const reg = new RegExp("^.*/([^/]+)$");
|
|
1065
|
+
let ms = v.match(reg);
|
|
1066
|
+
if (ms) {
|
|
1067
|
+
return ms[1];
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
} else {
|
|
1072
|
+
const v = checkSuffixBeforeMatch(key, value);
|
|
1073
|
+
if (v) {
|
|
1074
|
+
const reg = new RegExp("^.*/([^/]+)$");
|
|
1075
|
+
let ms = v.match(reg);
|
|
1076
|
+
if (ms) {
|
|
1077
|
+
return ms[1];
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1028
1082
|
}
|
|
1029
|
-
|
|
1030
|
-
return pxMatchs(pps);
|
|
1083
|
+
return "";
|
|
1031
1084
|
}
|
|
1032
|
-
function
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1085
|
+
function getComponentsObj(key, config2, tdir) {
|
|
1086
|
+
const dk = config2.dir.replace(/^\.\/|((\.\.\/)+)/, "/");
|
|
1087
|
+
let z = key.indexOf(dk);
|
|
1088
|
+
let zv = config2.dir.substring(0, config2.dir.indexOf(dk)) + key.substring(z);
|
|
1089
|
+
let value = "";
|
|
1090
|
+
if (config2.getNameValue) {
|
|
1091
|
+
value = config2.getNameValue(key, config2);
|
|
1092
|
+
} else {
|
|
1093
|
+
const ms = config2.matchextss;
|
|
1037
1094
|
if (ms) {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1095
|
+
value = getUrlsMatchi(key, [ms]);
|
|
1096
|
+
} else {
|
|
1097
|
+
value = getUrlsMatchi(key, config2.matchexts);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
if (value) {
|
|
1101
|
+
let rsobj = {
|
|
1102
|
+
suffix: getSuffix2(key),
|
|
1103
|
+
name: lineToLargeHump(value),
|
|
1104
|
+
value,
|
|
1105
|
+
adir: "",
|
|
1106
|
+
alias: config2.alias,
|
|
1107
|
+
aliasNames: [],
|
|
1108
|
+
raw: "",
|
|
1109
|
+
getRaw: null,
|
|
1110
|
+
mds: [],
|
|
1111
|
+
tests: void 0,
|
|
1112
|
+
url: zv,
|
|
1113
|
+
comprops: config2.comprops,
|
|
1114
|
+
curprops: config2.curprops,
|
|
1115
|
+
dir: config2.dir,
|
|
1116
|
+
cwd: config2.cwd,
|
|
1117
|
+
tdir,
|
|
1118
|
+
key
|
|
1119
|
+
};
|
|
1120
|
+
rsobj.aliasNames = getAliassNames(rsobj);
|
|
1121
|
+
return rsobj;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
function getUrlName(url, config2, urls, key, tdir) {
|
|
1125
|
+
if (isMatchDir(url, config2.matchs, config2.nomatchs)) {
|
|
1126
|
+
let is = false;
|
|
1127
|
+
if (config2.isMatch) {
|
|
1128
|
+
is = config2.isMatch(url, "", [], config2);
|
|
1129
|
+
} else {
|
|
1130
|
+
is = isMatchexts(url, config2.matchexts, config2.nomatchexts);
|
|
1131
|
+
}
|
|
1132
|
+
if (is) {
|
|
1133
|
+
const getUrl = config2.getMatchs;
|
|
1134
|
+
if (getUrl) {
|
|
1135
|
+
const v = getUrl(urls, "", "", config2);
|
|
1136
|
+
return getComponentsObj(v, config2, tdir);
|
|
1137
|
+
} else {
|
|
1138
|
+
const ms = config2.matchextss;
|
|
1139
|
+
if (ms) {
|
|
1140
|
+
if (typeof ms == "string") {
|
|
1141
|
+
if (url.endsWith(ms)) {
|
|
1142
|
+
return getComponentsObj(key, config2, tdir);
|
|
1143
|
+
}
|
|
1144
|
+
} else {
|
|
1145
|
+
if (ms.test(url)) {
|
|
1146
|
+
return getComponentsObj(key, config2, tdir);
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
} else {
|
|
1150
|
+
return getComponentsObj(key, config2, tdir);
|
|
1047
1151
|
}
|
|
1048
|
-
}
|
|
1049
|
-
let value = ms[1];
|
|
1050
|
-
let rsobj = {
|
|
1051
|
-
url: "",
|
|
1052
|
-
dir: "",
|
|
1053
|
-
cwd: "",
|
|
1054
|
-
suffix: getSuffix2(url),
|
|
1055
|
-
name: lineToLargeHump(value),
|
|
1056
|
-
value,
|
|
1057
|
-
key: "",
|
|
1058
|
-
tdir: "",
|
|
1059
|
-
adir,
|
|
1060
|
-
alias,
|
|
1061
|
-
aliass: aliasss,
|
|
1062
|
-
aliasNames: [],
|
|
1063
|
-
raw: "",
|
|
1064
|
-
getRaw: null,
|
|
1065
|
-
mds: [],
|
|
1066
|
-
tests: void 0
|
|
1067
|
-
};
|
|
1068
|
-
rsobj.aliasNames = getAliassNames(rsobj, aliass);
|
|
1069
|
-
return rsobj;
|
|
1152
|
+
}
|
|
1070
1153
|
}
|
|
1071
1154
|
}
|
|
1072
1155
|
return;
|
|
@@ -1081,24 +1164,41 @@ function getTDir(key) {
|
|
|
1081
1164
|
}
|
|
1082
1165
|
function isComprops(url, comprops) {
|
|
1083
1166
|
if (comprops) {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1167
|
+
for (let index = 0; index < comprops.length; index++) {
|
|
1168
|
+
const element = comprops[index];
|
|
1169
|
+
if (typeof element == "string") {
|
|
1170
|
+
if (url.includes(element)) {
|
|
1171
|
+
return true;
|
|
1172
|
+
}
|
|
1173
|
+
} else {
|
|
1174
|
+
if (element.test(url)) {
|
|
1175
|
+
return true;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1088
1179
|
}
|
|
1180
|
+
return false;
|
|
1089
1181
|
}
|
|
1090
1182
|
function isCurprops(url, comprops) {
|
|
1091
1183
|
if (comprops) {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1184
|
+
for (let index = 0; index < comprops.length; index++) {
|
|
1185
|
+
const element = comprops[index];
|
|
1186
|
+
if (typeof element == "string") {
|
|
1187
|
+
if (url.endsWith(element)) {
|
|
1188
|
+
return true;
|
|
1189
|
+
}
|
|
1190
|
+
} else {
|
|
1191
|
+
if (element.test(url)) {
|
|
1192
|
+
return true;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1096
1196
|
}
|
|
1197
|
+
return false;
|
|
1097
1198
|
}
|
|
1098
|
-
function getComponentsArr(urls, v, comRaw, com
|
|
1199
|
+
function getComponentsArr(urls, v, comRaw, com) {
|
|
1099
1200
|
const props2 = [];
|
|
1100
1201
|
const arr = [];
|
|
1101
|
-
const ppz = getMatchs(v.matchexts, v.extensions, v.matchs);
|
|
1102
1202
|
const tdir = getTDir(v.dir);
|
|
1103
1203
|
urls.forEach((key) => {
|
|
1104
1204
|
const dk = v.dir.replace(/^\.\/|((\.\.\/)+)/, "/");
|
|
@@ -1106,11 +1206,11 @@ function getComponentsArr(urls, v, comRaw, com, config2) {
|
|
|
1106
1206
|
let zv = v.dir.substring(0, v.dir.indexOf(dk)) + key.substring(z);
|
|
1107
1207
|
const reg = new RegExp("^" + v.dir);
|
|
1108
1208
|
let k = zv.replace(reg, "");
|
|
1109
|
-
if (
|
|
1209
|
+
if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
|
|
1110
1210
|
let value = {};
|
|
1111
1211
|
value.url = zv;
|
|
1112
|
-
value.comprops =
|
|
1113
|
-
value.curprops =
|
|
1212
|
+
value.comprops = v.comprops;
|
|
1213
|
+
value.curprops = v.curprops;
|
|
1114
1214
|
value.value = k;
|
|
1115
1215
|
value.dir = v.dir;
|
|
1116
1216
|
value.cwd = v.cwd;
|
|
@@ -1121,17 +1221,11 @@ function getComponentsArr(urls, v, comRaw, com, config2) {
|
|
|
1121
1221
|
value.getRaw = getRawValue(comRaw, key);
|
|
1122
1222
|
props2.push(value);
|
|
1123
1223
|
} else {
|
|
1124
|
-
let value = getUrlName(k,
|
|
1224
|
+
let value = getUrlName(k, v, urls, key, tdir);
|
|
1225
|
+
console.log("value", value);
|
|
1125
1226
|
if (value) {
|
|
1126
|
-
value.
|
|
1127
|
-
value.
|
|
1128
|
-
value.curprops = config2.curprops;
|
|
1129
|
-
value.dir = v.dir;
|
|
1130
|
-
value.cwd = v.cwd;
|
|
1131
|
-
value.tdir = tdir;
|
|
1132
|
-
value.key = key;
|
|
1133
|
-
value.component = com[key];
|
|
1134
|
-
value.getRaw = getRawValue(comRaw, key);
|
|
1227
|
+
value.component = com[value.key];
|
|
1228
|
+
value.getRaw = getRawValue(comRaw, value.key);
|
|
1135
1229
|
arr.push(value);
|
|
1136
1230
|
}
|
|
1137
1231
|
}
|
|
@@ -1649,7 +1743,6 @@ function getTextImport(jstext) {
|
|
|
1649
1743
|
// packages/utils/glob.ts
|
|
1650
1744
|
var componentsObj = {};
|
|
1651
1745
|
var componentPropsObj = {};
|
|
1652
|
-
var aliassComponentsObj = {};
|
|
1653
1746
|
var componentNameKeys = [];
|
|
1654
1747
|
var exampleObj = {};
|
|
1655
1748
|
var examplesObj = {};
|
|
@@ -1807,25 +1900,15 @@ function getAliaslevelUrl(key, obj, componentName) {
|
|
|
1807
1900
|
componentName = (componentName || "") + "";
|
|
1808
1901
|
let vm = humpToLine(obj.name);
|
|
1809
1902
|
let arr = [];
|
|
1810
|
-
const aliass = Object.values(obj.aliass || {});
|
|
1811
1903
|
if (key === "1") {
|
|
1812
1904
|
if (obj.alias) {
|
|
1813
1905
|
arr.push(obj.alias + "-" + vm);
|
|
1814
1906
|
}
|
|
1815
|
-
} else if (key === "2") {
|
|
1816
|
-
if (aliass && aliass.length > 0) {
|
|
1817
|
-
aliass.forEach((v) => {
|
|
1818
|
-
arr.push(v + "-" + vm);
|
|
1819
|
-
});
|
|
1820
|
-
}
|
|
1821
1907
|
} else if (key === "3") {
|
|
1822
1908
|
let a = "";
|
|
1823
1909
|
if (obj.alias) {
|
|
1824
1910
|
a = obj.alias + "-";
|
|
1825
1911
|
}
|
|
1826
|
-
aliass?.forEach((v) => {
|
|
1827
|
-
arr.push(a + v + "-" + vm);
|
|
1828
|
-
});
|
|
1829
1912
|
} else if (key === "4") {
|
|
1830
1913
|
obj.aliasNames?.forEach((v) => {
|
|
1831
1914
|
arr.push(humpToLine(v));
|
|
@@ -2069,8 +2152,8 @@ async function getTestImportUrl(cobj, text, type) {
|
|
|
2069
2152
|
key: ukey,
|
|
2070
2153
|
name: value,
|
|
2071
2154
|
cwd: cobj.cwd,
|
|
2072
|
-
comprops
|
|
2073
|
-
curprops
|
|
2155
|
+
comprops,
|
|
2156
|
+
curprops,
|
|
2074
2157
|
value: v,
|
|
2075
2158
|
suffix: getSuffix2(value),
|
|
2076
2159
|
head,
|
|
@@ -2098,8 +2181,8 @@ async function getTestImportUrl(cobj, text, type) {
|
|
|
2098
2181
|
key: ukey,
|
|
2099
2182
|
name: v,
|
|
2100
2183
|
cwd: cobj.cwd,
|
|
2101
|
-
comprops
|
|
2102
|
-
curprops
|
|
2184
|
+
comprops,
|
|
2185
|
+
curprops,
|
|
2103
2186
|
value: v,
|
|
2104
2187
|
suffix: getSuffix2(value),
|
|
2105
2188
|
head,
|
|
@@ -2115,8 +2198,8 @@ async function getTestImportUrl(cobj, text, type) {
|
|
|
2115
2198
|
const rv = {
|
|
2116
2199
|
key: value,
|
|
2117
2200
|
name: v,
|
|
2118
|
-
comprops
|
|
2119
|
-
curprops
|
|
2201
|
+
comprops,
|
|
2202
|
+
curprops,
|
|
2120
2203
|
value: v,
|
|
2121
2204
|
suffix: getSuffix2(value),
|
|
2122
2205
|
head,
|
|
@@ -2150,22 +2233,10 @@ function setComponentNameKeys(obj) {
|
|
|
2150
2233
|
});
|
|
2151
2234
|
}
|
|
2152
2235
|
function setComponentsObj(alias, arr) {
|
|
2153
|
-
const aliasss = {};
|
|
2154
2236
|
arr?.forEach((z) => {
|
|
2155
2237
|
componentsObj[z.key] = z;
|
|
2156
2238
|
setComponentNameKeys(z);
|
|
2157
|
-
const aliass = Object.values(z.aliass || {});
|
|
2158
|
-
if (aliass && aliass.length) {
|
|
2159
|
-
aliass.forEach((vs) => {
|
|
2160
|
-
aliasss[vs] = aliasss[vs] || [];
|
|
2161
|
-
aliasss[vs].push(z.key);
|
|
2162
|
-
});
|
|
2163
|
-
} else {
|
|
2164
|
-
aliasss[defaultName] = aliasss[defaultName] || [];
|
|
2165
|
-
aliasss[defaultName].push(z.key);
|
|
2166
|
-
}
|
|
2167
2239
|
});
|
|
2168
|
-
aliassComponentsObj[alias] = aliasss;
|
|
2169
2240
|
}
|
|
2170
2241
|
function setForComponentsValue(v) {
|
|
2171
2242
|
let alias;
|
|
@@ -2180,7 +2251,7 @@ function setForComponentsValue(v) {
|
|
|
2180
2251
|
}
|
|
2181
2252
|
alias = v.alias || defaultName;
|
|
2182
2253
|
let urls = v?.urls || Object.keys(v.componentsRaw);
|
|
2183
|
-
obj = getComponentsArr(urls, v, v.componentsRaw, v.components
|
|
2254
|
+
obj = getComponentsArr(urls, v, v.componentsRaw, v.components);
|
|
2184
2255
|
if (obj && obj?.props) {
|
|
2185
2256
|
obj.props.forEach((z) => {
|
|
2186
2257
|
componentPropsObj[z.url] = z;
|
|
@@ -2199,7 +2270,7 @@ async function getPropsImport(text, obj) {
|
|
|
2199
2270
|
let ts = text;
|
|
2200
2271
|
if (text) {
|
|
2201
2272
|
let arr = (await getTestImportUrl(obj, text)).filter((v) => {
|
|
2202
|
-
return isComprops(v.key, obj.comprops
|
|
2273
|
+
return isComprops(v.key, obj.comprops) || isCurprops(v.key, obj.curprops);
|
|
2203
2274
|
});
|
|
2204
2275
|
ts = await getPropsTexts(arr) + ts;
|
|
2205
2276
|
}
|
|
@@ -2248,7 +2319,7 @@ async function getComponentsProps(text, obj) {
|
|
|
2248
2319
|
if (text) {
|
|
2249
2320
|
if (obj.comprops || obj.curprops) {
|
|
2250
2321
|
let arr = (await getTestImportUrl(obj, text)).filter((v) => {
|
|
2251
|
-
return isComprops(v.key, obj.comprops
|
|
2322
|
+
return isComprops(v.key, obj.comprops) || isCurprops(v.key, obj.curprops);
|
|
2252
2323
|
});
|
|
2253
2324
|
let str = await getPropsTexts(arr);
|
|
2254
2325
|
ts = str + ts;
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
import { AsyncComponentLoader } from 'vue';
|
|
2
2
|
|
|
3
|
-
interface ObjStr {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
}
|
|
6
3
|
type GetRaw = (v: any) => Promise<unknown>;
|
|
7
4
|
type Globs = Record<string, GetRaw> | GetRaw;
|
|
8
5
|
interface GlobComs {
|
|
9
6
|
[key: string]: AsyncComponentLoader;
|
|
10
7
|
}
|
|
8
|
+
type FangMatch = string | RegExp;
|
|
11
9
|
interface Component {
|
|
12
10
|
dir: string;
|
|
13
11
|
cwd?: string;
|
|
14
12
|
extensions?: Array<string>;
|
|
15
13
|
alias?: string;
|
|
16
|
-
|
|
17
|
-
matchs?: Array<
|
|
18
|
-
matchexts?: Array<
|
|
14
|
+
getAliass?: (naem: string, type: string, config: Component) => string[];
|
|
15
|
+
matchs?: Array<FangMatch>;
|
|
16
|
+
matchexts?: Array<FangMatch>;
|
|
17
|
+
/**
|
|
18
|
+
* 不匹配目录数组
|
|
19
|
+
* 从头开始匹配
|
|
20
|
+
*/
|
|
21
|
+
nomatchs?: Array<FangMatch>;
|
|
22
|
+
/**
|
|
23
|
+
* 不匹配文件路径
|
|
24
|
+
* 从尾部开始匹配
|
|
25
|
+
*/
|
|
26
|
+
nomatchexts?: Array<FangMatch>;
|
|
27
|
+
matchextss?: FangMatch;
|
|
28
|
+
/**
|
|
29
|
+
* 获取匹配数组
|
|
30
|
+
*/
|
|
31
|
+
isMatch?(url: string, naem: string, names?: Array<string>, config?: Component): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 多个时获取那个
|
|
34
|
+
*/
|
|
35
|
+
getMatchs?(urls: Array<string>, name: string, type: string, config?: Component): string;
|
|
36
|
+
getNameValue?: (url: string, config?: Component) => string;
|
|
19
37
|
directives?: string;
|
|
20
38
|
urls?: Array<string>;
|
|
21
39
|
dirUrls?: Array<string>;
|
|
@@ -23,8 +41,8 @@ interface Component {
|
|
|
23
41
|
interface Components extends Component {
|
|
24
42
|
resolver?: Component;
|
|
25
43
|
urls?: string[];
|
|
26
|
-
comprops?:
|
|
27
|
-
curprops?:
|
|
44
|
+
comprops?: Array<FangMatch>;
|
|
45
|
+
curprops?: Array<FangMatch>;
|
|
28
46
|
components: GlobComs;
|
|
29
47
|
componentsRaw: Globs;
|
|
30
48
|
example?: ExampleObj;
|
|
@@ -111,8 +129,8 @@ interface ComponentsObj extends Component, TextObj {
|
|
|
111
129
|
adir: string;
|
|
112
130
|
aliasNames: Array<string>;
|
|
113
131
|
component?: AsyncComponentLoader;
|
|
114
|
-
|
|
115
|
-
|
|
132
|
+
comprops?: Array<FangMatch>;
|
|
133
|
+
curprops?: Array<FangMatch>;
|
|
116
134
|
tests: {
|
|
117
135
|
[key: string]: TestsObj;
|
|
118
136
|
} | undefined;
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
import { AsyncComponentLoader } from 'vue';
|
|
2
2
|
|
|
3
|
-
interface ObjStr {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
}
|
|
6
3
|
type GetRaw = (v: any) => Promise<unknown>;
|
|
7
4
|
type Globs = Record<string, GetRaw> | GetRaw;
|
|
8
5
|
interface GlobComs {
|
|
9
6
|
[key: string]: AsyncComponentLoader;
|
|
10
7
|
}
|
|
8
|
+
type FangMatch = string | RegExp;
|
|
11
9
|
interface Component {
|
|
12
10
|
dir: string;
|
|
13
11
|
cwd?: string;
|
|
14
12
|
extensions?: Array<string>;
|
|
15
13
|
alias?: string;
|
|
16
|
-
|
|
17
|
-
matchs?: Array<
|
|
18
|
-
matchexts?: Array<
|
|
14
|
+
getAliass?: (naem: string, type: string, config: Component) => string[];
|
|
15
|
+
matchs?: Array<FangMatch>;
|
|
16
|
+
matchexts?: Array<FangMatch>;
|
|
17
|
+
/**
|
|
18
|
+
* 不匹配目录数组
|
|
19
|
+
* 从头开始匹配
|
|
20
|
+
*/
|
|
21
|
+
nomatchs?: Array<FangMatch>;
|
|
22
|
+
/**
|
|
23
|
+
* 不匹配文件路径
|
|
24
|
+
* 从尾部开始匹配
|
|
25
|
+
*/
|
|
26
|
+
nomatchexts?: Array<FangMatch>;
|
|
27
|
+
matchextss?: FangMatch;
|
|
28
|
+
/**
|
|
29
|
+
* 获取匹配数组
|
|
30
|
+
*/
|
|
31
|
+
isMatch?(url: string, naem: string, names?: Array<string>, config?: Component): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 多个时获取那个
|
|
34
|
+
*/
|
|
35
|
+
getMatchs?(urls: Array<string>, name: string, type: string, config?: Component): string;
|
|
36
|
+
getNameValue?: (url: string, config?: Component) => string;
|
|
19
37
|
directives?: string;
|
|
20
38
|
urls?: Array<string>;
|
|
21
39
|
dirUrls?: Array<string>;
|
|
@@ -23,8 +41,8 @@ interface Component {
|
|
|
23
41
|
interface Components extends Component {
|
|
24
42
|
resolver?: Component;
|
|
25
43
|
urls?: string[];
|
|
26
|
-
comprops?:
|
|
27
|
-
curprops?:
|
|
44
|
+
comprops?: Array<FangMatch>;
|
|
45
|
+
curprops?: Array<FangMatch>;
|
|
28
46
|
components: GlobComs;
|
|
29
47
|
componentsRaw: Globs;
|
|
30
48
|
example?: ExampleObj;
|
|
@@ -111,8 +129,8 @@ interface ComponentsObj extends Component, TextObj {
|
|
|
111
129
|
adir: string;
|
|
112
130
|
aliasNames: Array<string>;
|
|
113
131
|
component?: AsyncComponentLoader;
|
|
114
|
-
|
|
115
|
-
|
|
132
|
+
comprops?: Array<FangMatch>;
|
|
133
|
+
curprops?: Array<FangMatch>;
|
|
116
134
|
tests: {
|
|
117
135
|
[key: string]: TestsObj;
|
|
118
136
|
} | undefined;
|