ss-component-new 1.2.18 → 1.2.20

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 (93) hide show
  1. package/dist/{animationData-DTnmVl43.cjs → animationData-B2z83pxg.cjs} +1 -1
  2. package/dist/{animationData-CYVo4cF3.js → animationData-BtrsHGyM.js} +4 -4
  3. package/dist/{array-kfBiN1QA.cjs → array-CX7F7hCX.cjs} +1 -1
  4. package/dist/{array-D5WfaBtT.js → array-Ch6p_ukC.js} +2 -2
  5. package/dist/{index-fTU6D0EV.cjs → index-0K6Cl-Ms.cjs} +1 -1
  6. package/dist/{index-BGnIpBtJ.js → index-2iSHsVLl.js} +127 -127
  7. package/dist/{index-pDGtp9Y4.js → index-73T2Lgv2.js} +2 -2
  8. package/dist/{index-Upb8vZrJ.cjs → index-9oTbqGzg.cjs} +1 -1
  9. package/dist/{index-CYp77kPp.js → index-B42dCx1W.js} +35 -35
  10. package/dist/index-BEW3m7PE.cjs +1 -0
  11. package/dist/{index-BsEOhglN.js → index-BG1_KhZK.js} +6 -6
  12. package/dist/{index-JqoJqpvd.js → index-BKu0xz-O.js} +6 -6
  13. package/dist/{index-CgEp32Ha.js → index-BMMFvZxl.js} +4 -4
  14. package/dist/{index-C461j30b.js → index-Bgje9P6C.js} +1 -1
  15. package/dist/{index-BHHFDjsi.js → index-BlKNwTOs.js} +12 -12
  16. package/dist/{index-CTd5yE7g.cjs → index-BlyDBfzx.cjs} +1 -1
  17. package/dist/{index-RSZafNJV.js → index-BpjFWVqg.js} +45 -45
  18. package/dist/{index-oKm_bMcI.cjs → index-BsDe8kH3.cjs} +1 -1
  19. package/dist/{index-L_8m2Edi.cjs → index-BtxtAu06.cjs} +1 -1
  20. package/dist/{index-CGGQf1Fy.cjs → index-BwZEc7Tf.cjs} +1 -1
  21. package/dist/{index-PYM4eM9f.js → index-By7Jdce4.js} +2 -2
  22. package/dist/{index-Cl1eN72c.cjs → index-C86qvKuB.cjs} +1 -1
  23. package/dist/{index-BwjuTBrR.js → index-CFrBvay9.js} +1 -1
  24. package/dist/{index-BiNsOjcC.cjs → index-CFvq-6Md.cjs} +1 -1
  25. package/dist/{index-C8gXNO36.js → index-CGT4GOaV.js} +3 -3
  26. package/dist/{index-uzUGa1I0.js → index-CHqWj9bq.js} +8 -8
  27. package/dist/{index-loXBOUd5.cjs → index-CP1n4T5X.cjs} +1 -1
  28. package/dist/{index-aTTU_ja_.cjs → index-CUunD6AI.cjs} +1 -1
  29. package/dist/{index-BgJ164SD.js → index-CZOZhNzY.js} +2 -2
  30. package/dist/{index-D7Y91W7M.cjs → index-CbvsAbDX.cjs} +1 -1
  31. package/dist/{index-BoD05_J0.js → index-CdatGkoi.js} +1 -1
  32. package/dist/{index-Cz9V1kg-.js → index-CgRNnsAu.js} +6 -6
  33. package/dist/{index-CQBynyM7.js → index-CmRTH7_x.js} +4 -4
  34. package/dist/{index-D51ekpXx.cjs → index-CvGDAOfZ.cjs} +1 -1
  35. package/dist/{index-brsfUqkV.cjs → index-Cvk1PayK.cjs} +1 -1
  36. package/dist/{index-DFH8aI2Y.js → index-Cyg0Lzay.js} +1 -1
  37. package/dist/{index-Bjp7vtmT.cjs → index-D4L8awAF.cjs} +1 -1
  38. package/dist/{index-D9D2Wuf4.cjs → index-DF9BuOL8.cjs} +1 -1
  39. package/dist/{index-DuE6CA_5.cjs → index-DFYOu4oD.cjs} +1 -1
  40. package/dist/{index-fcgKi8rF.js → index-DGX0smEy.js} +11 -11
  41. package/dist/{index-CoQXoOC5.cjs → index-DIcMmdC0.cjs} +1 -1
  42. package/dist/{index-8U0_G_0R.js → index-DKKn4eRy.js} +19 -19
  43. package/dist/{index-9RCVRjgc.js → index-DM34sP7N.js} +2 -2
  44. package/dist/{index-BpyDAfgJ.cjs → index-DQI1sU2I.cjs} +1 -1
  45. package/dist/{index-DviC5Mes.cjs → index-DU41qklc.cjs} +1 -1
  46. package/dist/{index-DxERe_o8.cjs → index-DZMb09ji.cjs} +1 -1
  47. package/dist/{index-CEsRU7PI.cjs → index-DZwxX08c.cjs} +1 -1
  48. package/dist/{index-DKo5-PGs.cjs → index-DfFuzmAD.cjs} +1 -1
  49. package/dist/{index-WkhOFQKy.js → index-DhgVjH8N.js} +1 -1
  50. package/dist/{index-CgXgl7xg.cjs → index-DkTI4y8-.cjs} +1 -1
  51. package/dist/{index-t-iLIRPH.js → index-DtgOLoua.js} +6 -6
  52. package/dist/{index-C0M4a5a7.js → index-DzUxU95k.js} +2 -2
  53. package/dist/{index-D9BKoQ6f.js → index-JvFLPwtl.js} +12 -12
  54. package/dist/{index-DLRyzLvk.js → index-TRG-Xajw.js} +6 -6
  55. package/dist/{index-BrdP9HC4.js → index-WI-Enogn.js} +3 -3
  56. package/dist/{index-DYT7O5SY.js → index-dp7B89l2.js} +2 -2
  57. package/dist/{index-DWCqPPU9.cjs → index-kUx8M5fQ.cjs} +1 -1
  58. package/dist/{index-DuX7JuNX.cjs → index-veO6aNlT.cjs} +1 -1
  59. package/dist/{index-Bj3QBLNZ.js → index-ywttg0aN.js} +2 -2
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DyCjVGK4.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BQDvbb5M.cjs} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkvEh0kU.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C5iAwGPT.js} +2 -2
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CgRoTnM4.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-BuLgHqsW.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DDuO2RJ1.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-C6O7eqGt.js} +13 -13
  64. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BR6JjiA7.cjs +56 -0
  65. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-Cc_BYWMl.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-YoXSuhvY.js} +11641 -11513
  66. package/dist/{index.vue_vue_type_style_index_1_lang-CnzkLjVf.js → index.vue_vue_type_style_index_1_lang-B5e9AaID.js} +3 -3
  67. package/dist/{index.vue_vue_type_style_index_1_lang-vU1VQMfs.js → index.vue_vue_type_style_index_1_lang-BYqy49bR.js} +2516 -2455
  68. package/dist/{index.vue_vue_type_style_index_1_lang-B-382mSr.cjs → index.vue_vue_type_style_index_1_lang-CdUqUglE.cjs} +1 -1
  69. package/dist/index.vue_vue_type_style_index_1_lang-KvVUqiGG.cjs +32 -0
  70. package/dist/{isString-BNK38WbE.js → isString-BrYdkZh8.js} +1 -1
  71. package/dist/{main-Dk1H52zm.js → main-C16cfwlk.js} +5 -5
  72. package/dist/{main-hA5knk3Y.cjs → main-Dh4RBLeI.cjs} +1 -1
  73. package/dist/ss-component.cjs +1 -1
  74. package/dist/ss-component.css +1 -1
  75. package/dist/ss-component.js +11 -11
  76. package/dist/ss-component2.cjs +1 -1
  77. package/dist/ss-component2.js +12 -12
  78. package/dist/{threeLatheView-Bp0kjo_V.js → threeLatheView-DuqX5kKf.js} +2 -2
  79. package/dist/{threeModel-7FtoCWUL.js → threeModel-BIw5R64U.js} +3 -3
  80. package/dist/{threeModel-B8ayOk4L.cjs → threeModel-BzqnR4Z_.cjs} +1 -1
  81. package/dist/{threePreview-DFFjm93P.js → threePreview-B7C8gY5w.js} +1 -1
  82. package/dist/{threeSceneView-DpIfHcs5.cjs → threeSceneView-CB27ZSDh.cjs} +1 -1
  83. package/dist/{threeSceneView-kfQrdRjz.js → threeSceneView-TMLpCSG3.js} +8 -8
  84. package/dist/{threeSceneViewForCPMPIP-Cz1ay3aa.js → threeSceneViewForCPMPIP-CzDiAua_.js} +25 -25
  85. package/dist/{threeSceneViewForCPMPIP-BTLpKMe4.cjs → threeSceneViewForCPMPIP-Duj6EFe5.cjs} +1 -1
  86. package/dist/{threeViewerHost-Da6cfLt7.cjs → threeViewerHost-CYAKN7z5.cjs} +1 -1
  87. package/dist/{threeViewerHost-CXQi7gV5.js → threeViewerHost-CsLCgnJb.js} +10 -10
  88. package/dist/{useRayCaster-x0qmWO-B.cjs → useRayCaster-A4T4JTfj.cjs} +1 -1
  89. package/dist/{useRayCaster-Ca7t2A9k.js → useRayCaster-BwybQXi8.js} +1 -1
  90. package/package.json +1 -1
  91. package/dist/index-Djrsmf4o.cjs +0 -1
  92. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BimjDwOI.cjs +0 -56
  93. package/dist/index.vue_vue_type_style_index_1_lang-YnBuuwY6.cjs +0 -32
