@fangzhongya/vue-archive 0.0.55 → 0.0.57

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.
Files changed (51) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/packages/components/choice/index.vue.cjs +1 -1
  3. package/dist/packages/components/choice/index.vue.js +52 -38
  4. package/dist/packages/components/code/highlight.vue.cjs +1 -1
  5. package/dist/packages/components/code/index.vue.cjs +1 -1
  6. package/dist/packages/components/compo/code.vue.cjs +1 -0
  7. package/dist/packages/components/compo/code.vue.js +21 -0
  8. package/dist/packages/components/compo/code.vue3.cjs +1 -0
  9. package/dist/packages/components/compo/code.vue3.js +5 -0
  10. package/dist/packages/components/main/index.vue.cjs +1 -1
  11. package/dist/packages/components/main/index.vue.js +36 -32
  12. package/dist/packages/components/test/index.vue.cjs +1 -1
  13. package/dist/packages/components/use/code.vue.cjs +1 -0
  14. package/dist/packages/components/use/code.vue.js +66 -0
  15. package/dist/packages/components/use/code.vue2.cjs +1 -0
  16. package/dist/packages/components/use/code.vue2.js +4 -0
  17. package/dist/packages/components/use/edit.cjs +18 -0
  18. package/dist/packages/components/use/edit.d.ts +32 -0
  19. package/dist/packages/components/use/edit.js +187 -0
  20. package/dist/packages/components/use/effect.d.ts +18 -0
  21. package/dist/packages/components/use/effect.vue.cjs +1 -0
  22. package/dist/packages/components/use/effect.vue.js +12 -0
  23. package/dist/packages/components/use/retrie/array/index.vue.cjs +1 -1
  24. package/dist/packages/components/use/retrie/boolean/index.vue.cjs +1 -1
  25. package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -1
  26. package/dist/packages/components/use/retrie/index.d.ts +1 -1
  27. package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
  28. package/dist/packages/components/use/retrie/input/text.vue.cjs +1 -1
  29. package/dist/packages/components/use/retrie/object/index.vue.cjs +1 -1
  30. package/dist/packages/components/use/retrie/other/index.vue.cjs +1 -1
  31. package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
  32. package/dist/packages/components/use/set-code.vue.cjs +1 -1
  33. package/dist/packages/components/use/set-code.vue.js +17 -58
  34. package/dist/packages/page/compon/index.vue2.cjs +1 -1
  35. package/dist/packages/page/compon/index.vue2.js +7 -7
  36. package/dist/packages/page/develop/index.vue2.cjs +1 -1
  37. package/dist/packages/page/develop/index.vue2.js +4 -4
  38. package/dist/packages/page/edit/index.vue.cjs +1 -0
  39. package/dist/packages/page/edit/index.vue.js +4 -0
  40. package/dist/packages/page/edit/index.vue2.cjs +1 -0
  41. package/dist/packages/page/edit/index.vue2.js +23 -0
  42. package/dist/packages/page/single/index.vue2.cjs +1 -1
  43. package/dist/packages/page/single/index.vue2.js +12 -12
  44. package/dist/packages/page/tests/index.vue2.cjs +1 -1
  45. package/dist/packages/page/tests/index.vue2.js +7 -7
  46. package/dist/packages/router/file.cjs +1 -1
  47. package/dist/packages/router/file.js +5 -4
  48. package/dist/packages/router/index.cjs +1 -1
  49. package/dist/packages/router/index.d.ts +1 -0
  50. package/dist/packages/router/index.js +55 -45
  51. package/package.json +1 -1
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}: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{width:250px;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{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;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)}
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{width:250px;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{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;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)}
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),_=require("./choice.vue.cjs"),p=require("../../utils/glob.cjs"),h=require("../../utils/common.cjs"),g=require("vue-router"),k=require("../../router/index.cjs"),y={class:"__document-compon"},f={key:0,class:"__document-compon-choice"},B={key:0},q={key:1},C={key:2},E=e.defineComponent({__name:"index",props:{getName:{type:Function,default(l){return l.id}},getKey:{type:Function,default(l){return l.key}}},emits:["change"],setup(l,{emit:v}){const r=l,u=g.useRoute(),m=k.getPageParams(u),t=e.ref(),n=e.ref([]),c=e.ref(!1),a=v;e.watch(()=>u.query.id,()=>{s()});function s(){let o=p.getCompoName(r.getName(u.query),!0,r.getKey(m))||[];n.value=[],o.length==1?(t.value=o[0],a("change",t.value)):o.length==0?(t.value=void 0,a("change",t.value)):(c.value=!0,n.value=o)}function d(o){c.value=!1,t.value=o,a("change",t.value),h.setAsideKey(o.key)}return s(),(o,i)=>(e.openBlock(),e.createElementBlock("div",y,[n.value.length?(e.openBlock(),e.createElementBlock("div",f,[c.value?(e.openBlock(),e.createBlock(_,{key:0,onChange:d,value:n.value,choice:t.value},null,8,["value","choice"])):e.createCommentVNode("",!0),e.createElementVNode("div",{onClick:i[0]||(i[0]=N=>c.value=!c.value),class:"__document-compon-choice-but"},e.toDisplayString(c.value?"展开":"隐藏"),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["__document-compon-body",{choice:n.value.length}])},[t.value?.key?(e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(o.$slots,"default",{value:t.value})])):n.value.length?(e.openBlock(),e.createElementBlock("div",q," 请先选择要查看的组件 ")):(e.openBlock(),e.createElementBlock("div",C," 没有查询到"+e.toDisplayString(e.unref(u).query.id)+"组件 ",1))],2)]))}});module.exports=E;
1
+ "use strict";const e=require("vue"),d=require("@fangzhongya/utils/name/humpToLine"),g=require("./choice.vue.cjs"),k=require("../../utils/glob.cjs"),y=require("../../utils/common.cjs"),f=require("vue-router"),B=require("../../router/index.cjs"),q={class:"__document-compon"},C={key:0,class:"__document-compon-choice"},N={key:0},E={key:1},b={key:2},x=e.defineComponent({__name:"index",props:{getName:{type:Function,default(u){return u.id}},getKey:{type:Function,default(u){return u.key}}},emits:["change"],setup(u,{emit:p}){const s=u,a=f.useRoute(),_=B.getPageParams(a),t=e.ref(),n=e.ref([]),c=e.ref(!1),i=p;e.watch(()=>a.query.id,()=>{m()});function m(){let l=d.humpToLine(s.getName(a.query)),o=k.getCompoName(s.getName(a.query),!0,s.getKey(_))||[];if(n.value=[],o.length==1)t.value=o[0],i("change",t.value);else if(o.length==0)t.value=void 0,i("change",t.value);else{c.value=!0,n.value=o;for(let r=0;r<o.length;r++){const v=o[r];if(l===d.humpToLine(v.name)){t.value=v;break}}}}function h(l){c.value=!1,t.value=l,i("change",t.value),y.setAsideKey(l.key)}return m(),(l,o)=>(e.openBlock(),e.createElementBlock("div",q,[n.value.length?(e.openBlock(),e.createElementBlock("div",C,[c.value?(e.openBlock(),e.createBlock(g,{key:0,onChange:h,value:n.value,choice:t.value},null,8,["value","choice"])):e.createCommentVNode("",!0),e.createElementVNode("div",{onClick:o[0]||(o[0]=r=>c.value=!c.value),class:"__document-compon-choice-but"},e.toDisplayString(c.value?"展开":"隐藏"),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["__document-compon-body",{choice:n.value.length}])},[t.value?.key?(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(l.$slots,"default",{value:t.value})])):n.value.length?(e.openBlock(),e.createElementBlock("div",E,"请先选择要查看的组件")):(e.openBlock(),e.createElementBlock("div",b,"没有查询到"+e.toDisplayString(e.unref(a).query.id)+"组件",1))],2)]))}});module.exports=x;
@@ -1,73 +1,87 @@
1
- import { defineComponent as y, ref as s, watch as k, createElementBlock as l, openBlock as a, createCommentVNode as d, createElementVNode as p, createBlock as C, toDisplayString as _, normalizeClass as N, renderSlot as q, unref as B } from "vue";
2
- import K from "./choice.vue.js";
3
- import { getCompoName as $ } from "../../utils/glob.js";
4
- import { setAsideKey as b } from "../../utils/common.js";
5
- import { useRoute as x } from "vue-router";
6
- import { getPageParams as D } from "../../router/index.js";
7
- const E = { class: "__document-compon" }, F = {
1
+ import { defineComponent as N, ref as v, watch as q, createElementBlock as i, openBlock as l, createCommentVNode as f, createElementVNode as h, createBlock as b, toDisplayString as _, normalizeClass as x, renderSlot as B, unref as K } from "vue";
2
+ import { humpToLine as g } from "@fangzhongya/utils/name/humpToLine";
3
+ import $ from "./choice.vue.js";
4
+ import { getCompoName as D } from "../../utils/glob.js";
5
+ import { setAsideKey as E } from "../../utils/common.js";
6
+ import { useRoute as F } from "vue-router";
7
+ import { getPageParams as P } from "../../router/index.js";
8
+ const S = { class: "__document-compon" }, V = {
8
9
  key: 0,
9
10
  class: "__document-compon-choice"
10
- }, P = { key: 0 }, S = { key: 1 }, V = { key: 2 }, I = /* @__PURE__ */ y({
11
+ }, w = { key: 0 }, z = { key: 1 }, A = { key: 2 }, J = /* @__PURE__ */ N({
11
12
  __name: "index",
12
13
  props: {
13
14
  getName: {
14
15
  type: Function,
15
- default(c) {
16
- return c.id;
16
+ default(u) {
17
+ return u.id;
17
18
  }
18
19
  },
19
20
  getKey: {
20
21
  type: Function,
21
- default(c) {
22
- return c.key;
22
+ default(u) {
23
+ return u.key;
23
24
  }
24
25
  }
25
26
  },
26
27
  emits: ["change"],
27
- setup(c, { emit: h }) {
28
- const r = c, u = x(), f = D(u), e = s(), o = s([]), n = s(!1), i = h;
29
- k(
30
- () => u.query.id,
28
+ setup(u, { emit: y }) {
29
+ const s = u, c = F(), k = P(c), e = v(), o = v([]), n = v(!1), m = y;
30
+ q(
31
+ () => c.query.id,
31
32
  () => {
32
- m();
33
+ d();
33
34
  }
34
35
  );
35
- function m() {
36
- let t = $(
37
- r.getName(u.query),
36
+ function d() {
37
+ let a = g(s.getName(c.query)), t = D(
38
+ s.getName(c.query),
38
39
  !0,
39
- r.getKey(f)
40
+ s.getKey(k)
40
41
  ) || [];
41
- o.value = [], t.length == 1 ? (e.value = t[0], i("change", e.value)) : t.length == 0 ? (e.value = void 0, i("change", e.value)) : (n.value = !0, o.value = t);
42
+ if (o.value = [], t.length == 1)
43
+ e.value = t[0], m("change", e.value);
44
+ else if (t.length == 0)
45
+ e.value = void 0, m("change", e.value);
46
+ else {
47
+ n.value = !0, o.value = t;
48
+ for (let r = 0; r < t.length; r++) {
49
+ const p = t[r];
50
+ if (a === g(p.name)) {
51
+ e.value = p;
52
+ break;
53
+ }
54
+ }
55
+ }
42
56
  }
43
- function g(t) {
44
- n.value = !1, e.value = t, i("change", e.value), b(t.key);
57
+ function C(a) {
58
+ n.value = !1, e.value = a, m("change", e.value), E(a.key);
45
59
  }
46
- return m(), (t, v) => (a(), l("div", E, [
47
- o.value.length ? (a(), l("div", F, [
48
- n.value ? (a(), C(K, {
60
+ return d(), (a, t) => (l(), i("div", S, [
61
+ o.value.length ? (l(), i("div", V, [
62
+ n.value ? (l(), b($, {
49
63
  key: 0,
50
- onChange: g,
64
+ onChange: C,
51
65
  value: o.value,
52
66
  choice: e.value
53
- }, null, 8, ["value", "choice"])) : d("", !0),
54
- p("div", {
55
- onClick: v[0] || (v[0] = (w) => n.value = !n.value),
67
+ }, null, 8, ["value", "choice"])) : f("", !0),
68
+ h("div", {
69
+ onClick: t[0] || (t[0] = (r) => n.value = !n.value),
56
70
  class: "__document-compon-choice-but"
57
71
  }, _(n.value ? "展开" : "隐藏"), 1)
58
- ])) : d("", !0),
59
- p("div", {
60
- class: N(["__document-compon-body", {
72
+ ])) : f("", !0),
73
+ h("div", {
74
+ class: x(["__document-compon-body", {
61
75
  choice: o.value.length
62
76
  }])
63
77
  }, [
64
- e.value?.key ? (a(), l("div", P, [
65
- q(t.$slots, "default", { value: e.value })
66
- ])) : o.value.length ? (a(), l("div", S, " 请先选择要查看的组件 ")) : (a(), l("div", V, " 没有查询到" + _(B(u).query.id) + "组件 ", 1))
78
+ e.value?.key ? (l(), i("div", w, [
79
+ B(a.$slots, "default", { value: e.value })
80
+ ])) : o.value.length ? (l(), i("div", z, "请先选择要查看的组件")) : (l(), i("div", A, "没有查询到" + _(K(c).query.id) + "组件", 1))
67
81
  ], 2)
68
82
  ]));
69
83
  }
70
84
  });
71
85
  export {
72
- I as default
86
+ J as default
73
87
  };
@@ -1 +1 @@
1
- "use strict";const n=require("./highlight.vue2.cjs"),e=require("vue"),r=require("../../../_virtual/_plugin-vue_export-helper.cjs");function c(o,g,i,l,u,h){const t=e.resolveComponent("highlightjs");return o.code?(e.openBlock(),e.createBlock(t,{key:0,class:"highlightjs",language:o.language,code:o.code},null,8,["language","code"])):e.createCommentVNode("",!0)}const s=r(n,[["render",c]]);module.exports=s;
1
+ "use strict";const n=require("./highlight.vue2.cjs"),e=require("vue"),r=require("../../../_virtual/_plugin-vue_export-helper.cjs");function s(o,g,i,l,u,h){const t=e.resolveComponent("highlightjs");return o.code?(e.openBlock(),e.createBlock(t,{key:0,class:"highlightjs",language:o.language,code:o.code},null,8,["language","code"])):e.createCommentVNode("",!0)}const c=r(n,[["render",s]]);module.exports=c;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),u=require("../boxurl/index.vue.cjs"),x=require("../../router/index.cjs"),w=require("./highlight.vue.cjs"),v=require("../../utils/index.cjs"),d=require("../../utils/glob.cjs"),f=require("../../utils/util.cjs"),_=require("@fangzhongya/utils/urls/getUrlCatalogueObj"),b=require("vue-router"),y={class:"code"},E={class:"code-top"},N={class:"code-top-but"},V={class:"top-but-files"},q=["onClick"],S={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(p){const g=b.useRouter(),t=p;e.watch(()=>t.text,()=>{s()});const c=e.ref([]),o=e.ref(),a=e.ref(!1);function k(){o.value?.raw?v.copyCode(o.value.raw):v.copyCode(t.text)}function h(){if(o.value?.raw){const l=_.getUrlCatalogueObj(o.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(o.value.raw,n)}else{const l=_.getUrlCatalogueObj(t.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(t.text,n)}}function m(){a.value=!a.value}function C(){x.toSingle(g,t.value)}function r(l){a.value=!0,o.value=l}function s(){o.value=void 0,a.value=!1,t.text&&d.getTestImportUrl(t.value,t.text,"vue").then(l=>{d.getLocalTextArr(l).then(n=>{c.value=n.filter(i=>i.raw)})})}return s(),(l,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",{class:"but-div",onClick:C},"go"),e.createElementVNode("div",{class:"but-div",onClick:k},"复制"),e.createElementVNode("div",{class:"but-div",onClick:h},"下载"),e.createElementVNode("div",{class:"but-div",onClick:m},e.toDisplayString(a.value?"隐藏":"显示"),1),e.createElementVNode("div",V,[e.createVNode(u,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:n[0]||(n[0]=e.withModifiers(i=>r(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(i,j)=>(e.openBlock(),e.createBlock(u,{value:i},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:i.key==o.value?.key}]),onClick:e.withModifiers(D=>r(i),["stop"])},e.toDisplayString(i.value),11,q)]),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",S,[e.createVNode(w,{language:"html",code:o.value?.raw||t.text},null,8,["code"])],512),[[e.vShow,a.value]])]))}});module.exports=B;
1
+ "use strict";const e=require("vue"),u=require("../boxurl/index.vue.cjs"),x=require("../../router/index.cjs"),w=require("./highlight.vue.cjs"),v=require("../../utils/index.cjs"),d=require("../../utils/glob.cjs"),f=require("../../utils/util.cjs"),_=require("@fangzhongya/utils/urls/getUrlCatalogueObj"),b=require("vue-router"),y={class:"code"},E={class:"code-top"},N={class:"code-top-but"},V={class:"top-but-files"},q=["onClick"],S={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(p){const g=b.useRouter(),t=p;e.watch(()=>t.text,()=>{r()});const c=e.ref([]),o=e.ref(),a=e.ref(!1);function k(){o.value?.raw?v.copyCode(o.value.raw):v.copyCode(t.text)}function h(){if(o.value?.raw){const l=_.getUrlCatalogueObj(o.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(o.value.raw,n)}else{const l=_.getUrlCatalogueObj(t.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(t.text,n)}}function m(){a.value=!a.value}function C(){x.toSingle(g,t.value)}function s(l){a.value=!0,o.value=l}function r(){o.value=void 0,a.value=!1,t.text&&d.getTestImportUrl(t.value,t.text,"vue").then(l=>{d.getLocalTextArr(l).then(n=>{c.value=n.filter(i=>i.raw)})})}return r(),(l,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",{class:"but-div",onClick:C},"go"),e.createElementVNode("div",{class:"but-div",onClick:k},"复制"),e.createElementVNode("div",{class:"but-div",onClick:h},"下载"),e.createElementVNode("div",{class:"but-div",onClick:m},e.toDisplayString(a.value?"隐藏":"显示"),1),e.createElementVNode("div",V,[e.createVNode(u,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:n[0]||(n[0]=e.withModifiers(i=>s(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(i,j)=>(e.openBlock(),e.createBlock(u,{value:i},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:i.key==o.value?.key}]),onClick:e.withModifiers(D=>s(i),["stop"])},e.toDisplayString(i.value),11,q)]),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",S,[e.createVNode(w,{language:"html",code:o.value?.raw||t.text},null,8,["code"])],512),[[e.vShow,a.value]])]))}});module.exports=B;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),o=require("../use/edit.cjs"),n={class:"compo-code"},s=e.defineComponent({__name:"code",props:{value:{type:Object}},setup(t){const c=t;return(r,u)=>(e.openBlock(),e.createElementBlock("div",n,[e.createVNode(e.unref(o),{value:c.value},null,8,["value"])]))}});module.exports=s;
@@ -0,0 +1,21 @@
1
+ import { defineComponent as t, createElementBlock as c, openBlock as n, createVNode as r, unref as a } from "vue";
2
+ import p from "../use/edit.js";
3
+ const l = { class: "compo-code" }, _ = /* @__PURE__ */ t({
4
+ __name: "code",
5
+ props: {
6
+ value: {
7
+ type: Object
8
+ }
9
+ },
10
+ setup(e) {
11
+ const o = e;
12
+ return (s, u) => (n(), c("div", l, [
13
+ r(a(p), {
14
+ value: o.value
15
+ }, null, 8, ["value"])
16
+ ]));
17
+ }
18
+ });
19
+ export {
20
+ _ as default
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./code.vue.cjs");;/* empty css */module.exports=e;
@@ -0,0 +1,5 @@
1
+ import o from "./code.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),_=require("../compo/index.vue.cjs"),d=require("../compo/info.vue.cjs"),p=require("../compo/info-top.vue.cjs"),m=require("../test/index.vue.cjs"),N=require("../../utils/glob.cjs"),f={class:"main"},V={class:"main-top"},E={class:"main-compo-top"},k={class:"main-but"},g={class:"main-test"},q={class:"main-compo"},b=e.defineComponent({__name:"index",props:{value:Object},setup(l){const u=v.useRouter(),t=l,c=e.ref([]);e.watch(()=>t.value,()=>{a()});function a(){c.value=N.getTestName(t.value?.key)}a();function i(o){o==1?r.toCompon(u,t.value):o==2?r.toTests(u,t.value):o==3&&r.toDevelop(u,t.value)}return(o,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",V,[e.createVNode(d,{value:l.value},null,8,["value"])]),e.createElementVNode("div",E,[e.createVNode(p,{value:l.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",{class:"but-div",onClick:n[0]||(n[0]=s=>i(1))},"当前"),e.createElementVNode("div",{class:"but-div",onClick:n[1]||(n[1]=s=>i(2))},"更多"),e.createElementVNode("div",{class:"but-div",onClick:n[2]||(n[2]=s=>i(3))},"开发")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(m,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",q,[e.createVNode(_,{istop:!1,value:t.value},null,8,["value"])])]))}});module.exports=b;
1
+ "use strict";const e=require("vue"),v=require("vue-router"),i=require("../../router/index.cjs"),d=require("../compo/index.vue.cjs"),_=require("../compo/info.vue.cjs"),p=require("../compo/info-top.vue.cjs"),m=require("../test/index.vue.cjs"),N=require("../../utils/glob.cjs"),f={class:"main"},E={class:"main-top"},V={class:"main-compo-top"},k={class:"main-but"},g={class:"main-test"},q={class:"main-compo"},b=e.defineComponent({__name:"index",props:{value:Object},setup(r){const l=v.useRouter(),n=r,a=e.ref([]);e.watch(()=>n.value,()=>{c()});function c(){a.value=N.getTestName(n.value?.key)}c();function u(o){o==1?i.toCompon(l,n.value):o==2?i.toTests(l,n.value):o==3?i.toDevelop(l,n.value):o==4&&i.toEdit(l,n.value)}return(o,t)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",E,[e.createVNode(_,{value:r.value},null,8,["value"])]),e.createElementVNode("div",V,[e.createVNode(p,{value:r.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",{class:"but-div",onClick:t[0]||(t[0]=s=>u(1))},"当前"),e.createElementVNode("div",{class:"but-div",onClick:t[1]||(t[1]=s=>u(2))},"更多"),e.createElementVNode("div",{class:"but-div",onClick:t[2]||(t[2]=s=>u(3))},"开发"),e.createElementVNode("div",{class:"but-div",onClick:t[3]||(t[3]=s=>u(4))},"编辑")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,s=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(m,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",q,[e.createVNode(d,{istop:!1,value:n.value},null,8,["value"])])]))}});module.exports=b;
@@ -1,64 +1,68 @@
1
- import { defineComponent as d, ref as f, watch as p, createElementBlock as m, openBlock as v, createElementVNode as e, createVNode as n, Fragment as _, renderList as $ } from "vue";
1
+ import { defineComponent as d, ref as f, watch as p, createElementBlock as v, openBlock as m, createElementVNode as t, createVNode as a, Fragment as _, renderList as $ } from "vue";
2
2
  import { useRouter as C } from "vue-router";
3
- import { toCompon as b, toTests as k, toDevelop as g } from "../../router/index.js";
4
- import x from "../compo/index.vue.js";
3
+ import { toCompon as b, toTests as k, toDevelop as g, toEdit as x } from "../../router/index.js";
4
+ import E from "../compo/index.vue.js";
5
5
  import N from "../compo/info.vue.js";
6
- import h from "../compo/info-top.vue.js";
7
- import B from "../test/index.vue.js";
8
- import { getTestName as E } from "../../utils/glob.js";
9
- const T = { class: "main" }, V = { class: "main-top" }, j = { class: "main-compo-top" }, w = { class: "main-but" }, D = { class: "main-test" }, F = { class: "main-compo" }, I = /* @__PURE__ */ d({
6
+ import B from "../compo/info-top.vue.js";
7
+ import T from "../test/index.vue.js";
8
+ import { getTestName as V } from "../../utils/glob.js";
9
+ const j = { class: "main" }, w = { class: "main-top" }, D = { class: "main-compo-top" }, F = { class: "main-but" }, L = { class: "main-test" }, O = { class: "main-compo" }, J = /* @__PURE__ */ d({
10
10
  __name: "index",
11
11
  props: {
12
12
  value: Object
13
13
  },
14
- setup(i) {
15
- const a = C(), t = i, r = f([]);
14
+ setup(u) {
15
+ const l = C(), o = u, r = f([]);
16
16
  p(
17
- () => t.value,
17
+ () => o.value,
18
18
  () => {
19
19
  c();
20
20
  }
21
21
  );
22
22
  function c() {
23
- r.value = E(t.value?.key);
23
+ r.value = V(o.value?.key);
24
24
  }
25
25
  c();
26
- function u(s) {
27
- s == 1 ? b(a, t.value) : s == 2 ? k(a, t.value) : s == 3 && g(a, t.value);
26
+ function n(s) {
27
+ s == 1 ? b(l, o.value) : s == 2 ? k(l, o.value) : s == 3 ? g(l, o.value) : s == 4 && x(l, o.value);
28
28
  }
29
- return (s, o) => (v(), m("div", T, [
30
- e("div", V, [
31
- n(N, { value: i.value }, null, 8, ["value"])
29
+ return (s, e) => (m(), v("div", j, [
30
+ t("div", w, [
31
+ a(N, { value: u.value }, null, 8, ["value"])
32
32
  ]),
33
- e("div", j, [
34
- n(h, { value: i.value }, null, 8, ["value"])
33
+ t("div", D, [
34
+ a(B, { value: u.value }, null, 8, ["value"])
35
35
  ]),
36
- e("div", w, [
37
- e("div", {
36
+ t("div", F, [
37
+ t("div", {
38
38
  class: "but-div",
39
- onClick: o[0] || (o[0] = (l) => u(1))
39
+ onClick: e[0] || (e[0] = (i) => n(1))
40
40
  }, "当前"),
41
- e("div", {
41
+ t("div", {
42
42
  class: "but-div",
43
- onClick: o[1] || (o[1] = (l) => u(2))
43
+ onClick: e[1] || (e[1] = (i) => n(2))
44
44
  }, "更多"),
45
- e("div", {
45
+ t("div", {
46
46
  class: "but-div",
47
- onClick: o[2] || (o[2] = (l) => u(3))
48
- }, "开发")
47
+ onClick: e[2] || (e[2] = (i) => n(3))
48
+ }, "开发"),
49
+ t("div", {
50
+ class: "but-div",
51
+ onClick: e[3] || (e[3] = (i) => n(4))
52
+ }, "编辑")
49
53
  ]),
50
- (v(!0), m(_, null, $(r.value, (l) => (v(), m("div", D, [
51
- n(B, { value: l }, null, 8, ["value"])
54
+ (m(!0), v(_, null, $(r.value, (i) => (m(), v("div", L, [
55
+ a(T, { value: i }, null, 8, ["value"])
52
56
  ]))), 256)),
53
- e("div", F, [
54
- n(x, {
57
+ t("div", O, [
58
+ a(E, {
55
59
  istop: !1,
56
- value: t.value
60
+ value: o.value
57
61
  }, null, 8, ["value"])
58
62
  ])
59
63
  ]));
60
64
  }
61
65
  });
62
66
  export {
63
- I as default
67
+ J as default
64
68
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),p=require("../boxurl/index.vue.cjs"),m=require("./top.cjs"),f=require("../code/index.vue.cjs"),x=require("./index.cjs"),y=require("../../utils/glob.cjs"),N={class:"md-top-name"},h={class:"test-top"},k={class:"test-div"},V={class:"test-body"},g={key:0,class:"test-code"},B=e.defineComponent({__name:"index",props:{value:Object,read:{type:Boolean,default:!0}},emits:["state"],setup(i,{emit:d}){const t=i,v=d,o=e.ref(""),c=e.ref([]),s=e.ref("1");e.watch([()=>t.value,()=>t.read],()=>{r()});let u;function r(){t.read&&t.value?.key&&y.getLocalTextTests(t.value).then(l=>{o.value=l;let{titles:a,states:_}=x.getNotes(l);c.value=a;const n=_[0];n&&n.type&&(s.value=n.type.type),v("state",s.value,t.value?.key)}).catch(()=>{o.value=""}),t.value?.component&&(u=e.defineAsyncComponent(t.value.component))}return r(),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["test","state-"+s.value])},[e.createVNode(p,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",N,e.toDisplayString(t.value?.value)+" 文件 示例代码 ",1)]),_:1},8,["value"]),e.createElementVNode("div",h,[e.createVNode(e.unref(m.default),{value:c.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",V,[(e.openBlock(),e.createBlock(e.Suspense,null,{fallback:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode(" 示例加载中... ",-1)])),default:e.withCtx(()=>[e.createVNode(e.unref(u))]),_:1}))]),t.read?(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(f,{value:t.value,text:o.value},null,8,["value","text"])])):e.createCommentVNode("",!0)])],2))}});module.exports=B;
1
+ "use strict";const e=require("vue"),p=require("../boxurl/index.vue.cjs"),m=require("./top.cjs"),f=require("../code/index.vue.cjs"),x=require("./index.cjs"),y=require("../../utils/glob.cjs"),N={class:"md-top-name"},h={class:"test-top"},k={class:"test-div"},V={class:"test-body"},g={key:0,class:"test-code"},B=e.defineComponent({__name:"index",props:{value:Object,read:{type:Boolean,default:!0}},emits:["state"],setup(i,{emit:d}){const t=i,v=d,s=e.ref(""),c=e.ref([]),o=e.ref("1");e.watch([()=>t.value,()=>t.read],()=>{r()});let u;function r(){t.read&&t.value?.key&&y.getLocalTextTests(t.value).then(l=>{s.value=l;let{titles:a,states:_}=x.getNotes(l);c.value=a;const n=_[0];n&&n.type&&(o.value=n.type.type),v("state",o.value,t.value?.key)}).catch(()=>{s.value=""}),t.value?.component&&(u=e.defineAsyncComponent(t.value.component))}return r(),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["test","state-"+o.value])},[e.createVNode(p,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",N,e.toDisplayString(t.value?.value)+" 文件 示例代码 ",1)]),_:1},8,["value"]),e.createElementVNode("div",h,[e.createVNode(e.unref(m.default),{value:c.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",V,[(e.openBlock(),e.createBlock(e.Suspense,null,{fallback:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode(" 示例加载中... ",-1)])),default:e.withCtx(()=>[e.createVNode(e.unref(u))]),_:1}))]),t.read?(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(f,{value:t.value,text:s.value},null,8,["value","text"])])):e.createCommentVNode("",!0)])],2))}});module.exports=B;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),a=require("../code/highlight.vue.cjs"),m=require("../../utils/index.cjs"),v=require("../../utils/util.cjs"),h={class:"set-code"},p={class:"but-div set-code-but"},f={class:"set-code-html"},C=e.defineComponent({__name:"code",props:{name:{type:String},html:{type:String,default(){return""}}},emits:["refresh"],setup(s,{emit:c}){const t=s,n=c,o=e.ref(!1);function l(){o.value=!o.value}function r(){m.copyCode(t.html)}function d(){v.exportStringToFile(t.html,t.name+".vue")}function u(){n("refresh")}return(_,i)=>(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",{onClick:l,class:"set-code-buts"},[i[0]||(i[0]=e.createElementVNode("div",null,"代码",-1)),e.createElementVNode("div",p,e.toDisplayString(o.value?"显示":"隐藏"),1),e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:"but-div set-code-but"}," 复制 "),e.createElementVNode("div",{onClick:e.withModifiers(d,["stop"]),class:"but-div set-code-but"}," 下载 "),e.createElementVNode("div",{onClick:e.withModifiers(u,["stop"]),class:"but-div set-code-but"}," 刷新 ")]),e.withDirectives(e.createElementVNode("div",f,[e.createVNode(a,{language:"html",code:t.html},null,8,["code"])],512),[[e.vShow,o.value]])]))}});module.exports=C;
@@ -0,0 +1,66 @@
1
+ import { defineComponent as m, ref as p, createElementBlock as v, openBlock as f, createElementVNode as e, withDirectives as h, toDisplayString as C, withModifiers as i, createVNode as _, vShow as b } from "vue";
2
+ import k from "../code/highlight.vue.js";
3
+ import { copyCode as g } from "../../utils/index.js";
4
+ import { exportStringToFile as S } from "../../utils/util.js";
5
+ const y = { class: "set-code" }, w = { class: "but-div set-code-but" }, x = { class: "set-code-html" }, F = /* @__PURE__ */ m({
6
+ __name: "code",
7
+ props: {
8
+ name: {
9
+ type: String
10
+ },
11
+ html: {
12
+ type: String,
13
+ default() {
14
+ return "";
15
+ }
16
+ }
17
+ },
18
+ emits: ["refresh"],
19
+ setup(c, { emit: n }) {
20
+ const t = c, l = n, o = p(!1);
21
+ function r() {
22
+ o.value = !o.value;
23
+ }
24
+ function d() {
25
+ g(t.html);
26
+ }
27
+ function u() {
28
+ S(t.html, t.name + ".vue");
29
+ }
30
+ function a() {
31
+ l("refresh");
32
+ }
33
+ return (D, s) => (f(), v("div", y, [
34
+ e("div", {
35
+ onClick: r,
36
+ class: "set-code-buts"
37
+ }, [
38
+ s[0] || (s[0] = e("div", null, "代码", -1)),
39
+ e("div", w, C(o.value ? "显示" : "隐藏"), 1),
40
+ e("div", {
41
+ onClick: i(d, ["stop"]),
42
+ class: "but-div set-code-but"
43
+ }, " 复制 "),
44
+ e("div", {
45
+ onClick: i(u, ["stop"]),
46
+ class: "but-div set-code-but"
47
+ }, " 下载 "),
48
+ e("div", {
49
+ onClick: i(a, ["stop"]),
50
+ class: "but-div set-code-but"
51
+ }, " 刷新 ")
52
+ ]),
53
+ h(e("div", x, [
54
+ _(k, {
55
+ language: "html",
56
+ code: t.html
57
+ }, null, 8, ["code"])
58
+ ], 512), [
59
+ [b, o.value]
60
+ ])
61
+ ]));
62
+ }
63
+ });
64
+ export {
65
+ F as default
66
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./code.vue.cjs");module.exports=e;
@@ -0,0 +1,4 @@
1
+ import f from "./code.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";const t=require("vue"),h=require("./code.vue.cjs"),a=require("./retrie/input/index.vue.cjs");;/* empty css */const y=require("./effect.vue.cjs");function _(r){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const u in r)if(u!=="default"){const i=Object.getOwnPropertyDescriptor(r,u);Object.defineProperty(m,u,i.get?i:{enumerable:!0,get:()=>r[u]})}}return m.default=r,Object.freeze(m)}const v=_(t),g=t.defineComponent({props:{value:{type:Object},param:{type:Object}},data(){return{template:"",script:"",style:"",vueHtml:""}},setup(r){function m(s){const c=document.getElementsByTagName("head")[0],l="data-vite-dev-id",o=s+".css",p=c.querySelector(`style[${l}="${o}"]`);if(p)return p;{let e=document.createElement("style");return e.appendChild(document.createTextNode("")),e.setAttribute("type","text/css"),e.setAttribute(l,o),c.appendChild(e),e}}function u(s,c="",l){const o=[],p=r.value?.name;let e="";return Object.keys(v).forEach(d=>{c.includes(d+"(")&&o.push(d)}),o.length>0&&(e=`import { ${o.join(" , ")} } from 'vue';`),`<!--${p}-->
2
+ <template>
3
+ ${s}
4
+ </template>
5
+ <script>
6
+ ${e}
7
+ export default {
8
+ setup(props, ctx) {
9
+ ${c}
10
+ }
11
+ }
12
+ <\/script>
13
+ <style>
14
+ ${l}
15
+ </style>
16
+ `}function i(s,c,l){try{const o=Object.keys(v);return new Function("props","ctx","vue",` "use strict";
17
+ const { ${o.join(",")} } = vue;
18
+ ${s}; `)(c,l,v)}catch(o){console.error("Code block execution failed:",o)}}const n=t.ref(null);return t.onMounted(()=>{n.value=m(r.value?.key)}),{getHmtlVue:u,getCodeBlock:i,style:n}},render(r,m,u,i,n){const s=u.value;let c="div";s.component?c=t.defineAsyncComponent(s.component):s.name&&(c=t.resolveComponent(s.name));const l={};l[s.name]=c;const o=()=>{const e=i.getHmtlVue(n.template,n.script,n.style);n.vueHtml=e},p=()=>{i.style.innerHTML=n.style,o()};return t.h("div",{class:"code-edit"},[t.h("div",{class:"edit-effect use"},[t.h(y,{class:"use-component"},{default:()=>t.h(t.defineComponent({components:l,setup(e,f){return i.getCodeBlock(n.script,e,f)},template:n.template}))}),t.h(h,{html:n.vueHtml,name:s.name+"_edit",onRefresh:o})]),t.h("div",{class:"edit-input"},[t.h("div",{onClick:p},"运行"),t.h("div",{},[t.h("div",{},"template"),t.h(a,{check:e=>e,modelValue:n.template,"onUpdate:modelValue":e=>{n.template=e}})]),t.h("div",{},[t.h("div",{},"script"),t.h("div",{},"setup(props, ctx)"),t.h(a,{check:e=>e,modelValue:n.script,"onUpdate:modelValue":e=>{n.script=e}})]),t.h("div",{},[t.h("div",{},"style"),t.h(a,{check:e=>e,modelValue:n.style,"onUpdate:modelValue":e=>{n.style=e}})])])])}});module.exports=g;
@@ -0,0 +1,32 @@
1
+ import * as vues from 'vue';
2
+ /**
3
+ * @title
4
+ * @author 方忠亚
5
+ * @description 这是个我用来测试功能的测试组件,请不要使用它
6
+ * @date 2022年11月24日22点58分
7
+ */
8
+ declare const _default: vues.DefineComponent<vues.ExtractPropTypes<{
9
+ value: {
10
+ type: ObjectConstructor;
11
+ };
12
+ param: {
13
+ type: ObjectConstructor;
14
+ };
15
+ }>, {
16
+ getHmtlVue: (template: string, script: string | undefined, style: string) => string;
17
+ getCodeBlock: (value: string, props: any, ctx: any) => any;
18
+ style: vues.Ref<HTMLStyleElement | null, HTMLStyleElement | null>;
19
+ }, {
20
+ template: string;
21
+ script: string;
22
+ style: string;
23
+ vueHtml: string;
24
+ }, {}, {}, vues.ComponentOptionsMixin, vues.ComponentOptionsMixin, {}, string, vues.PublicProps, Readonly<vues.ExtractPropTypes<{
25
+ value: {
26
+ type: ObjectConstructor;
27
+ };
28
+ param: {
29
+ type: ObjectConstructor;
30
+ };
31
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vues.ComponentProvideOptions, true, {}, any>;
32
+ export default _default;