ss-component-new 1.2.36 → 1.2.37

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 (119) hide show
  1. package/dist/{MTLLoader-CkNQ5SUP.cjs → MTLLoader-Dihj5ymj.cjs} +1 -1
  2. package/dist/{MTLLoader-B4lJr_ku.js → MTLLoader-gxq5Kvds.js} +1 -1
  3. package/dist/{OrbitControls-CpTJa--7.cjs → OrbitControls-Ba8QWDQU.cjs} +1 -1
  4. package/dist/{OrbitControls-CwAfnF56.js → OrbitControls-BonUITsH.js} +1 -1
  5. package/dist/{animationData-CF6-_eBc.cjs → animationData-AAFCWE58.cjs} +1 -1
  6. package/dist/{animationData-ETdtTXwF.js → animationData-DOlVDTlo.js} +4 -4
  7. package/dist/{array-CbzJvO5y.cjs → array-Bvce3EAi.cjs} +1 -1
  8. package/dist/{array-BUiCaQsR.js → array-D7EDjc7l.js} +35 -35
  9. package/dist/config.js +2 -2
  10. package/dist/{dataUtil-DFkONpps.cjs → dataUtil-B98txAs6.cjs} +1 -1
  11. package/dist/{dataUtil-oabcbdyY.js → dataUtil-VNsK7cTO.js} +2 -2
  12. package/dist/{fileUtil-BezA0XEu.cjs → fileUtil-BeIaOSMH.cjs} +1 -1
  13. package/dist/{fileUtil-xUu_aleM.js → fileUtil-D7S_1Tde.js} +1 -1
  14. package/dist/{iconfont-Cj5twyUW.js → iconfont-Dnc_kFzN.js} +2 -2
  15. package/dist/{iconfont-Bc_5-mGm.cjs → iconfont-wtkqkYlV.cjs} +1 -1
  16. package/dist/{index-Cs1m0QHY.cjs → index-A2nYF-1f.cjs} +1 -1
  17. package/dist/{index-C-4KKbC7.js → index-B-xelo5W.js} +3 -3
  18. package/dist/{index-CkTqgfCV.js → index-B3sDwg_c.js} +1 -1
  19. package/dist/{index-LcSS6r-3.cjs → index-B8HWTwDz.cjs} +1 -1
  20. package/dist/{index-7jCqww1w.cjs → index-B8bUR1Ri.cjs} +1 -1
  21. package/dist/{index-B35gkDgD.js → index-BCLRJLSj.js} +1 -1
  22. package/dist/{index-CfKLvZ17.cjs → index-BJoRCnr3.cjs} +1 -1
  23. package/dist/{index-DKQfWQa7.js → index-BLTsYYci.js} +1 -1
  24. package/dist/{index-bFFymrtu.js → index-BMaVaPUc.js} +2 -2
  25. package/dist/{index-DK1sT-Gv.js → index-BPzUmT8-.js} +12 -12
  26. package/dist/{index-CnW0XyMI.cjs → index-BU5DWXf0.cjs} +1 -1
  27. package/dist/{index-B5KCSN4c.cjs → index-BbzUzdxF.cjs} +1 -1
  28. package/dist/{index-BnNI_rxz.js → index-BeawnQ97.js} +3 -3
  29. package/dist/{index-C_FC7JhD.js → index-BiNILQi8.js} +6 -6
  30. package/dist/{index-CvrlW6Kj.cjs → index-BiPzhKBB.cjs} +1 -1
  31. package/dist/{index-Bp59pdeu.js → index-BrvAeT7w.js} +10 -10
  32. package/dist/{index-BjLowWoy.js → index-BwoXi1LQ.js} +2 -2
  33. package/dist/index-C8qRkCgn.cjs +21 -0
  34. package/dist/{index-ixEWAWI8.js → index-CBpSEFvE.js} +4 -4
  35. package/dist/{index-BsQpRUkg.cjs → index-CCAXN_VF.cjs} +1 -1
  36. package/dist/{index-DBDeHECn.js → index-CExeGHij.js} +5410 -5111
  37. package/dist/{index-vDXPLbzt.cjs → index-CQNvplpY.cjs} +13 -13
  38. package/dist/{index-BntUSUuQ.cjs → index-CagsR3TK.cjs} +1 -1
  39. package/dist/{index-Bsj_M3tu.cjs → index-CeJI9fRM.cjs} +1 -1
  40. package/dist/{index-CUeHiWp_.js → index-ChfpFIIo.js} +52 -52
  41. package/dist/{index-GOk9tc6o.js → index-Cjn-Nipt.js} +2 -2
  42. package/dist/{index-BHkXSoxP.cjs → index-ClnJ1K8q.cjs} +1 -1
  43. package/dist/{index-DPLITXsJ.js → index-CqzA5JZV.js} +21 -21
  44. package/dist/{index-DbW_sD5N.cjs → index-Ct6AnOh0.cjs} +1 -1
  45. package/dist/{index-B3_Z46NG.cjs → index-Cv9MOPos.cjs} +1 -1
  46. package/dist/{index-BopRIRaa.js → index-D2FUUF0p.js} +3311 -3300
  47. package/dist/{index-bhZxftEb.js → index-D62RCkPJ.js} +6 -6
  48. package/dist/{index-CV-9wRXp.cjs → index-DATWIRSp.cjs} +1 -1
  49. package/dist/{index-RfA-XD5A.cjs → index-DBiP81co.cjs} +1 -1
  50. package/dist/{index-BahsZur-.cjs → index-DBpviAty.cjs} +1 -1
  51. package/dist/{index-CvI-Xndo.js → index-DHUPGceO.js} +1 -1
  52. package/dist/{index-CizvuDrT.cjs → index-DKnofcM3.cjs} +1 -1
  53. package/dist/{index-BA_mOmgl.js → index-DWR446SX.js} +40 -40
  54. package/dist/{index-CnasZ7DR.cjs → index-DXY5_0gS.cjs} +1 -1
  55. package/dist/{index-D4X5ZbsB.cjs → index-DcSxvtLy.cjs} +1 -1
  56. package/dist/{index-CcKVjgvm.js → index-DdWJf1s4.js} +2 -2
  57. package/dist/{index-DHOgfCKk.js → index-De7WEvrP.js} +6 -6
  58. package/dist/{index-Ci05kJVO.cjs → index-DeakNivq.cjs} +1 -1
  59. package/dist/{index-Bha2dAuG.cjs → index-DfdAKUNR.cjs} +1 -1
  60. package/dist/{index-w9_VhKWc.cjs → index-DpzDQdE3.cjs} +1 -1
  61. package/dist/{index-DynEv7dZ.cjs → index-Idro_h24.cjs} +1 -1
  62. package/dist/{index-CTIVfb14.js → index-K4IHDJhC.js} +3 -3
  63. package/dist/{index-BOfa3R-1.cjs → index-XPbPRVHs.cjs} +1 -1
  64. package/dist/{index-DalL4U6b.js → index-XWSpT0ba.js} +8 -8
  65. package/dist/{index-C8YYklCT.cjs → index-Z3NUprRN.cjs} +1 -1
  66. package/dist/{index-ExjSK4s1.cjs → index-a9MrfjsX.cjs} +1 -1
  67. package/dist/{index-CowSp0mU.js → index-d2eZUUOL.js} +4 -4
  68. package/dist/{index-BwL33eO2.js → index-dg2e5vzL.js} +2 -2
  69. package/dist/{index-CX9ZToOe.js → index-diSrIKAW.js} +303 -303
  70. package/dist/{index-BWDmAGYH.js → index-dz7-iyTs.js} +8 -8
  71. package/dist/{index-CWQAImyg.js → index-nvemkzcE.js} +2 -2
  72. package/dist/{index-h5XWazmL.cjs → index-osFjwxXn.cjs} +1 -1
  73. package/dist/{index-peUgec1X.js → index-rGGHn9oX.js} +1268 -1267
  74. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BV1JZ-3O.js +38949 -0
  75. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DNHgx7h4.cjs +37 -0
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CTRnGkVw.js} +1649 -1644
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DupRlL-E.cjs} +124 -124
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DTRpzofW.js → index.vue_vue_type_style_index_0_scoped_92477073_lang--woCJ_em.js} +13 -13
  79. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DaxZVXAO.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-COe_Ck32.cjs} +1 -1
  80. package/dist/index.vue_vue_type_style_index_1_lang-6KO-EDQa.js +8293 -0
  81. package/dist/{index.vue_vue_type_style_index_1_lang-BgqA98cE.cjs → index.vue_vue_type_style_index_1_lang-CKpfQuiD.cjs} +1 -1
  82. package/dist/index.vue_vue_type_style_index_1_lang-Cb4_k0AS.cjs +32 -0
  83. package/dist/{index.vue_vue_type_style_index_1_lang-BX_Iweoa.js → index.vue_vue_type_style_index_1_lang-jt5oqPmv.js} +5 -5
  84. package/dist/{isString-D6Z6SOrb.cjs → isString--eJE54G5.cjs} +1 -1
  85. package/dist/{isString-DBnuELeA.js → isString-By6KKNvg.js} +1 -1
  86. package/dist/{main-BnGiV5RB.cjs → main-Brifss3R.cjs} +1 -1
  87. package/dist/{main-DHZFoZje.js → main-DENbrJLK.js} +5 -5
  88. package/dist/obj/model.mtl +42 -0
  89. package/dist/obj/model.obj +26110 -0
  90. package/dist/ss-component.cjs +1 -1
  91. package/dist/ss-component.css +1 -1
  92. package/dist/ss-component.js +11 -11
  93. package/dist/ss-component2.cjs +1 -1
  94. package/dist/ss-component2.js +12 -12
  95. package/dist/{threeModel-BkNMl4gC.js → threeModel-CpklGUZ5.js} +5 -5
  96. package/dist/{threeModel-BHsadPD8.cjs → threeModel-DxxkXyt5.cjs} +1 -1
  97. package/dist/{threePreview-BhHpGgi8.js → threePreview-BsPiIokT.js} +4 -4
  98. package/dist/{threePreview-q2XmhoL-.cjs → threePreview-Sh0ABsnX.cjs} +1 -1
  99. package/dist/{threeSceneView-D_2JHUdz.cjs → threeSceneView-DfiXbOBr.cjs} +1 -1
  100. package/dist/{threeSceneView-CDFoPU6x.js → threeSceneView-Dm3k49Mh.js} +87 -87
  101. package/dist/{threeSceneViewForCPMPIP-BBelwG21.js → threeSceneViewForCPMPIP-Czp3KJaA.js} +57 -57
  102. package/dist/{threeSceneViewForCPMPIP-DSIkOvjL.cjs → threeSceneViewForCPMPIP-XTc0zag-.cjs} +1 -1
  103. package/dist/{threeTrackPathView-CeCre9ru.js → threeTrackPathView-DaEDYBsf.js} +6 -6
  104. package/dist/{threeTrackPathView-CClVyd1p.cjs → threeTrackPathView-Dmp5NZVO.cjs} +1 -1
  105. package/dist/{threeViewerHost-B2ROtL1I.cjs → threeViewerHost-C07FM01K.cjs} +1 -1
  106. package/dist/{threeViewerHost-DLd9bynL.js → threeViewerHost-tA5hwts8.js} +14 -14
  107. package/dist/{urdfTree-vu4m_HnH.js → urdfTree-C5eDsIZV.js} +1 -1
  108. package/dist/{urdfTree-B2NsYdY-.cjs → urdfTree-CNAusPWp.cjs} +1 -1
  109. package/dist/{workpieceTreePanel-CXVtdZfX.js → workpieceTreePanel-BE_ayLjw.js} +5 -5
  110. package/dist/{workpieceTreePanel-Dif_gJAG.cjs → workpieceTreePanel-DMnR0vK-.cjs} +1 -1
  111. package/package.json +1 -1
  112. package/public/config.js +2 -2
  113. package/public/obj/model.mtl +42 -0
  114. package/public/obj/model.obj +26110 -0
  115. package/dist/index-DEBf-IBT.cjs +0 -21
  116. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B8Lpp-LG.js +0 -38138
  117. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-yBjOSB4T.cjs +0 -56
  118. package/dist/index.vue_vue_type_style_index_1_lang-CWCaf0OP.js +0 -8415
  119. package/dist/index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs +0 -32