@@ -1,4 +1,4 @@
1
- import { bC as t, h as i, bD as s } from "./index-CYp77kPp.js";
1
+ import { bD as t, h as i, bE as s } from "./index-B42dCx1W.js";
2
2
  var n = "[object String]";
3
3
  function g(r) {
4
4
  return typeof r == "string" || !i(r) && t(r) && s(r) == n;
@@ -1,9 +1,9 @@
1
1
  import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, onUnmounted as ie, createVNode as A } from "vue";
2
- import { m as me, a as de, b as ye } from "./index-DLRyzLvk.js";
3
- import { p as E, s as ee, c as k } from "./index-CYp77kPp.js";
4
- import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-vU1VQMfs.js";
5
- import { g as ge } from "./index-BHHFDjsi.js";
6
- import { e as he, a as ke } from "./array-D5WfaBtT.js";
2
+ import { m as me, a as de, b as ye } from "./index-TRG-Xajw.js";
3
+ import { p as E, s as ee, c as k } from "./index-B42dCx1W.js";
4
+ import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-BYqy49bR.js";
5
+ import { g as ge } from "./index-BlKNwTOs.js";
6
+ import { e as he, a as ke } from "./array-Ch6p_ukC.js";
7
7
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const x = [
9
9
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-CTd5yE7g.cjs"),i=require("./index-1z9RrjZc.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-YnBuuwY6.cjs"),Z=require("./index-DWCqPPU9.cjs"),G=require("./array-kfBiN1QA.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-BlyDBfzx.cjs"),i=require("./index-1z9RrjZc.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-KvVUqiGG.cjs"),Z=require("./index-kUx8M5fQ.cjs"),G=require("./array-CX7F7hCX.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DyCjVGK4.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-YnBuuwY6.cjs");require("./index-1z9RrjZc.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-hA5knk3Y.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-aTTU_ja_.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CoQXoOC5.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cl1eN72c.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DxERe_o8.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DEEZPcpU.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BiNsOjcC.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-B8ayOk4L.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-Da6cfLt7.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BQDvbb5M.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-KvVUqiGG.cjs");require("./index-1z9RrjZc.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-Dh4RBLeI.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CUunD6AI.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DIcMmdC0.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C86qvKuB.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DZMb09ji.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DEEZPcpU.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CFvq-6Md.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-BzqnR4Z_.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-CYAKN7z5.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;