@@ -1,9 +1,9 @@
1
- import { S as Y3, O as t1, M as n1 } from "./MTLLoader-B4lJr_ku.js";
2
- import { a$ as D2, a7 as G2, O as a1, Q as O1, R as j1, V as _3, r as q3, aj as _1, S as P2, a3 as U1, C as o1, s as j3, ar as C1, b0 as $2, o as V3, aA as W3, f as C3, Y as W2, p as O3, aB as D1, P as T1, ap as J2, l as K2, _ as Y2, n as X2, D as Z2, u as U3, a0 as G1, ax as H1, az as Q2, w as c1, aF as T3, as as e6, ai as r1, al as t6, k as N3, y as P1, am as n6, aq as s6, ad as J3, af as E1, b1 as i6, b2 as a6, b3 as V1, b4 as o6, b5 as r6, b6 as c6, b7 as l6, b8 as $1, b9 as d6, ba as h6, E as u6, bb as f6, ag as W1, ao as J1, v as p6, B as m6, a5 as B1, bc as b6 } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js";
3
- import { d as g6 } from "./threeViewerHost-DLd9bynL.js";
4
- import { b as s1, s as y6, p as w6 } from "./index-DBDeHECn.js";
1
+ import { S as Y3, O as t1, M as n1 } from "./MTLLoader-gxq5Kvds.js";
2
+ import { a$ as D2, a7 as G2, O as a1, Q as O1, R as j1, V as _3, r as q3, aj as _1, S as P2, a3 as U1, C as o1, s as j3, ar as C1, b0 as $2, o as V3, aA as W3, f as C3, Y as W2, p as O3, aB as D1, P as T1, ap as J2, l as K2, _ as Y2, n as X2, D as Z2, u as U3, a0 as G1, ax as H1, az as Q2, w as c1, aF as T3, as as e6, ai as r1, al as t6, k as N3, y as P1, am as n6, aq as s6, ad as J3, af as E1, b1 as i6, b2 as a6, b3 as V1, b4 as o6, b5 as r6, b6 as c6, b7 as l6, b8 as $1, b9 as d6, ba as h6, E as u6, bb as f6, ag as W1, ao as J1, v as p6, B as m6, a5 as B1, bc as b6 } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CTRnGkVw.js";
3
+ import { d as g6 } from "./threeViewerHost-tA5hwts8.js";
4
+ import { b as s1, s as y6, p as w6 } from "./index-CExeGHij.js";
5
5
  import { ref as v6 } from "vue";
6
- import { a as z6 } from "./index.vue_vue_type_style_index_1_lang-CWCaf0OP.js";
6
+ import { a as z6 } from "./index.vue_vue_type_style_index_1_lang-6KO-EDQa.js";
7
7
  class q1 extends D2 {
8
8
  /**
9
9
  * Constructs a new TGA loader.
@@ -1 +1 @@
1
- "use strict";const t=require("./index-DEBf-IBT.cjs");var r="[object String]";function n(i){return typeof i=="string"||!t.isArray(i)&&t.isObjectLike(i)&&t.baseGetTag(i)==r}exports.isString=n;
1
+ "use strict";const t=require("./index-C8qRkCgn.cjs");var r="[object String]";function n(i){return typeof i=="string"||!t.isArray(i)&&t.isObjectLike(i)&&t.baseGetTag(i)==r}exports.isString=n;
@@ -1,4 +1,4 @@
1
- import { bD as r, i as t, bE as s } from "./index-DBDeHECn.js";
1
+ import { bS as r, i as t, bT as s } from "./index-CExeGHij.js";
2
2
  var n = "[object String]";
3
3
  function g(i) {
4
4
  return typeof i == "string" || !t(i) && r(i) && s(i) == n;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-7jCqww1w.cjs"),i=require("./index-DEBf-IBT.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs"),Z=require("./index-RfA-XD5A.cjs"),G=require("./array-CbzJvO5y.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-B8bUR1Ri.cjs"),i=require("./index-C8qRkCgn.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-Cb4_k0AS.cjs"),Z=require("./index-DBiP81co.cjs"),G=require("./array-Bvce3EAi.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,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-DHOgfCKk.js";
3
- import { p as E, s as ee, c as k } from "./index-DBDeHECn.js";
4
- import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-CWCaf0OP.js";
5
- import { g as ge } from "./index-peUgec1X.js";
6
- import { e as he, a as ke } from "./array-BUiCaQsR.js";
2
+ import { m as me, a as de, b as ye } from "./index-De7WEvrP.js";
3
+ import { p as E, s as ee, c as k } from "./index-CExeGHij.js";
4
+ import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-6KO-EDQa.js";
5
+ import { g as ge } from "./index-rGGHn9oX.js";
6
+ import { e as he, a as ke } from "./array-D7EDjc7l.js";
7
7
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const x = [
9
9
  {
@@ -0,0 +1,42 @@
1
+ # CAD Exchanger 3.24.0 (cadexchanger.com)
2
+ # Material Count: 5
3
+
4
+ newmtl Material_1
5
+ Ns 0.000000
6
+ Ka 0.200000 0.200000 0.200000
7
+ Kd 0.666667 0.666667 0.666667
8
+ Ks 0.000000 0.000000 0.000000
9
+ Ke 0.000000 0.000000 0.000000
10
+ d 1.000000
11
+
12
+ newmtl Material_2
13
+ Ns 0.000000
14
+ Ka 0.200000 0.200000 0.200000
15
+ Kd 0.133333 0.133333 0.133333
16
+ Ks 0.000000 0.000000 0.000000
17
+ Ke 0.000000 0.000000 0.000000
18
+ d 1.000000
19
+
20
+ newmtl Material_3
21
+ Ns 0.000000
22
+ Ka 0.200000 0.200000 0.200000
23
+ Kd 0.733333 0.733333 0.733333
24
+ Ks 0.000000 0.000000 0.000000
25
+ Ke 0.000000 0.000000 0.000000
26
+ d 1.000000
27
+
28
+ newmtl Material_5
29
+ Ns 0.000000
30
+ Ka 0.200000 0.200000 0.200000
31
+ Kd 0.396078 0.941176 0.450980
32
+ Ks 0.000000 0.000000 0.000000
33
+ Ke 0.000000 0.000000 0.000000
34
+ d 1.000000
35
+
36
+ newmtl Material_4
37
+ Ns 0.000000
38
+ Ka 0.200000 0.200000 0.200000
39
+ Kd 1.000000 1.000000 0.000000
40
+ Ks 0.000000 0.000000 0.000000
41
+ Ke 0.000000 0.000000 0.000000
42
+ d 1.000000