smirk-ui 0.0.15 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +2385 -0
- package/dist/kit.es.js +675 -0
- package/package.json +16 -7
- package/dist/es/index.js +0 -218536
- package/dist/lib/index.js +0 -439
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,2385 @@
|
|
|
1
|
+
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".sm-viewport[data-v-cc29b04b]{width:100vw;height:100vh;position:fixed;top:0;left:0;transform-origin:left top;background-size:100% 100%;overflow:hidden;z-index:1}*{padding:0;margin:0;box-sizing:border-box}html,body{overflow:hidden}.sm-grid-layout[data-v-4dc48ed4]{width:100%;height:100%;display:grid;gap:var(--v09cc6e9c);grid-template-areas:var(--v1bd3d118)}.sm-echarts[data-v-d819e9ca]{width:100%;height:100%}.sm-datetime[data-v-813fc31a]{display:inline-block;font-size:20px;letter-spacing:1px}.smx-rolling[data-v-1e3f1e1d]{position:relative;display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden}.sm_content[data-v-1e3f1e1d]{flex:1;width:100%;overflow:hidden}.sm_item[data-v-1e3f1e1d]{width:100%;overflow:hidden}.sm_nowrap[data-v-58af9f55]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.smx-rolling-list[data-v-58af9f55]{width:100%;height:100%;overflow:hidden;cursor:pointer}[data-v-58af9f55] .sm_header{display:flex;align-items:center}[data-v-58af9f55] .sm_header .sm_th{display:flex;align-items:center;justify-content:center;padding:4px;font-weight:550}.sm_tr[data-v-58af9f55]{display:flex;justify-items:stretch;line-height:2}.sm_td[data-v-58af9f55]{height:auto;padding:2px 4px}.smx-rolling-list.border[data-v-58af9f55]{border:var(--v0548d55a)}.smx-rolling-list.border .sm_th[data-v-58af9f55],.smx-rolling-list.border .sm_td[data-v-58af9f55]{border-bottom:var(--v0548d55a);border-right:var(--v0548d55a)}.smx-rolling-list.border .sm_th[data-v-58af9f55]:last-child,.smx-rolling-list.border .sm_td[data-v-58af9f55]:last-child{border-right:none}.smx-file-viewer__container{height:75vh;margin:2rem 0 0!important;overflow-y:hidden!important}.smx-file-viewer__container :deep(.vue-files-preview),.smx-file-viewer__container :deep(.vue-files-preview > div),.smx-file-viewer__container :deep(.vue-files-preview > div > iframe){height:100%!important}.smx-file-viewer__container .vue-files-preview{overflow:hidden!important}.sm-rolling-num[data-v-578dd347]{display:inline-flex;align-items:baseline;font-size:20px;letter-spacing:1px}.sm_prefix[data-v-578dd347]{margin-right:5px}.sm_suffix[data-v-578dd347]{margin-left:5px}.uu-fill[data-v-76be8819]{width:100%;height:100%}.uu-flex[data-v-76be8819]{display:flex;justify-content:center;align-items:center}.sm-multiple-picker[data-v-76be8819]{position:relative;background-color:#fafafa;padding:10px 20px;font-size:14px}.pk-item[data-v-76be8819]{align-items:baseline;padding:10px 0;border-bottom:1px solid #eee}.pk-item[data-v-76be8819]:nth-last-child(1){border-bottom:none}.pk-item .title[data-v-76be8819]{width:100px;height:100%;padding-right:20px;text-align:right;font-weight:600}.pk-item .title.multiTab[data-v-76be8819]{position:relative;top:-15px}.pk-item .ck-all[data-v-76be8819]{width:60px;color:#ccc}.pk-item .ck-all span[data-v-76be8819]{cursor:pointer}.pk-item .ck-all.active[data-v-76be8819]{color:#303f97}.pk-item .options[data-v-76be8819]{flex:1;line-height:50px}[data-v-76be8819] .n-checkbox-group .n-space>div{width:calc((100% - 140px) / var(--v7e29c873))}.fold-bar[data-v-76be8819]{margin-top:10px}.fold-bar .label[data-v-76be8819]{font-size:12px;color:#eee;padding:5px 20px;cursor:pointer}.fold-bar .label span[data-v-76be8819]{color:#999;padding:0 20px}.clear[data-v-76be8819]{position:absolute;right:20px;bottom:12px;color:#999;cursor:pointer;z-index:9}.clear[data-v-76be8819]:hover{color:#409eff}[data-v-76be8819] .n-icon{position:relative;top:2px}[data-v-76be8819] .n-tabs-tab--active .n-tabs-tab__label{color:#303f97;font-weight:600}[data-v-76be8819] .n-tabs .n-tabs-bar,[data-v-76be8819] .n-checkbox.n-checkbox--checked .n-checkbox-box{background-color:#303f97!important}.sm-dropdown-buttons[data-v-d654d306]{display:flex;justify-content:flex-end;align-items:center;gap:var(--v5255d030)}.sm-dropdown-buttons .btn[data-v-d654d306]{padding:0 8px}.sm-dropdown-buttons .more[data-v-d654d306]{color:#0075ff}.sm-dropdown-buttons .icon-text[data-v-d654d306]{font-size:16px}.sm-tabs[data-v-2085b0f7]{position:relative;padding:1rem 2rem;border:1px solid #eee}.sm-tabs .operation[data-v-2085b0f7]{position:absolute;top:0;right:0;display:flex;justify-content:flex-end;align-items:center;gap:12px;min-width:30%;top:1rem;right:2rem;height:5rem;z-index:1}.sm-tabs .container[data-v-2085b0f7]{min-height:20rem;padding:1rem 0 10px;margin-top:1rem;border-top:1px solid #eee}[data-v-2085b0f7] .n-tabs .n-tabs-wrapper{height:5rem}.uu-flex[data-v-37ffcb55]{display:flex;justify-content:center;align-items:center}.sm-steps[data-v-37ffcb55]{--bg-panel: #f5f5f5;width:100%;display:flex;flex-direction:column}.sm-steps .header[data-v-37ffcb55]{width:100%;height:100px;padding-left:var(--fe3382c0);overflow:hidden}.sm-steps .body[data-v-37ffcb55]{flex:1;width:100%}.uu-steps__point-size[data-v-37ffcb55]{width:2.6rem;height:2.6rem;background-size:100% 100%}.uu-steps__point-size .n-step-indicator-slot[data-v-37ffcb55]{display:none}[data-v-37ffcb55] .n-steps{position:relative;top:-10px;font-size:1.6rem;font-weight:600}[data-v-37ffcb55] .n-steps .n-step-splitor{margin-left:0;height:3px;background-color:var(--bg-panel)}[data-v-37ffcb55] .n-steps .n-step-content-header__title{display:none}[data-v-37ffcb55] .n-steps .n-step-content__description{position:absolute;bottom:-40px;text-align:center;transform:translate(calc(-50% - 24px));white-space:nowrap}[data-v-37ffcb55] .n-steps .n-step--finish-status .n-step-splitor{background-color:#47a3ff!important}[data-v-37ffcb55] .n-steps .n-step--finish-status .n-step-indicator{width:2.6rem;height:2.6rem;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAADRklEQVR4AeSTSWsVTxTFf/3i/+8cE8QZNc8BRBAHUBAx8SkKoqj5BgruxGEjogtNvoADuBUHUFwIunT3YkRwIcQJZ03EAcWBJ0pIonnlPdVdsdv3EsWFGy9961bXveecqtvVOf6S/aNCxQ5Xd/WxW3XlqWtp73Qn5X7+xG353c4P2Tov0OkO1Yyj09VQjCIO4dgq9/McF9ufuc6rVqNahrBBhYr3XYMJdDhHC1DH4NagGtUKM1hZVSEBaoZTNFCDuX9efYHrb6HtNRTN75TgQ69PhaFBGGHDQjpWCKkFAliRFykZ2fn7cOER3DShpybw0kTvfYR2e7/2Drr7rTp+YrEOV9GBCqFhdew2jBf52AMnbsJjI+35CvLeVNT8bTf8LJarZQ8/WYWQ9XtrqDl3G958BhHKJSRPz/X+yTbUYZsJOLsou9WZ8K6YEWqPr6s/zYP3cNda05ecQITVPIi+tna+szaL1LyOMSwiZRkhFzGQvPES3yqRi0w+fSwcXw9H1sK0MfiThrziCxMjsVyOVaQsI0SEPw1mj+xEIhdB8AONMLseZtXDrmX4jYQaxZK10KD+iXLM9JNkyAoliwr/WyYIhFguKxO75iJXLsTuvjhXbTS61LKji8TGj8K3ptfAIlLcexke2HV+aKdttb9M62mh2v8SsAVX5rmFgScjZLtsC5nlM/Ct6fmGF1S8ZT/qhjPQfBZuv4GeZBNBLF8b0BA57MdgwDJCDENJ+yVh0VRYMAl0Ek9opJmo22ibkIjWp1gHpidCDroa50SXSFlGqJCPSvYfHQv5/athom6X/fk6UfDeIGBiat9oa1nzvICy6DhtY+bJCClTznFUO9J88lg4thkWToY+IxepXKdQlM8cBzvsBtaPEAKEFUf89mOsENKpyhEFAVQWxI5ugs3zYd4EWGJtXTcHDjTBvpUwfqQqExHDiiNe+TFWCCllhV1pMa0tNvKdK+DwRji4BrYvhfkTlYldGxNG2HglO1YVUokABlxs36xVJFqr5pbTd21VrTDVarQ2qJCSBiw1zY5ammZF+f4yzRIl4pRc8/5+CiaQV41qGcKGFErjCnZdRdiYj7bJNS/Mjdp+JRA4flsoAP40/jWh7wAAAP//qRVMWQAAAAZJREFUAwBOZa1E6a0KhgAAAABJRU5ErkJggg==)}[data-v-37ffcb55] .n-steps .n-step--finish-status .n-step-indicator .n-step-indicator-slot{display:none}[data-v-37ffcb55] .n-steps .n-step--process-status .n-step-indicator{width:2.6rem;height:2.6rem;background-size:100% 100%;background-color:transparent;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAEm0lEQVR4AYSWT2wVVRTGfzN9WLCFPnUhGBctlZgoiizEEJH2qYkxhFSibHTjRhcakyYarQtSSHTdIAsXKnHrysTEuKDklTYg/ktLSMBSaUlMLBC0hdYq/Td+331zX1/bSCfvm3vvued83zln7kybssY1MJK1D4xl3f1jWfnUaDbWP5plOSZsE3pOX8qeWIOG/xWygEjKWR3lLOMwGe0JNLN0FW0TOhcKDNrXMUvby2erhMqDWVFBPRYQSfty9zuslIhj+i9nPeZY6blMqHwxay40USajkxXX+N9w4S84ex0G/4SLN+HG7RVOXiZ0puIwl5cRVSFnUajn6wyq/b49L+Jx+Ow8fDMK31+F4Qm4IJyXaP81OKH94VssuxJxpOIyZ9yoCtUV6a4VmVS2X0hg4HeYnoW5hRoogdkct7T3q4R6JTgjn0hssbpNdMd1EAoPsaZdE//C8XNqjdplgXkRmHhO5AFa2zYf1xqnhTNqa60YamNZp9ZiQSgrLCnb+OlPcH0KInkYRW7RMBepx9ncZrsxNQenJTav1pjHqMu507LfAZ0YG41vL8HVaaqtCmQidiUmn18E2zyPNo8BEp5SKy8rSXMFiNtVpWkdr1NzDVwhiJjMWZrAc8PrWWVtm1vnddNdsK8VorBtwzqRc0oo0qYp7WmSsiMafvkDxpWNiapQlg72OpDlaws31UPXbujYBrsfkJj27DOjqiaEyCuNtpSM6nEe1fsRSBXg0UGrBNxG7RdViUWK6+GkunByDOzrOOPaDEtXRrMPQzFa/GxMbsSgJhG9+hg4+6rNIk9XbL16v479CK4w7jv+Zk1F4g9CGiu/BWUaeq+s7Wx0PAzPb4UPn6kQF+uhyyIS61UVFrFAOOqK99wVmafCWrm7IhVeWWwogJ1Cdg4SPv8ZRvQVcEVdEvtgD7jKIPKD/JVUjAlxXgsN4qqwhvtkqpeqKrR9C7gKB8bMJv+BQyfgN4n5ebii0K6zFV+ThxiRO8Zrx9+rlgcJ3xKG0myRU54bOzZDfR3EgHiUo9jIDQgiZ+SjakO7LKB5FHDsBnG0NpmxAmmcSxcX6SO/Guvh5e3g/jqrKkRmsXe/g2O5iKswgo/2LeC5BR+9LyfMh8WUL9PStqSPhD7y6+DjcH9jLiaClWQmss0IxPLxaNjWqGezS+9UToe5Sy3JUIquhXmOaAg/V/Xxi9CgU+XPTSTwGLKuJVbLbLOAx0ICb+yE9YVAFW6ROwi5Kv25Php2dHtIpR8/CFs2glpbeWY1AiatwmLCRiX29pNwzwYR5D9zmtvLIOSJ+nhYH90hz43NEjnaAa+olaE6kVXbls9d5Tox7Ne7dkh/9B/c5MgKzGXOyoqlf07Ux8nFhAN2iJsWe0cv51evwUcvwEuPwHP6gJZaYJ/I33oKPtkPB2S/e12MQl81hsxVakkmo1X5xClo44ocSi55yQp+bntEbtH3lfl7bfDmLnhWog01Ao5xrDnM5XXEMiEb5TDZ1pp06nNUouY0em8N9DnGseZY6btKKDr4Ie5tSUoLCTudpUXV1morNPcXpU97Ryywd2tSckyMXzn+BwAA//988ohrAAAABklEQVQDAP1d00aToGqOAAAAAElFTkSuQmCC)}[data-v-37ffcb55] .n-steps .n-step--process-status .n-step-indicator .n-step-indicator-slot{display:none}[data-v-37ffcb55] .n-steps .n-step--wait-status .n-step-indicator{width:2.6rem;height:2.6rem;background-size:100% 100%;background-color:var(--bg-panel);box-shadow:0 0 0 1px #d0edff}[data-v-37ffcb55] .n-steps .n-step--wait-status .n-step-indicator .n-step-indicator-slot{display:none}[data-v-37ffcb55] .n-steps .n-step--wait-status .n-step-indicator .n-step-indicator-slot{display:block}[data-v-37ffcb55] .n-steps .n-step--wait-status .n-step-indicator .n-step-splitor{background-color:var(--bg-panel)}[data-v-37ffcb55] .n-steps .n-step--wait-status .n-step-indicator .n-step-indicator-slot__index{color:#909399}.group[data-v-104c9c1b]{display:flex;flex-wrap:wrap;align-items:flex-start}.empty-wrap[data-v-104c9c1b]{width:100%;height:0}.tip[data-v-104c9c1b]{display:inline-block;width:1em;height:1em;transform:translate(5px,.1em);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABJ0lEQVR4AZRTQUoDQRCsGfQD5iqYPwj5gC7iDwxIjsndh3jPNQrxBx6iHwj4hxW85gUGJlU99JLZTUh26Nrp7urq6Vl2I1orPeAq3WOaKrxxrw3Zn4prlaNokO7whC1+WDRHwjP3G0P25yBnNUy6NQ14UkLAkhg62dkDhuSXVou8rAETrzk8/+mamB5xTdmE6Fj4QhA6RE5MpI34R8V4QPS1gbS6wuiYkmMm4RjP/EgNNAH90jS6o2SKqFKDIuPBiZO9zL6DVRP1d1aaYN1f1yjWEZfQBBu0lu7vqX3fc9w30sbwiT8GC6IwvYN9FGQOFtLqCuAJLzl3/tM11kAyJgJ/oDFRKz6IhJr82GqRV9NAYfjGBy5wS3+GgHfuv4bsz0DOaph02wEAAP//XLF24AAAAAZJREFUAwDKn1s3uC+7UQAAAABJRU5ErkJggg==);background-size:100% 100%;cursor:pointer}.cell-value[data-v-104c9c1b]{font-size:16px}.form-item[data-v-104c9c1b]{position:relative;width:var(--e7f1459c);padding:0 10px}.form-item.hidden[data-v-104c9c1b]{visibility:hidden!important;pointer-events:none!important}.form-item.textarea[data-v-104c9c1b],.form-item.sm-fill[data-v-104c9c1b]{width:100%}[data-v-104c9c1b] .n-form .n-form-item-label__text{white-space:normal}[data-v-104c9c1b] .n-input-number,[data-v-104c9c1b] .n-input,[data-v-104c9c1b] .n-date-picker{width:100%}[data-v-104c9c1b] .n-divider{.n-divider__title span{font-size:16px;font-weight:600;color:#0075ff}}.group.readonly .form-item[data-v-104c9c1b]{display:flex;align-self:stretch;padding:0}.group.readonly[data-v-104c9c1b] .n-input__placeholder{opacity:0}.group.readonly[data-v-104c9c1b] .n-form-item--left-labelled{align-items:normal}.group.readonly[data-v-104c9c1b] .n-form-item-label__asterisk{display:none}.group.readonly[data-v-104c9c1b] .n-form-item-label{display:flex;flex-wrap:wrap;align-self:stretch;justify-content:flex-start;align-items:flex-start;padding:1rem;margin-left:-1px;margin-top:-1px;background-color:#fafafa;border:1px solid #eee}.group.readonly[data-v-104c9c1b] .n-form-item-blank{flex:1;align-self:stretch;align-items:flex-start;padding:1rem;border:1px solid #eee;margin-left:-1px;margin-top:-1px}.group.readonly[data-v-104c9c1b] .n-form-item-feedback-wrapper{display:none!important}.sm-doc-editor[data-v-f24a2f4b]{position:relative;width:100%;height:100%;line-height:1.8;background-color:#fff;overflow:hidden}.sm-doc-editor[data-v-f24a2f4b] .x-val{padding:0 .5em;text-decoration:underline;overflow-wrap:break-word}.sm-doc-editor[data-v-f24a2f4b] .x-val.lx-array-box{border:none;padding:1rem 0}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box{position:relative;display:flex;flex-direction:column;justify-content:center;min-height:8rem;margin:3px 0;padding:1rem;border:1px solid #0075ff}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box>i{position:absolute;bottom:10px;right:-18px;font-size:14px;font-weight:600;cursor:pointer}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box>i.add{bottom:50px}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box>i:before{writing-mode:vertical-rl;text-orientation:upright;font-style:normal}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box>i.add:before{content:\"添加\";color:#0075ff}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box>i.del:before{content:\"移除\";color:red}.sm-doc-editor[data-v-f24a2f4b] .lx-array-box .gi-item{display:block}.sm-doc-editor[data-v-f24a2f4b] .anchor{position:relative!important;color:#0075ff;cursor:pointer;padding:0 .5em;text-decoration:underline;overflow-wrap:break-word}.sm-doc-editor[data-v-f24a2f4b] .anchor>i{position:relative!important;top:-5px!important;font-size:14px!important;font-style:normal;color:red;pointer-events:none!important}.sm-doc-editor[data-v-f24a2f4b] .anchor.lx-array{display:block;width:100%;height:60px;border:1px solid red}.sm-doc-editor[data-v-f24a2f4b] .anchor.lx-textarea{white-space:normal}.sm-doc-editor[data-v-f24a2f4b] .anchor:before{content:\"\";display:inline-block;width:.8em;height:.8em;margin-right:.3em;transform:translateY(3px);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACdUlEQVR4AdxWv49NQRT+zvsD1CIKWhQSEYVKQ4fGikiISNAQ7HsbhcSKaNx9VlDYRjY6ttpERSOi00koNIgoJHqNdXxn7p1999fcO/e950dMzpk5M+fc831z3pt7p4e/3P5hAgNdxUC/ULVBzX++sYhXdAufv0u1PK8wp5vz8fUVGKgy6CB1E7VJzD8XDJjVbVjDU/o9yb1QfOZ8XaoEBvpk3Rtn/AiGDeUdfuIU/Z+oI8lhVAkoDowiW62PjLhOLYrtfKBX3eJQXpPECdrfqF6OeKNKQLDBO7PxNBKRgG7l+nIWlw4G3oNV8QZ/74tucSgvOR6nfqea3LPOtErAVvOayMP8tNEegW93cYpF9PWssxN5BsUx2iskfYGjk3YCLiyiK4P7RwQPWImTbrogqwSfcXbWTYdACDwD4c6XeQyP+ml+nJxAG3iKZmV/nJrFfjIC8eCFsucpjE9gCuBGZDwCceBL5T+cAZa1O4EYcMU8wc8honUjEAMOPMKCVN+OfZ3nSVCqfcCWPLduBHq4yQfTlwyNGnnOnadnvuwUXMuW7AN2JrMRT6Cve/jQYWq9KO4TfH+9M7waT6CH3cE0gkssu//kBsPqHPEEgJ2oa4pZ3JI7da6YtXgCil2lhG+hbue3S+udpvEE0gq8YPZFAu/j772DZR9758zjJJ5Aeicw4MsENiIuwaRdOwE7v5Og2KW0IUeVgOJ9Ac/Or11Sx9U1fIDlKCSFXeVgrUpAMLXyItzeeFeVQCLpFcpH/I4xkUM+bZWAeewPB6zQ/Eqdllguu5hIPmE9AYtIZAaJbKSGbsRd1y1X5WISJmAk/oD+/wTaivgLAAD//3FuT2sAAAAGSURBVAMAxRjlQccW8T0AAAAASUVORK5CYII=);background-size:100% 100%}.sm-doc-editor[data-v-f24a2f4b] .anchor.required.empty{padding:0 1em}.sm-doc-editor[data-v-f24a2f4b] .anchor.readonly{color:#333!important}.sm-doc-editor[data-v-f24a2f4b] .anchor.readonly:after{content:\"\"}.sm-doc-editor[data-v-f24a2f4b] .anchor.readonly:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABpklEQVR4AcxRPUsDQRCdmUsCktqfYGOwMihaqWBAmxSilYWiEFuxEKskjbZ2YiUIWgTRytq0gikSiIXYWiqCXT52fW/NhUQECxuPHWZ23sfdzJn88fmHBimRiZTZUTKK7pNmryFQs0fs+8RDIyTMDrxZw6sueu9vVHWHwTr0gJEzaNI3AFBSkUOAu+1uNwtBA8IcYhkmb+wRI4dc1OEEg1QUrQIoeufm284dg7Bn3t+CsY3YEO9PySFGDrm8AxOLomgJb6l4kXJHpCp4QNhEakKgDNTP5CCPkkMu79Saej8NoB45d4kcnwxIV/EF9QXrhEiGucetU2vmXAXNtFM9Qf46qjV8RRFbH4dojjWAJt5eQ5YeN02ttUQe1bm8qC5g9hIJWOA+8hP+SFPN7lALOGvIH4EDLu55asMSWcTLwX8/007nHbPPYPvrMN4S57IYYyRgImHZ1MBQggELfF6VJhBkxOwhpXqORc2K95MwKrNHjBxyqWH0DXghgP89BcEKxnhBL8dgzR4xctDrnyGDuNvqdq8xQgEx1osCezE+mH80GCT8Vn8CAAD//2SDmfEAAAAGSURBVAMAK/PSIYm0ORsAAAAASUVORK5CYII=)}.sm-doc-editor[data-v-f24a2f4b] .iconfont{margin-right:.5em}.sm-doc-editor .doc[data-v-f24a2f4b]{position:relative;height:calc(100% - 6rem);padding:1rem;overflow-y:auto;overflow-x:hidden;outline:none!important}.sm-doc-editor .footer[data-v-f24a2f4b]{position:absolute;bottom:0;width:100%;height:6rem;display:flex;justify-content:center;align-items:flex-end;gap:2rem}.sm-doc-editor .pv-dialog[data-v-f24a2f4b]{display:flex;flex-direction:column;min-width:500px;max-width:80%;min-height:50px;color:#fff;font-weight:16px;position:absolute;top:0;left:0;padding:.5rem 1rem 1rem;border-radius:5px;background-color:#000b;z-index:9999}.sm-doc-editor .pv-dialog .tip[data-v-f24a2f4b]{color:#ff0;font-size:12px}.sm-doc-editor .pv-dialog .btn-ok[data-v-f24a2f4b]{position:absolute;top:0;right:10px;font-size:14px;color:#0075ff;font-weight:700;cursor:pointer}.sm-doc-editor .pv-dialog[data-v-f24a2f4b]:before{content:\"\";position:absolute;bottom:-20px;left:56px;width:0;height:0;border:10px solid transparent;border-top:10px solid #000b;z-index:-1}.sm-table[data-v-25a8c8f1]{padding:2px;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}.sm-table .empty[data-v-25a8c8f1]{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#999;font-size:1.6rem}.sm-table .empty svg.icon[data-v-25a8c8f1]{width:160px;height:160px;opacity:.8}.sm-table .empty .tip[data-v-25a8c8f1]{font-size:16px}.sm-table[data-v-25a8c8f1] .n-data-table{flex:1;min-height:0}.sm-table[data-v-25a8c8f1] .n-data-table-table thead th{text-align:center;font-size:1.6rem;font-weight:600;color:#424242;background-color:#f5f5f5}.sm-table[data-v-25a8c8f1] .n-data-table-table tbody td{font-size:1.6rem!important;font-weight:400}.sm-table[data-v-25a8c8f1] .n-data-table .n-data-table-th{border-color:#e6e6e7!important}.sm-table[data-v-25a8c8f1] .n-base-icon{color:#333!important}.sm-table[data-v-25a8c8f1] .n-select{width:100px}.sm-table[data-v-25a8c8f1] .n-pagination{align-items:center!important}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();import { ref, getCurrentInstance, computed, watchEffect, nextTick, withDirectives, openBlock, createBlock, Transition, withCtx, renderSlot, vShow, defineComponent, createElementBlock, normalizeStyle, useCssVars, unref, useTemplateRef, toRefs, onMounted, reactive, onUnmounted, h, toDisplayString, resolveDynamicComponent, createElementVNode, mergeProps, Fragment, renderList, normalizeClass, isRef, createCommentVNode, createVNode, createTextVNode, toRaw, useAttrs, createSlots, withKeys, withModifiers, watch } from "vue";
|
|
2
|
+
import kit from "./kit.es.js";
|
|
3
|
+
import { NModal, useDialog, useLoadingBar, useMessage, useModal, useNotification, NMessageProvider, NDialogProvider, NNotificationProvider, NLoadingBarProvider, NModalProvider, NNumberAnimation, NTabs, NTabPane, NCheckboxGroup, NSpace, NCheckbox, NIcon, NButton, NDropdown, NSteps, NStep, NConfigProvider, dateZhCN, zhCN, NForm, NDivider, NFormItem, NSelect, NInput, NInputNumber, NRadioGroup, NRadio, NDatePicker, NInputOtp, NCascader, NTreeSelect, NSwitch, NDynamicTags, NRate, NTooltip, NDataTable } from "naive-ui";
|
|
4
|
+
import { useThrottleFn } from "@vueuse/core";
|
|
5
|
+
const withInstall = (cpnt2) => {
|
|
6
|
+
cpnt2.install = (app) => {
|
|
7
|
+
const name = (cpnt2.name || cpnt2.__name).replace(/(^\w|-\w)/g, (b) => b.slice(-1).toUpperCase());
|
|
8
|
+
app.component(name, cpnt2);
|
|
9
|
+
};
|
|
10
|
+
return cpnt2;
|
|
11
|
+
};
|
|
12
|
+
const __default__$g = defineComponent({
|
|
13
|
+
name: "sm-transition"
|
|
14
|
+
});
|
|
15
|
+
const _sfc_main$l = /* @__PURE__ */ Object.assign(__default__$g, {
|
|
16
|
+
props: {
|
|
17
|
+
enter: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: () => "fadeIn"
|
|
20
|
+
},
|
|
21
|
+
exits: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: () => "fadeOut"
|
|
24
|
+
},
|
|
25
|
+
k: {
|
|
26
|
+
type: [Boolean, Number, String]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup(__props) {
|
|
30
|
+
const ani = "animate__animated animate__";
|
|
31
|
+
const kk = ref(true);
|
|
32
|
+
const props = __props;
|
|
33
|
+
const { proxy } = getCurrentInstance();
|
|
34
|
+
const amKey = computed(() => {
|
|
35
|
+
var _a, _b, _c;
|
|
36
|
+
return props.k === void 0 ? (_c = (_b = (_a = proxy == null ? void 0 : proxy.$router) == null ? void 0 : _a.currentRoute) == null ? void 0 : _b.value) == null ? void 0 : _c.fullPath : props.k;
|
|
37
|
+
});
|
|
38
|
+
watchEffect(() => {
|
|
39
|
+
amKey.value;
|
|
40
|
+
nextTick(() => {
|
|
41
|
+
kk.value = false;
|
|
42
|
+
nextTick(() => kk.value = true);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return withDirectives((openBlock(), createBlock(Transition, {
|
|
47
|
+
appear: "",
|
|
48
|
+
mode: "out-in",
|
|
49
|
+
duration: { enter: 1e3, leave: 1e3 },
|
|
50
|
+
"enter-active-class": ani + props.enter,
|
|
51
|
+
"leave-active-class": ani + props.exits
|
|
52
|
+
}, {
|
|
53
|
+
default: withCtx(() => [
|
|
54
|
+
renderSlot(_ctx.$slots, "default")
|
|
55
|
+
]),
|
|
56
|
+
_: 3
|
|
57
|
+
}, 8, ["enter-active-class", "leave-active-class"])), [
|
|
58
|
+
[vShow, kk.value]
|
|
59
|
+
]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const SmTransition = withInstall(_sfc_main$l);
|
|
64
|
+
const _export_sfc = (sfc, props) => {
|
|
65
|
+
const target = sfc.__vccOpts || sfc;
|
|
66
|
+
for (const [key, val] of props) {
|
|
67
|
+
target[key] = val;
|
|
68
|
+
}
|
|
69
|
+
return target;
|
|
70
|
+
};
|
|
71
|
+
const __default__$f = defineComponent({
|
|
72
|
+
name: "sm-viewport"
|
|
73
|
+
});
|
|
74
|
+
const _sfc_main$k = /* @__PURE__ */ Object.assign(__default__$f, {
|
|
75
|
+
props: {
|
|
76
|
+
size: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "1920*1080"
|
|
79
|
+
},
|
|
80
|
+
root: Object
|
|
81
|
+
},
|
|
82
|
+
setup(__props) {
|
|
83
|
+
const props = __props;
|
|
84
|
+
const resize = () => {
|
|
85
|
+
var _a;
|
|
86
|
+
const [pw, ph] = (_a = props.size.split("*")) == null ? void 0 : _a.map((v) => +v);
|
|
87
|
+
const [vpw, vph] = !props.root ? [innerWidth, innerHeight] : [props.root.offsetWidth, props.root.offsetHeight];
|
|
88
|
+
return {
|
|
89
|
+
width: `${pw}px`,
|
|
90
|
+
height: `${ph}px`,
|
|
91
|
+
transform: `scale(${vpw / pw}, ${vph / ph})`
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
const vpStyle = ref(resize());
|
|
95
|
+
window.addEventListener("resize", () => vpStyle.value = resize());
|
|
96
|
+
return (_ctx, _cache) => {
|
|
97
|
+
return openBlock(), createElementBlock("div", {
|
|
98
|
+
class: "sm-viewport",
|
|
99
|
+
style: normalizeStyle(vpStyle.value),
|
|
100
|
+
onContextmenu: _cache[0] || (_cache[0] = (e) => e.preventDefault())
|
|
101
|
+
}, [
|
|
102
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
103
|
+
], 36);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const cpnt$d = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-cc29b04b"]]);
|
|
108
|
+
const SmViewport = withInstall(cpnt$d);
|
|
109
|
+
const _hoisted_1$d = {
|
|
110
|
+
ref: "box",
|
|
111
|
+
class: "sm-grid-layout"
|
|
112
|
+
};
|
|
113
|
+
const __default__$e = defineComponent({
|
|
114
|
+
name: "sm-grid-layout"
|
|
115
|
+
});
|
|
116
|
+
const _sfc_main$j = /* @__PURE__ */ Object.assign(__default__$e, {
|
|
117
|
+
props: {
|
|
118
|
+
matrix: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: ""
|
|
121
|
+
},
|
|
122
|
+
gap: {
|
|
123
|
+
type: [Number, String],
|
|
124
|
+
default: 0
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
setup(__props) {
|
|
128
|
+
useCssVars((_ctx) => ({
|
|
129
|
+
"v09cc6e9c": unref(gridGap),
|
|
130
|
+
"v1bd3d118": unref(templateAreas)
|
|
131
|
+
}));
|
|
132
|
+
const boxEl = useTemplateRef("box");
|
|
133
|
+
const props = __props;
|
|
134
|
+
const { matrix } = toRefs(props);
|
|
135
|
+
const gridGap = computed(() => props.gap + "px");
|
|
136
|
+
const templateAreas = computed(() => {
|
|
137
|
+
let res = "";
|
|
138
|
+
try {
|
|
139
|
+
res = matrix.value.split(/\n/g).filter((x) => x).map((x) => x.trim()).map((x) => `"${x}"`).join("\n");
|
|
140
|
+
} catch (e) {
|
|
141
|
+
console.log("sm-grid-layout: matrix error!", e);
|
|
142
|
+
}
|
|
143
|
+
return res;
|
|
144
|
+
});
|
|
145
|
+
const mapChildren = () => {
|
|
146
|
+
try {
|
|
147
|
+
[...boxEl.value.children].forEach((o, i) => {
|
|
148
|
+
const mx = o.attributes.k.nodeValue;
|
|
149
|
+
o.classList.add(`item-${mx}`);
|
|
150
|
+
o.style.gridArea = mx;
|
|
151
|
+
});
|
|
152
|
+
} catch (e) {
|
|
153
|
+
console.error(e);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
onMounted(() => {
|
|
157
|
+
mapChildren();
|
|
158
|
+
});
|
|
159
|
+
return (_ctx, _cache) => {
|
|
160
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
161
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
162
|
+
], 512);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
const cpnt$c = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-4dc48ed4"]]);
|
|
167
|
+
const SmGridLayout = withInstall(cpnt$c);
|
|
168
|
+
const __default__$d = defineComponent({
|
|
169
|
+
name: "sm-echarts"
|
|
170
|
+
});
|
|
171
|
+
const _sfc_main$i = /* @__PURE__ */ Object.assign(__default__$d, {
|
|
172
|
+
props: {
|
|
173
|
+
config: Object
|
|
174
|
+
},
|
|
175
|
+
emits: ["update:config"],
|
|
176
|
+
setup(__props, { emit: __emit }) {
|
|
177
|
+
const props = __props;
|
|
178
|
+
const cfg = computed(() => {
|
|
179
|
+
var _a;
|
|
180
|
+
const { mapType, geoJson, events, useSvg, option: optionFn } = (_a = props.config) != null ? _a : {};
|
|
181
|
+
return {
|
|
182
|
+
mapType,
|
|
183
|
+
geoJson,
|
|
184
|
+
events: events != null ? events : [],
|
|
185
|
+
useSvg: useSvg != null ? useSvg : false,
|
|
186
|
+
optionFn: optionFn != null ? optionFn : (echarts2) => ({})
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
const $emit = __emit;
|
|
190
|
+
const dom = ref(null);
|
|
191
|
+
const myChart = ref(null);
|
|
192
|
+
const ecInit = () => {
|
|
193
|
+
var _a;
|
|
194
|
+
return echarts.init(dom.value, {
|
|
195
|
+
devicePixelRatio: (_a = window.devicePixelRatio) != null ? _a : 1,
|
|
196
|
+
renderer: cfg.value.useSvg ? "svg" : "canvas"
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
const ecClear = () => myChart.value.clear();
|
|
200
|
+
const _mapReg = reactive({});
|
|
201
|
+
const isMap = computed(() => {
|
|
202
|
+
const { mapType, geoJson } = cfg.value;
|
|
203
|
+
return mapType && geoJson;
|
|
204
|
+
});
|
|
205
|
+
const ecRender = (opts) => {
|
|
206
|
+
var _a;
|
|
207
|
+
const { mapType, geoJson, optionFn } = cfg.value;
|
|
208
|
+
if (isMap.value && !_mapReg[mapType]) {
|
|
209
|
+
echarts.registerMap(mapType, geoJson);
|
|
210
|
+
_mapReg[mapType] = true;
|
|
211
|
+
}
|
|
212
|
+
try {
|
|
213
|
+
ecClear();
|
|
214
|
+
myChart.value.setOption((_a = opts != null ? opts : optionFn == null ? void 0 : optionFn(echarts)) != null ? _a : {}, true);
|
|
215
|
+
} catch (error) {
|
|
216
|
+
console.log("sm-echarts:", error);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
const resizeFn = () => {
|
|
220
|
+
var _a, _b;
|
|
221
|
+
return (_b = (_a = myChart.value) == null ? void 0 : _a.resize) == null ? void 0 : _b.call(_a);
|
|
222
|
+
};
|
|
223
|
+
onMounted(() => {
|
|
224
|
+
var _a;
|
|
225
|
+
window.addEventListener("resize", resizeFn);
|
|
226
|
+
try {
|
|
227
|
+
myChart.value = ecInit(dom.value);
|
|
228
|
+
cfg.value.events.forEach((e) => {
|
|
229
|
+
var _a2, _b;
|
|
230
|
+
return (_b = (_a2 = myChart.value) == null ? void 0 : _a2.on) == null ? void 0 : _b.call(_a2, e.type, (...args) => {
|
|
231
|
+
var _a3;
|
|
232
|
+
return (_a3 = e == null ? void 0 : e.callback) == null ? void 0 : _a3.call(e, ...args);
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
} catch (error) {
|
|
236
|
+
console.log("sm-echarts:", error);
|
|
237
|
+
}
|
|
238
|
+
Object.assign((_a = props.config) != null ? _a : {}, {
|
|
239
|
+
vmBox: dom.value,
|
|
240
|
+
vmSelf: myChart.value,
|
|
241
|
+
vmRender: (o) => ecRender(o),
|
|
242
|
+
vmClear: () => ecClear()
|
|
243
|
+
});
|
|
244
|
+
$emit("update:config", props.config);
|
|
245
|
+
});
|
|
246
|
+
onUnmounted(() => {
|
|
247
|
+
window.removeEventListener("resize", resizeFn);
|
|
248
|
+
});
|
|
249
|
+
return (_ctx, _cache) => {
|
|
250
|
+
return openBlock(), createElementBlock("div", {
|
|
251
|
+
class: "sm-echarts",
|
|
252
|
+
ref_key: "dom",
|
|
253
|
+
ref: dom
|
|
254
|
+
}, null, 512);
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
const cpnt$b = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-d819e9ca"]]);
|
|
259
|
+
const SmEcharts = withInstall(cpnt$b);
|
|
260
|
+
const missCpntTip = (pkgName, msg = []) => {
|
|
261
|
+
return h("div", {
|
|
262
|
+
style: {
|
|
263
|
+
color: "#ff4d4f",
|
|
264
|
+
padding: "20px",
|
|
265
|
+
fontSize: "14px",
|
|
266
|
+
textAlign: "center",
|
|
267
|
+
background: "#fff2f0",
|
|
268
|
+
lineHeight: 2,
|
|
269
|
+
border: "1px solid #ffccc7"
|
|
270
|
+
}
|
|
271
|
+
}, [
|
|
272
|
+
h("p", "⚠️ 缺少依赖"),
|
|
273
|
+
h("p", `请运行:pnpm add ${pkgName} 安装`),
|
|
274
|
+
h("p", `导入后,将 ${pkgName} 实例,传递到该组件 props.extc 中。`),
|
|
275
|
+
...msg.map((x) => h("p", { style: { fontSize: "12px", color: "#0075ff" } }, x))
|
|
276
|
+
]);
|
|
277
|
+
};
|
|
278
|
+
const _weeks = "日一二三四五六".split("");
|
|
279
|
+
const getDateTime = (p) => {
|
|
280
|
+
const n = p ? new Date(p) : /* @__PURE__ */ new Date();
|
|
281
|
+
const [mm, dd, hh, mi, ss] = [n.getMonth() + 1, n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds()].map((n2) => (n2 + "").padStart(2, "0"));
|
|
282
|
+
const ww = n.getDay();
|
|
283
|
+
return {
|
|
284
|
+
yy: n.getFullYear(),
|
|
285
|
+
wk: _weeks.at(ww),
|
|
286
|
+
ww,
|
|
287
|
+
mm,
|
|
288
|
+
dd,
|
|
289
|
+
hh,
|
|
290
|
+
mi,
|
|
291
|
+
ss
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
const startInterval = (callback, delay, immediate) => {
|
|
295
|
+
requestAnimationFrame(callback);
|
|
296
|
+
let [startTime, lastTime, _stop] = [0, 0, false];
|
|
297
|
+
(function step(timestamp) {
|
|
298
|
+
if (!startTime) {
|
|
299
|
+
startTime = timestamp;
|
|
300
|
+
lastTime = startTime;
|
|
301
|
+
}
|
|
302
|
+
const progress = timestamp - lastTime;
|
|
303
|
+
if (progress >= delay * 1e3) {
|
|
304
|
+
callback(timestamp);
|
|
305
|
+
lastTime = timestamp - progress % (delay * 1e3);
|
|
306
|
+
}
|
|
307
|
+
!_stop && requestAnimationFrame(step);
|
|
308
|
+
})();
|
|
309
|
+
return () => _stop = true;
|
|
310
|
+
};
|
|
311
|
+
const groupBy = kit.arrayGroupBy;
|
|
312
|
+
const deepClone = kit.deepClone;
|
|
313
|
+
kit.getUuid;
|
|
314
|
+
const _hoisted_1$c = { class: "sm-datetime" };
|
|
315
|
+
const __default__$c = defineComponent({
|
|
316
|
+
name: "sm-datetime"
|
|
317
|
+
});
|
|
318
|
+
const _sfc_main$h = /* @__PURE__ */ Object.assign(__default__$c, {
|
|
319
|
+
props: {
|
|
320
|
+
format: {
|
|
321
|
+
type: String,
|
|
322
|
+
default: "yyyy-mm-dd hh:mi:ss"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
setup(__props) {
|
|
326
|
+
const props = __props;
|
|
327
|
+
const { format } = toRefs(props);
|
|
328
|
+
const dd = ref({});
|
|
329
|
+
const stopFn = startInterval(() => dd.value = getDateTime(), 1);
|
|
330
|
+
const datetime = computed(() => {
|
|
331
|
+
var _a, _b, _c;
|
|
332
|
+
const str = (_c = (_b = (_a = format.value) == null ? void 0 : _a.toLowerCase) == null ? void 0 : _b.call(_a)) != null ? _c : "yyyy-mm-dd hh:mi:ss";
|
|
333
|
+
return str.replace(/[a-z]+/g, (k) => dd.value[k.repeat(2).slice(-2)]);
|
|
334
|
+
});
|
|
335
|
+
onUnmounted(() => stopFn());
|
|
336
|
+
return (_ctx, _cache) => {
|
|
337
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, toDisplayString(datetime.value), 1);
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
const cpnt$a = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-813fc31a"]]);
|
|
342
|
+
const SmDatetime = withInstall(cpnt$a);
|
|
343
|
+
const _hoisted_1$b = {
|
|
344
|
+
key: 1,
|
|
345
|
+
class: "smx-rolling"
|
|
346
|
+
};
|
|
347
|
+
const _hoisted_2$a = { class: "sm_header" };
|
|
348
|
+
const __default__$b = defineComponent({
|
|
349
|
+
name: "smx-rolling"
|
|
350
|
+
});
|
|
351
|
+
const _sfc_main$g = /* @__PURE__ */ Object.assign(__default__$b, {
|
|
352
|
+
props: {
|
|
353
|
+
extc: Object,
|
|
354
|
+
dataList: {
|
|
355
|
+
type: Array,
|
|
356
|
+
default: () => []
|
|
357
|
+
},
|
|
358
|
+
speed: {
|
|
359
|
+
type: [Number, String],
|
|
360
|
+
default: 5
|
|
361
|
+
},
|
|
362
|
+
pageSize: {
|
|
363
|
+
type: [Number, String],
|
|
364
|
+
default: 5
|
|
365
|
+
},
|
|
366
|
+
nativeOpts: Object
|
|
367
|
+
},
|
|
368
|
+
setup(__props) {
|
|
369
|
+
const missCpntTip$1 = missCpntTip("vue3-seamless-scroll");
|
|
370
|
+
const props = __props;
|
|
371
|
+
const { dataList, speed, pageSize, nativeOpts, extc } = toRefs(props);
|
|
372
|
+
const configs = computed(() => {
|
|
373
|
+
var _a, _b, _c;
|
|
374
|
+
const native = (_a = nativeOpts.value) != null ? _a : {};
|
|
375
|
+
delete native.list;
|
|
376
|
+
return {
|
|
377
|
+
step: speed.value / 10,
|
|
378
|
+
direction: "up",
|
|
379
|
+
hover: true,
|
|
380
|
+
limitScrollNum: (_b = pageSize.value) != null ? _b : 5,
|
|
381
|
+
ease: "ease-in-out",
|
|
382
|
+
singleHeight: 0,
|
|
383
|
+
singleWaitTime: 2e3,
|
|
384
|
+
wheel: true,
|
|
385
|
+
list: dataList.value,
|
|
386
|
+
...native,
|
|
387
|
+
// 数据量在 20 条以下时,可以复制一套
|
|
388
|
+
copyNum: ((_c = dataList.value) == null ? void 0 : _c.length) > 20 ? 0 : 1
|
|
389
|
+
};
|
|
390
|
+
});
|
|
391
|
+
return (_ctx, _cache) => {
|
|
392
|
+
return !unref(extc) ? (openBlock(), createBlock(resolveDynamicComponent(unref(missCpntTip$1)), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
393
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
394
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
395
|
+
]),
|
|
396
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.asyncCpnt), mergeProps({
|
|
397
|
+
class: "sm_content",
|
|
398
|
+
list: []
|
|
399
|
+
}, configs.value), {
|
|
400
|
+
default: withCtx(() => [
|
|
401
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(dataList), (item, idx) => {
|
|
402
|
+
var _a;
|
|
403
|
+
return openBlock(), createElementBlock("div", {
|
|
404
|
+
class: "sm_item",
|
|
405
|
+
key: (_a = item.id) != null ? _a : idx
|
|
406
|
+
}, [
|
|
407
|
+
renderSlot(_ctx.$slots, "default", {
|
|
408
|
+
item,
|
|
409
|
+
index: idx
|
|
410
|
+
}, void 0, true)
|
|
411
|
+
]);
|
|
412
|
+
}), 128))
|
|
413
|
+
]),
|
|
414
|
+
_: 3
|
|
415
|
+
}, 16))
|
|
416
|
+
]));
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
const cpnt$9 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-1e3f1e1d"]]);
|
|
421
|
+
const SmxRolling = withInstall(cpnt$9);
|
|
422
|
+
const _hoisted_1$a = ["onClick", "innerHTML"];
|
|
423
|
+
const _hoisted_2$9 = ["title", "onClick", "innerHTML"];
|
|
424
|
+
const __default__$a = defineComponent({
|
|
425
|
+
name: "smx-rolling-list"
|
|
426
|
+
});
|
|
427
|
+
const _sfc_main$f = /* @__PURE__ */ Object.assign(__default__$a, {
|
|
428
|
+
props: {
|
|
429
|
+
// 外部组件
|
|
430
|
+
extc: Object,
|
|
431
|
+
columns: {
|
|
432
|
+
type: Array,
|
|
433
|
+
default: () => []
|
|
434
|
+
},
|
|
435
|
+
dataList: {
|
|
436
|
+
type: Array,
|
|
437
|
+
default: () => []
|
|
438
|
+
},
|
|
439
|
+
borderStyle: {
|
|
440
|
+
type: String,
|
|
441
|
+
default: "1px solid #ddd"
|
|
442
|
+
},
|
|
443
|
+
speed: {
|
|
444
|
+
type: [Number, String],
|
|
445
|
+
default: 5
|
|
446
|
+
},
|
|
447
|
+
singleHeight: {
|
|
448
|
+
type: [Number, String],
|
|
449
|
+
default: 33
|
|
450
|
+
},
|
|
451
|
+
pageSize: {
|
|
452
|
+
type: [Number, String],
|
|
453
|
+
default: 5
|
|
454
|
+
},
|
|
455
|
+
nativeOpts: Object
|
|
456
|
+
},
|
|
457
|
+
emits: ["click-th", "click-td"],
|
|
458
|
+
setup(__props, { emit: __emit }) {
|
|
459
|
+
useCssVars((_ctx) => ({
|
|
460
|
+
"v0548d55a": unref(borderStyle)
|
|
461
|
+
}));
|
|
462
|
+
missCpntTip("vue3-seamless-scroll");
|
|
463
|
+
const _isFunc = (p) => typeof p === "function";
|
|
464
|
+
const _removeScript = (str) => str.replace(/<\s*script\s+.*/gmi, "**");
|
|
465
|
+
const $emit = __emit;
|
|
466
|
+
const props = __props;
|
|
467
|
+
const { columns, dataList, borderStyle, singleHeight, speed, pageSize, nativeOpts, extc } = toRefs(props);
|
|
468
|
+
const configs = computed(() => {
|
|
469
|
+
var _a;
|
|
470
|
+
return {
|
|
471
|
+
nativeOpts: {
|
|
472
|
+
singleHeight: (_a = singleHeight.value) != null ? _a : 33,
|
|
473
|
+
...nativeOpts.value
|
|
474
|
+
},
|
|
475
|
+
dataList: dataList.value,
|
|
476
|
+
pageSize: pageSize.value,
|
|
477
|
+
speed: speed.value
|
|
478
|
+
};
|
|
479
|
+
});
|
|
480
|
+
const cellFormat_th = (o, i) => {
|
|
481
|
+
var _a;
|
|
482
|
+
return (_a = _isFunc(o.label) ? _removeScript(o.label(o, i)) : o.label) != null ? _a : "-";
|
|
483
|
+
};
|
|
484
|
+
const onClickTh = (o, i) => $emit("click-th", { ...o, _index: i });
|
|
485
|
+
const cellFormat_td = (c, o, i) => {
|
|
486
|
+
var _a;
|
|
487
|
+
if (c.slot) return `[this is slot.]`;
|
|
488
|
+
return (_a = _isFunc(c.formatter) ? _removeScript(c.formatter(o[c.code], i, o)) : o[c.code]) != null ? _a : "-";
|
|
489
|
+
};
|
|
490
|
+
const onClickTd = (value, index2, item) => $emit("click-td", { value, index: index2, item });
|
|
491
|
+
const cellStyle = (o) => {
|
|
492
|
+
const css = {};
|
|
493
|
+
if (!o.width || o.width === "auto") {
|
|
494
|
+
css.flex = 1;
|
|
495
|
+
} else {
|
|
496
|
+
css.width = o.width;
|
|
497
|
+
}
|
|
498
|
+
if (o.align) {
|
|
499
|
+
css.textAlign = o.align;
|
|
500
|
+
}
|
|
501
|
+
return css;
|
|
502
|
+
};
|
|
503
|
+
return (_ctx, _cache) => {
|
|
504
|
+
return openBlock(), createBlock(unref(SmxRolling), mergeProps({
|
|
505
|
+
class: ["smx-rolling-list", { border: unref(borderStyle) }]
|
|
506
|
+
}, configs.value), {
|
|
507
|
+
header: withCtx(() => [
|
|
508
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(columns), (th, idx) => {
|
|
509
|
+
var _a, _b;
|
|
510
|
+
return openBlock(), createElementBlock("div", {
|
|
511
|
+
key: (_a = th.code) != null ? _a : idx,
|
|
512
|
+
class: normalizeClass(`sm_th ${(_b = th.code) != null ? _b : ""}`),
|
|
513
|
+
style: normalizeStyle(cellStyle(th)),
|
|
514
|
+
onClick: ($event) => onClickTh(th, idx),
|
|
515
|
+
innerHTML: cellFormat_th(th, idx)
|
|
516
|
+
}, null, 14, _hoisted_1$a);
|
|
517
|
+
}), 128))
|
|
518
|
+
]),
|
|
519
|
+
default: withCtx(({ item, index: index2 }) => [
|
|
520
|
+
createElementVNode("div", {
|
|
521
|
+
class: normalizeClass(`sm_tr sm_tr_${index2}`)
|
|
522
|
+
}, [
|
|
523
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(columns), (th, idx) => {
|
|
524
|
+
var _a;
|
|
525
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
526
|
+
key: `sm_tr_${index2} td_${(_a = th.code) != null ? _a : idx}`
|
|
527
|
+
}, [
|
|
528
|
+
!th.slot ? (openBlock(), createElementBlock("div", {
|
|
529
|
+
key: 0,
|
|
530
|
+
class: normalizeClass([`sm_td sm_td_${index2}_${idx}`, { sm_nowrap: !th.wrap }]),
|
|
531
|
+
style: normalizeStyle(cellStyle(th)),
|
|
532
|
+
title: !th.wrap ? item[th.code] : void 0,
|
|
533
|
+
onClick: ($event) => onClickTd(item[th.code], index2, item),
|
|
534
|
+
innerHTML: cellFormat_td(th, item, index2)
|
|
535
|
+
}, null, 14, _hoisted_2$9)) : (openBlock(), createElementBlock("div", {
|
|
536
|
+
key: 1,
|
|
537
|
+
class: normalizeClass([`sm_td sm_td_${index2}_${idx}`, { sm_nowrap: !th.wrap }]),
|
|
538
|
+
style: normalizeStyle(cellStyle(th))
|
|
539
|
+
}, [
|
|
540
|
+
renderSlot(_ctx.$slots, th.slot, {
|
|
541
|
+
value: item[th.code],
|
|
542
|
+
index: index2,
|
|
543
|
+
item
|
|
544
|
+
}, void 0, true)
|
|
545
|
+
], 6))
|
|
546
|
+
], 64);
|
|
547
|
+
}), 128))
|
|
548
|
+
], 2)
|
|
549
|
+
]),
|
|
550
|
+
_: 3
|
|
551
|
+
}, 16, ["class"]);
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
const cpnt$8 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-58af9f55"]]);
|
|
556
|
+
const SmxRollingList = withInstall(cpnt$8);
|
|
557
|
+
const _hoisted_1$9 = {
|
|
558
|
+
key: 1,
|
|
559
|
+
class: "smx-file-viewer"
|
|
560
|
+
};
|
|
561
|
+
const _hoisted_2$8 = { class: "smx-file-viewer__container" };
|
|
562
|
+
const __default__$9 = defineComponent({
|
|
563
|
+
name: "smx-file-viewer"
|
|
564
|
+
});
|
|
565
|
+
const _sfc_main$e = /* @__PURE__ */ Object.assign(__default__$9, {
|
|
566
|
+
props: {
|
|
567
|
+
// 外部组件
|
|
568
|
+
extc: Object,
|
|
569
|
+
source: { type: Object, required: true },
|
|
570
|
+
visible: { type: Boolean, default: false },
|
|
571
|
+
title: { type: String, default: "文件预览" },
|
|
572
|
+
mode: { type: String, validator: (v) => ["page", "dialog"].includes(v), default: "page" }
|
|
573
|
+
},
|
|
574
|
+
emits: ["update:visible"],
|
|
575
|
+
setup(__props, { emit: __emit }) {
|
|
576
|
+
const missCpntTip$1 = missCpntTip(
|
|
577
|
+
"vue-files-preview",
|
|
578
|
+
[
|
|
579
|
+
`import { VueFilesPreview } from 'vue-files-preview'`,
|
|
580
|
+
`import 'vue-files-preview/umd/style.css'`
|
|
581
|
+
]
|
|
582
|
+
);
|
|
583
|
+
const props = __props;
|
|
584
|
+
const { visible, source, title, mode, extc } = toRefs(props);
|
|
585
|
+
const $emit = __emit;
|
|
586
|
+
const onClose = () => $emit("update:visible", false);
|
|
587
|
+
return (_ctx, _cache) => {
|
|
588
|
+
const _component_n_modal = NModal;
|
|
589
|
+
return !unref(extc) ? (openBlock(), createBlock(resolveDynamicComponent(unref(missCpntTip$1)), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
590
|
+
unref(mode) === "dialog" ? (openBlock(), createBlock(_component_n_modal, {
|
|
591
|
+
key: 0,
|
|
592
|
+
show: unref(visible),
|
|
593
|
+
"onUpdate:show": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null),
|
|
594
|
+
preset: "dialog",
|
|
595
|
+
title: unref(title),
|
|
596
|
+
style: { width: "80vw" },
|
|
597
|
+
onClose
|
|
598
|
+
}, {
|
|
599
|
+
default: withCtx(() => [
|
|
600
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
601
|
+
unref(source) ? (openBlock(), createBlock(resolveDynamicComponent(unref(extc)), {
|
|
602
|
+
key: 0,
|
|
603
|
+
width: "100%",
|
|
604
|
+
height: "100%",
|
|
605
|
+
file: unref(source),
|
|
606
|
+
"show-tool-bar": "",
|
|
607
|
+
"show-print": "",
|
|
608
|
+
"show-download": "",
|
|
609
|
+
"show-zoom": ""
|
|
610
|
+
}, null, 8, ["file"])) : createCommentVNode("", true)
|
|
611
|
+
])
|
|
612
|
+
]),
|
|
613
|
+
_: 1
|
|
614
|
+
}, 8, ["show", "title"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(extc)), {
|
|
615
|
+
key: unref(source),
|
|
616
|
+
width: "100%",
|
|
617
|
+
height: "100%",
|
|
618
|
+
file: unref(source),
|
|
619
|
+
"show-tool-bar": "",
|
|
620
|
+
"show-print": "",
|
|
621
|
+
"show-download": "",
|
|
622
|
+
"show-zoom": ""
|
|
623
|
+
}, null, 8, ["file"]))
|
|
624
|
+
]));
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
const SmxFileViewer = withInstall(_sfc_main$e);
|
|
629
|
+
const _sfc_main$d = defineComponent({
|
|
630
|
+
setup() {
|
|
631
|
+
window.$dialog = useDialog();
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
635
|
+
return null;
|
|
636
|
+
}
|
|
637
|
+
const IcDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$4]]);
|
|
638
|
+
const _sfc_main$c = defineComponent({
|
|
639
|
+
setup() {
|
|
640
|
+
window.$loadingbar = useLoadingBar();
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
644
|
+
return null;
|
|
645
|
+
}
|
|
646
|
+
const IcLoadingBar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$3]]);
|
|
647
|
+
const _sfc_main$b = defineComponent({
|
|
648
|
+
setup() {
|
|
649
|
+
window.$messager = useMessage();
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
const IcMessager = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$2]]);
|
|
656
|
+
const _sfc_main$a = defineComponent({
|
|
657
|
+
setup() {
|
|
658
|
+
window.$modal = useModal();
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
662
|
+
return null;
|
|
663
|
+
}
|
|
664
|
+
const IcModal = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$1]]);
|
|
665
|
+
const _sfc_main$9 = defineComponent({
|
|
666
|
+
setup() {
|
|
667
|
+
window.$notice = useNotification();
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
671
|
+
return null;
|
|
672
|
+
}
|
|
673
|
+
const IcNotice = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render]]);
|
|
674
|
+
const _hoisted_1$8 = { class: "sm-feedback" };
|
|
675
|
+
const __default__$8 = defineComponent({
|
|
676
|
+
name: "sm-feedback"
|
|
677
|
+
});
|
|
678
|
+
const _sfc_main$8 = /* @__PURE__ */ Object.assign(__default__$8, {
|
|
679
|
+
setup(__props) {
|
|
680
|
+
return (_ctx, _cache) => {
|
|
681
|
+
const _component_n_message_provider = NMessageProvider;
|
|
682
|
+
const _component_n_dialog_provider = NDialogProvider;
|
|
683
|
+
const _component_n_notification_provider = NNotificationProvider;
|
|
684
|
+
const _component_n_loading_bar_provider = NLoadingBarProvider;
|
|
685
|
+
const _component_n_modal_provider = NModalProvider;
|
|
686
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
687
|
+
createVNode(_component_n_message_provider, {
|
|
688
|
+
placement: "top",
|
|
689
|
+
max: 5
|
|
690
|
+
}, {
|
|
691
|
+
default: withCtx(() => [
|
|
692
|
+
createVNode(IcMessager)
|
|
693
|
+
]),
|
|
694
|
+
_: 1
|
|
695
|
+
}),
|
|
696
|
+
createVNode(_component_n_dialog_provider, null, {
|
|
697
|
+
default: withCtx(() => [
|
|
698
|
+
createVNode(IcDialog)
|
|
699
|
+
]),
|
|
700
|
+
_: 1
|
|
701
|
+
}),
|
|
702
|
+
createVNode(_component_n_notification_provider, { "container-class": "sm-notice" }, {
|
|
703
|
+
default: withCtx(() => [
|
|
704
|
+
createVNode(IcNotice)
|
|
705
|
+
]),
|
|
706
|
+
_: 1
|
|
707
|
+
}),
|
|
708
|
+
createVNode(_component_n_loading_bar_provider, null, {
|
|
709
|
+
default: withCtx(() => [
|
|
710
|
+
createVNode(IcLoadingBar)
|
|
711
|
+
]),
|
|
712
|
+
_: 1
|
|
713
|
+
}),
|
|
714
|
+
createVNode(_component_n_modal_provider, null, {
|
|
715
|
+
default: withCtx(() => [
|
|
716
|
+
createVNode(IcModal)
|
|
717
|
+
]),
|
|
718
|
+
_: 1
|
|
719
|
+
})
|
|
720
|
+
]);
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
const SmFeedback = withInstall(_sfc_main$8);
|
|
725
|
+
const _hoisted_1$7 = { class: "sm-rolling-num" };
|
|
726
|
+
const _hoisted_2$7 = {
|
|
727
|
+
key: 0,
|
|
728
|
+
class: "sm_prefix"
|
|
729
|
+
};
|
|
730
|
+
const _hoisted_3$6 = {
|
|
731
|
+
key: 1,
|
|
732
|
+
class: "sm_suffix"
|
|
733
|
+
};
|
|
734
|
+
const __default__$7 = defineComponent({
|
|
735
|
+
name: "sm-rolling-num"
|
|
736
|
+
});
|
|
737
|
+
const _sfc_main$7 = /* @__PURE__ */ Object.assign(__default__$7, {
|
|
738
|
+
props: {
|
|
739
|
+
from: {
|
|
740
|
+
type: Number,
|
|
741
|
+
default: 0
|
|
742
|
+
},
|
|
743
|
+
to: Number,
|
|
744
|
+
duration: {
|
|
745
|
+
type: Number,
|
|
746
|
+
default: 1e3
|
|
747
|
+
},
|
|
748
|
+
prefix: String,
|
|
749
|
+
suffix: String,
|
|
750
|
+
separator: {
|
|
751
|
+
type: Boolean,
|
|
752
|
+
default: false
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
emits: ["finish"],
|
|
756
|
+
setup(__props, { emit: __emit }) {
|
|
757
|
+
const $emit = __emit;
|
|
758
|
+
const props = __props;
|
|
759
|
+
const { from, to, duration, separator, prefix, suffix } = toRefs(props);
|
|
760
|
+
const precision = computed(() => {
|
|
761
|
+
var _a, _b;
|
|
762
|
+
return (_b = (_a = (to.value + "").split(".").at(1)) == null ? void 0 : _a.length) != null ? _b : 0;
|
|
763
|
+
});
|
|
764
|
+
const onFinish = () => $emit("finish");
|
|
765
|
+
return (_ctx, _cache) => {
|
|
766
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
767
|
+
unref(prefix) ? (openBlock(), createElementBlock("span", _hoisted_2$7, toDisplayString(unref(prefix)), 1)) : createCommentVNode("", true),
|
|
768
|
+
createVNode(unref(NNumberAnimation), {
|
|
769
|
+
ref: "rollingNum",
|
|
770
|
+
from: unref(from),
|
|
771
|
+
to: unref(to),
|
|
772
|
+
duration: unref(duration),
|
|
773
|
+
precision: precision.value,
|
|
774
|
+
"show-separator": unref(separator),
|
|
775
|
+
"on-finish": onFinish
|
|
776
|
+
}, null, 8, ["from", "to", "duration", "precision", "show-separator"]),
|
|
777
|
+
unref(suffix) ? (openBlock(), createElementBlock("span", _hoisted_3$6, toDisplayString(unref(suffix)), 1)) : createCommentVNode("", true)
|
|
778
|
+
]);
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
const cpnt$7 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-578dd347"]]);
|
|
783
|
+
const SmRollingNum = withInstall(cpnt$7);
|
|
784
|
+
const _hoisted_1$6 = { class: "sm-multiple-picker uu-fill" };
|
|
785
|
+
const _hoisted_2$6 = ["onClick"];
|
|
786
|
+
const _hoisted_3$5 = {
|
|
787
|
+
key: 0,
|
|
788
|
+
class: "group-box options"
|
|
789
|
+
};
|
|
790
|
+
const _hoisted_4$2 = {
|
|
791
|
+
key: 1,
|
|
792
|
+
class: "options"
|
|
793
|
+
};
|
|
794
|
+
const _hoisted_5$1 = { class: "fold-bar uu-flex" };
|
|
795
|
+
const __default__$6 = defineComponent({
|
|
796
|
+
name: "sm-multiple-picker"
|
|
797
|
+
});
|
|
798
|
+
const _sfc_main$6 = /* @__PURE__ */ Object.assign(__default__$6, {
|
|
799
|
+
props: {
|
|
800
|
+
dataList: {
|
|
801
|
+
type: Array,
|
|
802
|
+
default: () => []
|
|
803
|
+
},
|
|
804
|
+
cols: {
|
|
805
|
+
type: Number,
|
|
806
|
+
default: 6
|
|
807
|
+
},
|
|
808
|
+
rows: {
|
|
809
|
+
type: Number,
|
|
810
|
+
default: 4
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
emits: ["select"],
|
|
814
|
+
setup(__props, { emit: __emit }) {
|
|
815
|
+
useCssVars((_ctx) => ({
|
|
816
|
+
"v7e29c873": unref(cols)
|
|
817
|
+
}));
|
|
818
|
+
const props = __props;
|
|
819
|
+
const { dataList, cols, rows } = toRefs(props);
|
|
820
|
+
const emit = __emit;
|
|
821
|
+
const checkedList = reactive({});
|
|
822
|
+
watchEffect(() => {
|
|
823
|
+
dataList.value.map((o) => o.multiTab ? o.children : o).flat().forEach((o) => checkedList[o.code] = []);
|
|
824
|
+
});
|
|
825
|
+
const _all = "___all";
|
|
826
|
+
const getOptionList = (item) => {
|
|
827
|
+
var _a;
|
|
828
|
+
return [
|
|
829
|
+
/* { value: _all, name: '不限' }, */
|
|
830
|
+
...(_a = item.children) != null ? _a : []
|
|
831
|
+
];
|
|
832
|
+
};
|
|
833
|
+
const selectListFmt = (init) => {
|
|
834
|
+
const res = {};
|
|
835
|
+
Object.keys(checkedList).forEach((k) => {
|
|
836
|
+
if (init) {
|
|
837
|
+
checkedList[k] = [_all];
|
|
838
|
+
res[k] = [];
|
|
839
|
+
} else {
|
|
840
|
+
res[k] = checkedList[k].filter((v) => v !== _all);
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
return toRaw(res);
|
|
844
|
+
};
|
|
845
|
+
const onChange = (type, vals, nv) => {
|
|
846
|
+
if (nv != _all) {
|
|
847
|
+
const idx = vals.findIndex((v) => v === _all);
|
|
848
|
+
idx > -1 && vals.splice(idx, 1);
|
|
849
|
+
checkedList[type] = vals.length ? vals : [_all];
|
|
850
|
+
} else {
|
|
851
|
+
checkedList[type] = [_all];
|
|
852
|
+
}
|
|
853
|
+
emit("select", selectListFmt());
|
|
854
|
+
};
|
|
855
|
+
const onClear = () => emit("select", selectListFmt(true));
|
|
856
|
+
const isFolded = ref(true);
|
|
857
|
+
const tempList = computed(() => isFolded.value ? dataList.value.slice(0, rows.value) : dataList.value);
|
|
858
|
+
const foldLabel = computed(() => isFolded.value ? "更多选项 ▼" : "收起选项 ▲");
|
|
859
|
+
onMounted(() => selectListFmt(true));
|
|
860
|
+
return (_ctx, _cache) => {
|
|
861
|
+
const _component_n_checkbox = NCheckbox;
|
|
862
|
+
const _component_n_space = NSpace;
|
|
863
|
+
const _component_n_checkbox_group = NCheckboxGroup;
|
|
864
|
+
const _component_n_tab_pane = NTabPane;
|
|
865
|
+
const _component_n_tabs = NTabs;
|
|
866
|
+
const _component_n_icon = NIcon;
|
|
867
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
868
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tempList), (pk) => {
|
|
869
|
+
var _a;
|
|
870
|
+
return openBlock(), createElementBlock("div", {
|
|
871
|
+
class: "pk-item uu-flex uu-fill",
|
|
872
|
+
key: pk.code
|
|
873
|
+
}, [
|
|
874
|
+
createElementVNode("div", {
|
|
875
|
+
class: normalizeClass(["title", { multiTab: pk.multiTab }])
|
|
876
|
+
}, toDisplayString(pk.name), 3),
|
|
877
|
+
createElementVNode("div", {
|
|
878
|
+
class: normalizeClass(["ck-all", { active: (_a = unref(checkedList)[pk.code]) == null ? void 0 : _a.includes(_all) }])
|
|
879
|
+
}, [
|
|
880
|
+
createElementVNode("span", {
|
|
881
|
+
onClick: ($event) => onChange(pk.code, [_all], _all)
|
|
882
|
+
}, "不限", 8, _hoisted_2$6)
|
|
883
|
+
], 2),
|
|
884
|
+
pk.multiTab ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
885
|
+
createVNode(_component_n_tabs, {
|
|
886
|
+
type: "line",
|
|
887
|
+
trigger: "hover"
|
|
888
|
+
}, {
|
|
889
|
+
default: withCtx(() => [
|
|
890
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(pk.children, (gk) => {
|
|
891
|
+
return openBlock(), createBlock(_component_n_tab_pane, {
|
|
892
|
+
key: gk.code,
|
|
893
|
+
name: gk.code,
|
|
894
|
+
tab: gk.name
|
|
895
|
+
}, {
|
|
896
|
+
default: withCtx(() => [
|
|
897
|
+
createVNode(_component_n_checkbox_group, {
|
|
898
|
+
value: unref(checkedList)[gk.code],
|
|
899
|
+
"onUpdate:value": [($event) => unref(checkedList)[gk.code] = $event, (cv, { value }) => onChange(gk.code, cv, value)]
|
|
900
|
+
}, {
|
|
901
|
+
default: withCtx(() => [
|
|
902
|
+
createVNode(_component_n_space, { "item-style": "display: flex;" }, {
|
|
903
|
+
default: withCtx(() => [
|
|
904
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getOptionList(gk), (cgk) => {
|
|
905
|
+
return openBlock(), createBlock(_component_n_checkbox, {
|
|
906
|
+
key: cgk.code,
|
|
907
|
+
value: cgk.value,
|
|
908
|
+
label: cgk.name
|
|
909
|
+
}, null, 8, ["value", "label"]);
|
|
910
|
+
}), 128))
|
|
911
|
+
]),
|
|
912
|
+
_: 2
|
|
913
|
+
}, 1024)
|
|
914
|
+
]),
|
|
915
|
+
_: 2
|
|
916
|
+
}, 1032, ["value", "onUpdate:value"])
|
|
917
|
+
]),
|
|
918
|
+
_: 2
|
|
919
|
+
}, 1032, ["name", "tab"]);
|
|
920
|
+
}), 128))
|
|
921
|
+
]),
|
|
922
|
+
_: 2
|
|
923
|
+
}, 1024)
|
|
924
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
925
|
+
createVNode(_component_n_checkbox_group, {
|
|
926
|
+
size: "small",
|
|
927
|
+
value: unref(checkedList)[pk.code],
|
|
928
|
+
"onUpdate:value": [($event) => unref(checkedList)[pk.code] = $event, (cv, { value }) => onChange(pk.code, cv, value)]
|
|
929
|
+
}, {
|
|
930
|
+
default: withCtx(() => [
|
|
931
|
+
createVNode(_component_n_space, { "item-style": "display: flex;" }, {
|
|
932
|
+
default: withCtx(() => [
|
|
933
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getOptionList(pk), (ck, ci) => {
|
|
934
|
+
return openBlock(), createBlock(_component_n_checkbox, {
|
|
935
|
+
key: ck.code,
|
|
936
|
+
value: ck.value,
|
|
937
|
+
label: ck.name
|
|
938
|
+
}, null, 8, ["value", "label"]);
|
|
939
|
+
}), 128))
|
|
940
|
+
]),
|
|
941
|
+
_: 2
|
|
942
|
+
}, 1024)
|
|
943
|
+
]),
|
|
944
|
+
_: 2
|
|
945
|
+
}, 1032, ["value", "onUpdate:value"])
|
|
946
|
+
]))
|
|
947
|
+
]);
|
|
948
|
+
}), 128)),
|
|
949
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
950
|
+
createElementVNode("span", {
|
|
951
|
+
class: "label",
|
|
952
|
+
onClick: _cache[0] || (_cache[0] = ($event) => isFolded.value = !unref(isFolded))
|
|
953
|
+
}, [
|
|
954
|
+
_cache[1] || (_cache[1] = createTextVNode(" —————— ", -1)),
|
|
955
|
+
createElementVNode("span", null, toDisplayString(unref(foldLabel)), 1),
|
|
956
|
+
_cache[2] || (_cache[2] = createTextVNode(" —————— ", -1))
|
|
957
|
+
])
|
|
958
|
+
]),
|
|
959
|
+
createElementVNode("span", {
|
|
960
|
+
class: "clear uu-flex",
|
|
961
|
+
onClick: onClear
|
|
962
|
+
}, [
|
|
963
|
+
createVNode(_component_n_icon, { size: "20" }),
|
|
964
|
+
_cache[3] || (_cache[3] = createTextVNode(" 清空筛选 ", -1))
|
|
965
|
+
])
|
|
966
|
+
]);
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
const cpnt$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-76be8819"]]);
|
|
971
|
+
const SmMultiplePicker = withInstall(cpnt$6);
|
|
972
|
+
const _hoisted_1$5 = { class: "sm-dropdown-buttons" };
|
|
973
|
+
const _hoisted_2$5 = { class: "icon-text" };
|
|
974
|
+
const _hoisted_3$4 = { key: 0 };
|
|
975
|
+
const _hoisted_4$1 = { class: "icon-text more" };
|
|
976
|
+
const __default__$5 = defineComponent({
|
|
977
|
+
name: "sm-dropdown-buttons"
|
|
978
|
+
});
|
|
979
|
+
const _sfc_main$5 = /* @__PURE__ */ Object.assign(__default__$5, {
|
|
980
|
+
props: {
|
|
981
|
+
list: {
|
|
982
|
+
type: Array,
|
|
983
|
+
default: () => []
|
|
984
|
+
},
|
|
985
|
+
count: {
|
|
986
|
+
type: [Number, String],
|
|
987
|
+
default: 2
|
|
988
|
+
},
|
|
989
|
+
natives: {
|
|
990
|
+
type: Object,
|
|
991
|
+
default: () => ({
|
|
992
|
+
quaternary: true,
|
|
993
|
+
size: "medium",
|
|
994
|
+
type: "primary"
|
|
995
|
+
})
|
|
996
|
+
},
|
|
997
|
+
moreText: {
|
|
998
|
+
type: String,
|
|
999
|
+
default: "更多"
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
emits: ["select"],
|
|
1003
|
+
setup(__props, { emit: __emit }) {
|
|
1004
|
+
useCssVars((_ctx) => ({
|
|
1005
|
+
"v5255d030": unref(wrapGap)
|
|
1006
|
+
}));
|
|
1007
|
+
const props = __props;
|
|
1008
|
+
const { list, count, natives, moreText } = toRefs(props);
|
|
1009
|
+
const showMore = computed(() => list.value.length > count.value);
|
|
1010
|
+
const normalBtns = computed(() => showMore.value ? list.value.slice(0, +count.value - 1) : list.value);
|
|
1011
|
+
const wrapGap = computed(() => natives.value.quaternary ? "0" : "0 10px");
|
|
1012
|
+
const $emit = __emit;
|
|
1013
|
+
const onClick = useThrottleFn((item) => {
|
|
1014
|
+
if (item.disabled) return;
|
|
1015
|
+
$emit("select", item);
|
|
1016
|
+
}, 500);
|
|
1017
|
+
const options = computed(() => {
|
|
1018
|
+
return list.value.slice(+count.value - 1, 999).map((item) => {
|
|
1019
|
+
return {
|
|
1020
|
+
label: item.label,
|
|
1021
|
+
key: JSON.stringify(item),
|
|
1022
|
+
disabled: item.disabled || false,
|
|
1023
|
+
icon: () => typeof item.icon === "string" ? h("i", { class: item.icon }, "") : h(NIcon, { component: item.icon })
|
|
1024
|
+
};
|
|
1025
|
+
});
|
|
1026
|
+
});
|
|
1027
|
+
return (_ctx, _cache) => {
|
|
1028
|
+
const _component_n_button = NButton;
|
|
1029
|
+
const _component_n_dropdown = NDropdown;
|
|
1030
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1031
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(normalBtns), (item, index2) => {
|
|
1032
|
+
return openBlock(), createBlock(_component_n_button, mergeProps({
|
|
1033
|
+
key: index2,
|
|
1034
|
+
class: { btn: unref(natives).quaternary }
|
|
1035
|
+
}, { ref_for: true }, unref(natives), {
|
|
1036
|
+
disabled: item.disabled,
|
|
1037
|
+
onClick: ($event) => unref(onClick)(item)
|
|
1038
|
+
}), {
|
|
1039
|
+
icon: withCtx(() => [
|
|
1040
|
+
typeof item.icon == "string" ? (openBlock(), createElementBlock("i", {
|
|
1041
|
+
key: 0,
|
|
1042
|
+
class: normalizeClass(item.icon)
|
|
1043
|
+
}, null, 2)) : (openBlock(), createBlock(unref(NIcon), {
|
|
1044
|
+
key: 1,
|
|
1045
|
+
component: item.icon
|
|
1046
|
+
}, null, 8, ["component"]))
|
|
1047
|
+
]),
|
|
1048
|
+
default: withCtx(() => {
|
|
1049
|
+
var _a;
|
|
1050
|
+
return [
|
|
1051
|
+
createElementVNode("span", _hoisted_2$5, toDisplayString((_a = item.label) != null ? _a : "按钮"), 1)
|
|
1052
|
+
];
|
|
1053
|
+
}),
|
|
1054
|
+
_: 2
|
|
1055
|
+
}, 1040, ["class", "disabled", "onClick"]);
|
|
1056
|
+
}), 128)),
|
|
1057
|
+
unref(showMore) ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
|
|
1058
|
+
createVNode(_component_n_dropdown, {
|
|
1059
|
+
options: unref(options),
|
|
1060
|
+
placement: "bottom-start",
|
|
1061
|
+
size: "large",
|
|
1062
|
+
onSelect: _cache[0] || (_cache[0] = (e) => unref(onClick)(JSON.parse(e)))
|
|
1063
|
+
}, {
|
|
1064
|
+
default: withCtx(() => [
|
|
1065
|
+
createVNode(_component_n_button, {
|
|
1066
|
+
type: "primary",
|
|
1067
|
+
quaternary: unref(natives).quaternary
|
|
1068
|
+
}, {
|
|
1069
|
+
icon: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
1070
|
+
createElementVNode("svg", {
|
|
1071
|
+
version: "1.1",
|
|
1072
|
+
id: "Layer_1",
|
|
1073
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1074
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1075
|
+
x: "0px",
|
|
1076
|
+
y: "0px",
|
|
1077
|
+
width: "16",
|
|
1078
|
+
height: "16",
|
|
1079
|
+
viewBox: "0 0 16 16",
|
|
1080
|
+
"enable-background": "new 0 0 16 16",
|
|
1081
|
+
"xml:space": "preserve"
|
|
1082
|
+
}, [
|
|
1083
|
+
createElementVNode("image", {
|
|
1084
|
+
id: "image0",
|
|
1085
|
+
width: "16",
|
|
1086
|
+
height: "16",
|
|
1087
|
+
x: "0",
|
|
1088
|
+
y: "0",
|
|
1089
|
+
href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAZklEQVR4AeyQwQ3AMAgDTSbrUO0U7VDdjBgkvxMlPBMJGR4G5xo2X8GC2y887llKo3mk9BYk+OzHa5alBJpHSm9BAl1d1AaCSIABTEuinyl6C75AEAkwgClB9DNFb0ECXV3UAxHoAAAA//+WofITAAAABklEQVQDAN/cfiGxE0rTAAAAAElFTkSuQmCC"
|
|
1090
|
+
})
|
|
1091
|
+
], -1)
|
|
1092
|
+
])]),
|
|
1093
|
+
default: withCtx(() => [
|
|
1094
|
+
createElementVNode("span", _hoisted_4$1, toDisplayString(unref(moreText)), 1)
|
|
1095
|
+
]),
|
|
1096
|
+
_: 1
|
|
1097
|
+
}, 8, ["quaternary"])
|
|
1098
|
+
]),
|
|
1099
|
+
_: 1
|
|
1100
|
+
}, 8, ["options"])
|
|
1101
|
+
])) : createCommentVNode("", true)
|
|
1102
|
+
]);
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
const cpnt$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-d654d306"]]);
|
|
1107
|
+
const SmDropdownButtons = withInstall(cpnt$5);
|
|
1108
|
+
const _hoisted_1$4 = { class: "sm-tabs" };
|
|
1109
|
+
const _hoisted_2$4 = { class: "operation" };
|
|
1110
|
+
const _hoisted_3$3 = { class: "container" };
|
|
1111
|
+
const __default__$4 = defineComponent({
|
|
1112
|
+
name: "sm-tabs"
|
|
1113
|
+
});
|
|
1114
|
+
const _sfc_main$4 = /* @__PURE__ */ Object.assign(__default__$4, {
|
|
1115
|
+
props: {
|
|
1116
|
+
modelValue: {
|
|
1117
|
+
type: [String, Number, Boolean],
|
|
1118
|
+
default: false
|
|
1119
|
+
},
|
|
1120
|
+
tabs: {
|
|
1121
|
+
type: Array,
|
|
1122
|
+
default: () => []
|
|
1123
|
+
},
|
|
1124
|
+
placement: {
|
|
1125
|
+
type: String,
|
|
1126
|
+
default: "top"
|
|
1127
|
+
},
|
|
1128
|
+
type: {
|
|
1129
|
+
type: String,
|
|
1130
|
+
default: "line"
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
emits: ["select", "update:modelValue"],
|
|
1134
|
+
setup(__props, { emit: __emit }) {
|
|
1135
|
+
var _a;
|
|
1136
|
+
const props = __props;
|
|
1137
|
+
const { tabs, modelValue, type, placement } = toRefs(props);
|
|
1138
|
+
const $emit = __emit;
|
|
1139
|
+
const attrs = computed(() => {
|
|
1140
|
+
const raw = { ...useAttrs() };
|
|
1141
|
+
delete raw.class;
|
|
1142
|
+
delete raw.style;
|
|
1143
|
+
return raw;
|
|
1144
|
+
});
|
|
1145
|
+
const _modelValue = ref((_a = tabs.value[0]) == null ? void 0 : _a.code);
|
|
1146
|
+
const activeKey = computed({
|
|
1147
|
+
get: () => modelValue.value === false ? _modelValue.value : modelValue.value,
|
|
1148
|
+
set: (v) => {
|
|
1149
|
+
if (modelValue.value !== false) return $emit("update:modelValue", v);
|
|
1150
|
+
_modelValue.value = v;
|
|
1151
|
+
}
|
|
1152
|
+
});
|
|
1153
|
+
const activeTab = computed(() => {
|
|
1154
|
+
var _a2;
|
|
1155
|
+
return (_a2 = tabs.value.find((t) => t.code === activeKey.value)) != null ? _a2 : {};
|
|
1156
|
+
});
|
|
1157
|
+
const onTabChange = (k) => {
|
|
1158
|
+
$emit("update:modelValue", k);
|
|
1159
|
+
$emit("select", k);
|
|
1160
|
+
_modelValue.value = k;
|
|
1161
|
+
};
|
|
1162
|
+
return (_ctx, _cache) => {
|
|
1163
|
+
const _component_n_tab_pane = NTabPane;
|
|
1164
|
+
const _component_n_tabs = NTabs;
|
|
1165
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
1166
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
1167
|
+
renderSlot(_ctx.$slots, "operation", {}, void 0, true)
|
|
1168
|
+
]),
|
|
1169
|
+
createVNode(_component_n_tabs, mergeProps({
|
|
1170
|
+
value: unref(activeKey),
|
|
1171
|
+
placement: unref(placement),
|
|
1172
|
+
type: unref(type),
|
|
1173
|
+
"on-update:value": onTabChange
|
|
1174
|
+
}, unref(attrs)), {
|
|
1175
|
+
default: withCtx(() => [
|
|
1176
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab) => {
|
|
1177
|
+
return openBlock(), createBlock(_component_n_tab_pane, {
|
|
1178
|
+
name: tab.code,
|
|
1179
|
+
tab: tab.label,
|
|
1180
|
+
"display-directive": "show:lazy"
|
|
1181
|
+
}, {
|
|
1182
|
+
default: withCtx(() => [
|
|
1183
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
1184
|
+
renderSlot(_ctx.$slots, tab.code, { tab: unref(activeTab) }, void 0, true),
|
|
1185
|
+
renderSlot(_ctx.$slots, "default", { tab: unref(activeTab) }, void 0, true)
|
|
1186
|
+
])
|
|
1187
|
+
]),
|
|
1188
|
+
_: 2
|
|
1189
|
+
}, 1032, ["name", "tab"]);
|
|
1190
|
+
}), 256))
|
|
1191
|
+
]),
|
|
1192
|
+
_: 3
|
|
1193
|
+
}, 16, ["value", "placement", "type"])
|
|
1194
|
+
]);
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
});
|
|
1198
|
+
const cpnt$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2085b0f7"]]);
|
|
1199
|
+
const SmTabs = withInstall(cpnt$4);
|
|
1200
|
+
const _hoisted_1$3 = { class: "header uu-flex" };
|
|
1201
|
+
const _hoisted_2$3 = { class: "body" };
|
|
1202
|
+
const __default__$3 = defineComponent({
|
|
1203
|
+
name: "sm-steps"
|
|
1204
|
+
});
|
|
1205
|
+
const _sfc_main$3 = /* @__PURE__ */ Object.assign(__default__$3, {
|
|
1206
|
+
props: {
|
|
1207
|
+
modelValue: {
|
|
1208
|
+
type: [String, Number],
|
|
1209
|
+
default: 0
|
|
1210
|
+
},
|
|
1211
|
+
list: {
|
|
1212
|
+
type: Array,
|
|
1213
|
+
default: () => []
|
|
1214
|
+
},
|
|
1215
|
+
width: {
|
|
1216
|
+
type: String,
|
|
1217
|
+
default: "100%"
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
emits: ["change", "update:modelValue"],
|
|
1221
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1222
|
+
useCssVars((_ctx) => ({
|
|
1223
|
+
"fe3382c0": unref(elww)
|
|
1224
|
+
}));
|
|
1225
|
+
const props = __props;
|
|
1226
|
+
const { list, width, modelValue } = toRefs(props);
|
|
1227
|
+
const $emit = __emit;
|
|
1228
|
+
const activeIndex = computed(() => list.value.findIndex((x) => x.code === modelValue.value));
|
|
1229
|
+
const endIndex = computed(() => list.value.length - 1);
|
|
1230
|
+
const emitFn = (idx) => {
|
|
1231
|
+
var _a;
|
|
1232
|
+
const code = (_a = list.value.at(idx)) == null ? void 0 : _a.code;
|
|
1233
|
+
$emit("update:modelValue", code);
|
|
1234
|
+
$emit("change", code);
|
|
1235
|
+
};
|
|
1236
|
+
const next = (n = 1) => {
|
|
1237
|
+
n = typeof n !== "number" ? 1 : n;
|
|
1238
|
+
let idx = activeIndex.value + (n < 0 ? 1 : n);
|
|
1239
|
+
if (idx > endIndex.value || idx < 0) {
|
|
1240
|
+
idx = endIndex.value;
|
|
1241
|
+
}
|
|
1242
|
+
emitFn(idx);
|
|
1243
|
+
};
|
|
1244
|
+
const prev = (n = 1) => {
|
|
1245
|
+
n = typeof n !== "number" ? 1 : n;
|
|
1246
|
+
let idx = activeIndex.value - (n < 0 ? 1 : n);
|
|
1247
|
+
if (idx < 0) {
|
|
1248
|
+
idx = 0;
|
|
1249
|
+
}
|
|
1250
|
+
emitFn(idx);
|
|
1251
|
+
};
|
|
1252
|
+
__expose({ next, prev });
|
|
1253
|
+
const elww = ref("");
|
|
1254
|
+
const calTranslateX = () => {
|
|
1255
|
+
const target = document.querySelector(".n-step:last-child .n-step-content");
|
|
1256
|
+
elww.value = (target.offsetWidth || window.getComputedStyle(target).width || 0) + "px";
|
|
1257
|
+
};
|
|
1258
|
+
onMounted(() => {
|
|
1259
|
+
calTranslateX();
|
|
1260
|
+
});
|
|
1261
|
+
return (_ctx, _cache) => {
|
|
1262
|
+
const _component_n_step = NStep;
|
|
1263
|
+
const _component_n_steps = NSteps;
|
|
1264
|
+
return openBlock(), createElementBlock("div", {
|
|
1265
|
+
class: "sm-steps",
|
|
1266
|
+
style: normalizeStyle(`width: ${unref(width)}`)
|
|
1267
|
+
}, [
|
|
1268
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
1269
|
+
createVNode(_component_n_steps, {
|
|
1270
|
+
size: "small",
|
|
1271
|
+
current: unref(activeIndex) + 1,
|
|
1272
|
+
status: "process"
|
|
1273
|
+
}, {
|
|
1274
|
+
default: withCtx(() => [
|
|
1275
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item, idx) => {
|
|
1276
|
+
return openBlock(), createBlock(_component_n_step, {
|
|
1277
|
+
key: idx,
|
|
1278
|
+
title: item.label
|
|
1279
|
+
}, {
|
|
1280
|
+
default: withCtx(() => [
|
|
1281
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
1282
|
+
]),
|
|
1283
|
+
_: 2
|
|
1284
|
+
}, 1032, ["title"]);
|
|
1285
|
+
}), 128))
|
|
1286
|
+
]),
|
|
1287
|
+
_: 1
|
|
1288
|
+
}, 8, ["current"])
|
|
1289
|
+
]),
|
|
1290
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
1291
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1292
|
+
cpnt: unref(list)[unref(activeIndex)].cpnt,
|
|
1293
|
+
next,
|
|
1294
|
+
prev,
|
|
1295
|
+
step: unref(list)[unref(activeIndex)]
|
|
1296
|
+
}, void 0, true)
|
|
1297
|
+
])
|
|
1298
|
+
], 4);
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
const cpnt$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-37ffcb55"]]);
|
|
1303
|
+
const SmSteps = withInstall(cpnt$3);
|
|
1304
|
+
const _hoisted_1$2 = { class: "sm-form" };
|
|
1305
|
+
const _hoisted_2$2 = ["innerHTML"];
|
|
1306
|
+
const _hoisted_3$2 = ["innerHTML"];
|
|
1307
|
+
const _hoisted_4 = { key: 0 };
|
|
1308
|
+
const _hoisted_5 = { key: 1 };
|
|
1309
|
+
const _hoisted_6 = {
|
|
1310
|
+
key: 0,
|
|
1311
|
+
class: "empty-wrap"
|
|
1312
|
+
};
|
|
1313
|
+
const __default__$2 = defineComponent({
|
|
1314
|
+
name: "sm-form"
|
|
1315
|
+
});
|
|
1316
|
+
const _sfc_main$2 = /* @__PURE__ */ Object.assign(__default__$2, {
|
|
1317
|
+
props: {
|
|
1318
|
+
fields: { type: Array, required: true, default: () => [] },
|
|
1319
|
+
data: { type: Object, required: true, default: () => ({}) },
|
|
1320
|
+
dsm: { type: Object, default: () => ({}) },
|
|
1321
|
+
natives: { type: Object, default: () => ({}) },
|
|
1322
|
+
cols: { type: Number, default: 2 },
|
|
1323
|
+
readonly: { type: Boolean, default: false },
|
|
1324
|
+
customStyle: { type: [Object, String, Array], default: "" }
|
|
1325
|
+
},
|
|
1326
|
+
emits: ["update"],
|
|
1327
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1328
|
+
useCssVars((_ctx) => ({
|
|
1329
|
+
"e7f1459c": unref(itemWw)
|
|
1330
|
+
}));
|
|
1331
|
+
const isFunc = (p) => typeof p == "function";
|
|
1332
|
+
const dtks = "date|datetime|daterange|datetimerange|month|monthrange|year|yearrange|quarter|quarterrange|week";
|
|
1333
|
+
const props = __props;
|
|
1334
|
+
const { data, cols, fields, dsm, natives, readonly, customStyle } = toRefs(props);
|
|
1335
|
+
const $emit = __emit;
|
|
1336
|
+
const formEl = ref(null);
|
|
1337
|
+
const gttFns = ref({});
|
|
1338
|
+
const sttFns = ref({});
|
|
1339
|
+
const _fmmK = ref(0);
|
|
1340
|
+
const _dssK = ref(0);
|
|
1341
|
+
const _dsmX = reactive({});
|
|
1342
|
+
const elemDsk = computed(() => (p) => {
|
|
1343
|
+
var _a, _b;
|
|
1344
|
+
return (_b = (_a = _dsmX[p.code]) == null ? void 0 : _a.source) != null ? _b : [];
|
|
1345
|
+
});
|
|
1346
|
+
const fm = ref({});
|
|
1347
|
+
watchEffect(() => {
|
|
1348
|
+
_fmmK.value;
|
|
1349
|
+
const d = deepClone(data.value);
|
|
1350
|
+
Object.entries(sttFns.value).forEach(([k, fn]) => d[k] = isFunc(fn) ? fn(d[k], d) : d[k]);
|
|
1351
|
+
fm.value = d;
|
|
1352
|
+
});
|
|
1353
|
+
const vm = {
|
|
1354
|
+
// level 验证级别:0 - 校验所有,1 - 仅验证必填项,2 - 仅验证字段个性规则, 3 - 全不校验
|
|
1355
|
+
validate: (level = 0) => new Promise((resolve) => {
|
|
1356
|
+
var _a, _b, _c, _d;
|
|
1357
|
+
(_b = (_a = formEl.value) == null ? void 0 : _a.restoreValidation) == null ? void 0 : _b.call(_a);
|
|
1358
|
+
if (level >= 3) return resolve({ success: true, list: [] });
|
|
1359
|
+
const nks = () => {
|
|
1360
|
+
const rr = { 1: (x) => x.required === true, 2: (x) => isFunc(x.validate) }[level];
|
|
1361
|
+
return fields.value.filter((x) => x.visible !== false && (rr == null ? void 0 : rr(x))).map((x) => x.code);
|
|
1362
|
+
};
|
|
1363
|
+
(_d = (_c = formEl.value) == null ? void 0 : _c.validate) == null ? void 0 : _d.call(_c, (err = []) => {
|
|
1364
|
+
let list = err.map((x) => {
|
|
1365
|
+
var _a2;
|
|
1366
|
+
return (_a2 = x == null ? void 0 : x[0]) != null ? _a2 : x;
|
|
1367
|
+
});
|
|
1368
|
+
if (level === 1) {
|
|
1369
|
+
list = list.filter((x) => ["", void 0, null].includes(x.fieldValue));
|
|
1370
|
+
}
|
|
1371
|
+
resolve({ success: !list.length, list });
|
|
1372
|
+
}, (r) => level === 0 ? true : nks().includes(r.code));
|
|
1373
|
+
}),
|
|
1374
|
+
getData: () => {
|
|
1375
|
+
var _a;
|
|
1376
|
+
const d = deepClone((_a = fm.value) != null ? _a : {});
|
|
1377
|
+
Object.entries(gttFns.value).forEach(([k, fn]) => isFunc(fn) && (d[k] = fn(d[k], d)));
|
|
1378
|
+
Object.entries(d).forEach(([k, v]) => data.value[k] = v);
|
|
1379
|
+
return d;
|
|
1380
|
+
},
|
|
1381
|
+
setDsFilter: (code, fn) => {
|
|
1382
|
+
if (_dsmX[code]) _dsmX[code].fn = fn;
|
|
1383
|
+
},
|
|
1384
|
+
getRulesFields: () => fieldRules.value,
|
|
1385
|
+
// attrs 属性对象;codes 字段编码,为空时表示全部字段
|
|
1386
|
+
setCellAttrs: (attrs, codes) => {
|
|
1387
|
+
setTimeout(() => {
|
|
1388
|
+
fields.value = fields.value.map((x) => {
|
|
1389
|
+
if (codes === void 0 || codes.includes(x.code)) {
|
|
1390
|
+
Object.entries(attrs).forEach(([k, v]) => {
|
|
1391
|
+
if (["readonly", "disabled"].includes(k)) {
|
|
1392
|
+
x.disabled = v;
|
|
1393
|
+
x.readonly = v;
|
|
1394
|
+
} else {
|
|
1395
|
+
x[k] = v;
|
|
1396
|
+
}
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
return x;
|
|
1400
|
+
});
|
|
1401
|
+
_dssK.value++;
|
|
1402
|
+
}, 0);
|
|
1403
|
+
},
|
|
1404
|
+
forceUpdate: () => _dssK.value++
|
|
1405
|
+
};
|
|
1406
|
+
const activeUseTs = (p, k) => k.split("|").includes(p.elem);
|
|
1407
|
+
const groups = ref([]);
|
|
1408
|
+
watchEffect(() => {
|
|
1409
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1410
|
+
const [_, tt, ffs] = [_dssK.value, "$sort:", deepClone(fields.value)];
|
|
1411
|
+
const arr = Object.entries(groupBy((_d = (_c = (_a = ffs == null ? void 0 : ffs.filter) == null ? void 0 : (_b = _a.call(ffs, (x) => x.visible !== false)).map) == null ? void 0 : _c.call(_b, (x) => {
|
|
1412
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k;
|
|
1413
|
+
x._elem = x.elem;
|
|
1414
|
+
const _exts = (_e2 = (_d2 = (_c2 = (_b2 = (_a2 = `$elem:${x._elem}`.split(/\s/g)) == null ? void 0 : _a2.map) == null ? void 0 : _b2.call(_a2, (x2) => x2.split(":"))) == null ? void 0 : _c2.reduce) == null ? void 0 : _d2.call(_c2, (acc, [k, v]) => {
|
|
1415
|
+
let val = v;
|
|
1416
|
+
try {
|
|
1417
|
+
val = JSON.parse(v);
|
|
1418
|
+
} catch (e) {
|
|
1419
|
+
}
|
|
1420
|
+
acc[k.slice(1)] = val;
|
|
1421
|
+
return acc;
|
|
1422
|
+
}, {})) != null ? _e2 : {};
|
|
1423
|
+
x.exts = { ..._exts, ...x.natives };
|
|
1424
|
+
x.elem = _exts.elem;
|
|
1425
|
+
x.visible = x.visible !== false;
|
|
1426
|
+
const vfmt = x.vfmts;
|
|
1427
|
+
if (Array.isArray(vfmt)) {
|
|
1428
|
+
gttFns.value[x.code] = vfmt[0];
|
|
1429
|
+
sttFns.value[x.code] = vfmt[1];
|
|
1430
|
+
}
|
|
1431
|
+
if (dtks.split("|").includes(x.elem)) {
|
|
1432
|
+
if (!((_f2 = x.exts) == null ? void 0 : _f2.valueFormat) || ((_i = (_h = (_g2 = x.exts) == null ? void 0 : _g2.valueFormat) == null ? void 0 : _h.replace) == null ? void 0 : _i.call(_h, /[A-z]/g, 8)) != ((_k = (_j = fm.value[x.code]) == null ? void 0 : _j.replace) == null ? void 0 : _k.call(_j, /\d/g, 8))) {
|
|
1433
|
+
fm.value[x.code] = void 0;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
_dsmX[x.code] = {
|
|
1437
|
+
fn: null,
|
|
1438
|
+
source: computed(() => {
|
|
1439
|
+
var _a3, _b3;
|
|
1440
|
+
const [dsx, ffn] = [x.datasource, _dsmX[x.code].fn];
|
|
1441
|
+
if (!isFunc(dsx)) return Array.isArray(dsx) ? dsx : [];
|
|
1442
|
+
const d = (_a3 = dsx(dsm.value, fm.value)) != null ? _a3 : [];
|
|
1443
|
+
return isFunc(ffn) ? (_b3 = ffn(d)) != null ? _b3 : [] : d;
|
|
1444
|
+
})
|
|
1445
|
+
};
|
|
1446
|
+
return x;
|
|
1447
|
+
})) != null ? _d : [], (x) => {
|
|
1448
|
+
var _a2;
|
|
1449
|
+
return ((_a2 = x.group) != null ? _a2 : "").replace(/\s+/g, "");
|
|
1450
|
+
}));
|
|
1451
|
+
arr.sort((a, b) => {
|
|
1452
|
+
var _a2, _b2;
|
|
1453
|
+
return ((_a2 = a[0].split(tt)[1]) != null ? _a2 : 999) - ((_b2 = b[0].split(tt)[1]) != null ? _b2 : 999);
|
|
1454
|
+
}).map((a) => (a[0] = a[0].split(tt)[0], a));
|
|
1455
|
+
groups.value = (_g = (_f = (_e = dsm.value) == null ? void 0 : _e.lksGroupsFormatter) == null ? void 0 : _f.call(_e, arr)) != null ? _g : arr;
|
|
1456
|
+
});
|
|
1457
|
+
const itemWw = computed(() => `${Math.round(100 / cols.value)}%`);
|
|
1458
|
+
const itemAttrs = (p) => {
|
|
1459
|
+
var _a;
|
|
1460
|
+
const base = { clearable: true, ...p.exts };
|
|
1461
|
+
base.readonly = readonly.value || p.readonly;
|
|
1462
|
+
base.disabled = readonly.value || p.readonly;
|
|
1463
|
+
switch (p.elem) {
|
|
1464
|
+
case "date":
|
|
1465
|
+
base.defaultFormattedValue = fm.value[p.code];
|
|
1466
|
+
base.format = (_a = p.exts.format) != null ? _a : "yyyy-MM-dd";
|
|
1467
|
+
break;
|
|
1468
|
+
case "phone":
|
|
1469
|
+
base.allowInput = (v, i) => i == 0 && v == 1 || i == 1 && /[3-9]/.test(v) || i > 1 && /[0-9]/.test(v);
|
|
1470
|
+
base.length = 11;
|
|
1471
|
+
base.block = true;
|
|
1472
|
+
break;
|
|
1473
|
+
}
|
|
1474
|
+
base.type = p.elem;
|
|
1475
|
+
return base;
|
|
1476
|
+
};
|
|
1477
|
+
const fmAttrs = computed(() => {
|
|
1478
|
+
const base = { labelPlacement: "top", labelWidth: "auto", requireMarkPlacement: "left", size: "large", ...natives.value };
|
|
1479
|
+
if (readonly.value) {
|
|
1480
|
+
base.labelPlacement = "left";
|
|
1481
|
+
if (base.labelWidth == "auto") base.labelWidth = 200;
|
|
1482
|
+
}
|
|
1483
|
+
return base;
|
|
1484
|
+
});
|
|
1485
|
+
const fmtLabel = (p) => isFunc(p.label) ? p.label(p, toRaw(props)) : p.label + (p.exts.unit ? `(${p.exts.unit})` : "");
|
|
1486
|
+
const itemFields = (arr) => {
|
|
1487
|
+
var _a, _b;
|
|
1488
|
+
return (_b = (_a = arr == null ? void 0 : arr.sort) == null ? void 0 : _a.call(arr, (a, b) => a.order - b.order)) != null ? _b : [];
|
|
1489
|
+
};
|
|
1490
|
+
const fieldRules = computed(() => {
|
|
1491
|
+
var _a;
|
|
1492
|
+
const fs = fields.value.filter((x) => x.visible !== false && (x.required || isFunc(x.validate)));
|
|
1493
|
+
return (_a = fs.reduce((acc, x) => {
|
|
1494
|
+
acc[x.code] = [{
|
|
1495
|
+
code: x.code,
|
|
1496
|
+
required: true,
|
|
1497
|
+
trigger: ["input", "blur", "change"],
|
|
1498
|
+
validator: (r, v) => {
|
|
1499
|
+
var _a2, _b;
|
|
1500
|
+
const msg = "该字段为必填项";
|
|
1501
|
+
const fn = (a) => {
|
|
1502
|
+
var _a3, _b2;
|
|
1503
|
+
return !!((_b2 = (_a3 = String(a != null ? a : "")) == null ? void 0 : _a3.trim) == null ? void 0 : _b2.call(_a3)) ? true : new Error(msg);
|
|
1504
|
+
};
|
|
1505
|
+
if (!isFunc(x.validate)) return fn(v);
|
|
1506
|
+
const excRes = x.validate(v, { rule: r, fm: fm.value, dsm: dsm.value, vm });
|
|
1507
|
+
if (excRes === true) return true;
|
|
1508
|
+
if (excRes) return new Error((_b = (_a2 = excRes == null ? void 0 : excRes.messagec) != null ? _a2 : excRes) != null ? _b : msg);
|
|
1509
|
+
return x.required ? fn(v) : true;
|
|
1510
|
+
}
|
|
1511
|
+
}];
|
|
1512
|
+
return acc;
|
|
1513
|
+
}, {})) != null ? _a : {};
|
|
1514
|
+
});
|
|
1515
|
+
const onCellUpdate = (p, v) => {
|
|
1516
|
+
var _a;
|
|
1517
|
+
const ps = { fm: fm.value, dsm: dsm.value, vm };
|
|
1518
|
+
(_a = p.smUpdate) == null ? void 0 : _a.call(p, v, ps);
|
|
1519
|
+
$emit("update", p.code, v, ps);
|
|
1520
|
+
};
|
|
1521
|
+
__expose(vm);
|
|
1522
|
+
window.__lukas__sm_form = vm;
|
|
1523
|
+
return (_ctx, _cache) => {
|
|
1524
|
+
const _component_n_divider = NDivider;
|
|
1525
|
+
const _component_n_tooltip = NTooltip;
|
|
1526
|
+
const _component_n_select = NSelect;
|
|
1527
|
+
const _component_n_input = NInput;
|
|
1528
|
+
const _component_n_input_number = NInputNumber;
|
|
1529
|
+
const _component_n_radio = NRadio;
|
|
1530
|
+
const _component_n_radio_group = NRadioGroup;
|
|
1531
|
+
const _component_n_checkbox = NCheckbox;
|
|
1532
|
+
const _component_n_checkbox_group = NCheckboxGroup;
|
|
1533
|
+
const _component_n_date_picker = NDatePicker;
|
|
1534
|
+
const _component_n_input_otp = NInputOtp;
|
|
1535
|
+
const _component_n_cascader = NCascader;
|
|
1536
|
+
const _component_n_tree_select = NTreeSelect;
|
|
1537
|
+
const _component_n_switch = NSwitch;
|
|
1538
|
+
const _component_n_dynamic_tags = NDynamicTags;
|
|
1539
|
+
const _component_n_rate = NRate;
|
|
1540
|
+
const _component_n_form_item = NFormItem;
|
|
1541
|
+
const _component_n_form = NForm;
|
|
1542
|
+
const _component_n_config_provider = NConfigProvider;
|
|
1543
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1544
|
+
createVNode(_component_n_config_provider, {
|
|
1545
|
+
locale: unref(zhCN),
|
|
1546
|
+
"date-locale": unref(dateZhCN)
|
|
1547
|
+
}, {
|
|
1548
|
+
default: withCtx(() => [
|
|
1549
|
+
createVNode(_component_n_form, mergeProps({
|
|
1550
|
+
ref_key: "formEl",
|
|
1551
|
+
ref: formEl
|
|
1552
|
+
}, unref(fmAttrs), {
|
|
1553
|
+
model: unref(fm),
|
|
1554
|
+
rules: unref(fieldRules),
|
|
1555
|
+
disabled: unref(readonly)
|
|
1556
|
+
}), {
|
|
1557
|
+
default: withCtx(() => [
|
|
1558
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(groups), ([title, fields2]) => {
|
|
1559
|
+
return openBlock(), createElementBlock(Fragment, { key: title }, [
|
|
1560
|
+
!["", "undefined", "null", "false"].includes(title) ? (openBlock(), createBlock(_component_n_divider, {
|
|
1561
|
+
key: 0,
|
|
1562
|
+
"title-placement": "left"
|
|
1563
|
+
}, {
|
|
1564
|
+
default: withCtx(() => [
|
|
1565
|
+
createElementVNode("span", { innerHTML: title }, null, 8, _hoisted_2$2)
|
|
1566
|
+
]),
|
|
1567
|
+
_: 2
|
|
1568
|
+
}, 1024)) : createCommentVNode("", true),
|
|
1569
|
+
createElementVNode("div", {
|
|
1570
|
+
class: normalizeClass(["group", { readonly: unref(readonly) }]),
|
|
1571
|
+
style: normalizeStyle(unref(customStyle))
|
|
1572
|
+
}, [
|
|
1573
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(itemFields(fields2), (p = {}) => {
|
|
1574
|
+
var _a;
|
|
1575
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
1576
|
+
key: p.code
|
|
1577
|
+
}, [
|
|
1578
|
+
renderSlot(_ctx.$slots, "item-before", {
|
|
1579
|
+
p,
|
|
1580
|
+
m: unref(fm),
|
|
1581
|
+
s: unref(elemDsk)(p)
|
|
1582
|
+
}, void 0, true),
|
|
1583
|
+
createVNode(_component_n_form_item, {
|
|
1584
|
+
path: p.code,
|
|
1585
|
+
class: normalizeClass(["form-item", p.elem, `xc-${p.code}`, { hidden: !p.visible }, { "sm-fill": p.fill }]),
|
|
1586
|
+
"show-require-mark": p.required,
|
|
1587
|
+
style: normalizeStyle((_a = p.customStyle) != null ? _a : "")
|
|
1588
|
+
}, {
|
|
1589
|
+
label: withCtx(() => [
|
|
1590
|
+
createElementVNode("span", {
|
|
1591
|
+
innerHTML: fmtLabel(p)
|
|
1592
|
+
}, null, 8, _hoisted_3$2),
|
|
1593
|
+
p.tip ? (openBlock(), createBlock(_component_n_tooltip, {
|
|
1594
|
+
key: 0,
|
|
1595
|
+
trigger: "hover"
|
|
1596
|
+
}, {
|
|
1597
|
+
trigger: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
1598
|
+
createElementVNode("i", { class: "tip" }, null, -1)
|
|
1599
|
+
])]),
|
|
1600
|
+
default: withCtx(() => [
|
|
1601
|
+
createTextVNode(" " + toDisplayString(p.tip), 1)
|
|
1602
|
+
]),
|
|
1603
|
+
_: 2
|
|
1604
|
+
}, 1024)) : createCommentVNode("", true)
|
|
1605
|
+
]),
|
|
1606
|
+
default: withCtx(() => [
|
|
1607
|
+
renderSlot(_ctx.$slots, "elem", {
|
|
1608
|
+
p,
|
|
1609
|
+
m: unref(fm),
|
|
1610
|
+
s: unref(elemDsk)(p),
|
|
1611
|
+
vf: (t) => activeUseTs(p, t),
|
|
1612
|
+
vc: (v) => onCellUpdate(p, v)
|
|
1613
|
+
}, void 0, true),
|
|
1614
|
+
activeUseTs(p, "select") ? (openBlock(), createBlock(_component_n_select, mergeProps({
|
|
1615
|
+
key: 0,
|
|
1616
|
+
value: unref(fm)[p.code],
|
|
1617
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event,
|
|
1618
|
+
multiple: !!Array.isArray(unref(fm)[p.code]),
|
|
1619
|
+
options: unref(elemDsk)(p)
|
|
1620
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1621
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1622
|
+
}), null, 16, ["value", "onUpdate:value", "multiple", "options"])) : createCommentVNode("", true),
|
|
1623
|
+
activeUseTs(p, "text|textarea") ? (openBlock(), createBlock(_component_n_input, mergeProps({
|
|
1624
|
+
key: 1,
|
|
1625
|
+
value: unref(fm)[p.code],
|
|
1626
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1627
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1628
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1629
|
+
}), createSlots({ _: 2 }, [
|
|
1630
|
+
p.exts.prefix ? {
|
|
1631
|
+
name: "prefix",
|
|
1632
|
+
fn: withCtx(() => [
|
|
1633
|
+
createTextVNode(toDisplayString(p.exts.prefix), 1)
|
|
1634
|
+
]),
|
|
1635
|
+
key: "0"
|
|
1636
|
+
} : void 0,
|
|
1637
|
+
p.exts.suffix ? {
|
|
1638
|
+
name: "suffix",
|
|
1639
|
+
fn: withCtx(() => [
|
|
1640
|
+
createTextVNode(toDisplayString(p.exts.suffix), 1)
|
|
1641
|
+
]),
|
|
1642
|
+
key: "1"
|
|
1643
|
+
} : void 0
|
|
1644
|
+
]), 1040, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1645
|
+
activeUseTs(p, "number") ? (openBlock(), createBlock(_component_n_input_number, mergeProps({
|
|
1646
|
+
key: 2,
|
|
1647
|
+
value: unref(fm)[p.code],
|
|
1648
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1649
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1650
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1651
|
+
}), createSlots({ _: 2 }, [
|
|
1652
|
+
p.exts.prefix ? {
|
|
1653
|
+
name: "prefix",
|
|
1654
|
+
fn: withCtx(() => [
|
|
1655
|
+
createTextVNode(toDisplayString(p.exts.prefix), 1)
|
|
1656
|
+
]),
|
|
1657
|
+
key: "0"
|
|
1658
|
+
} : void 0,
|
|
1659
|
+
p.exts.suffix ? {
|
|
1660
|
+
name: "suffix",
|
|
1661
|
+
fn: withCtx(() => [
|
|
1662
|
+
createTextVNode(toDisplayString(p.exts.suffix), 1)
|
|
1663
|
+
]),
|
|
1664
|
+
key: "1"
|
|
1665
|
+
} : void 0
|
|
1666
|
+
]), 1040, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1667
|
+
activeUseTs(p, "radio") ? (openBlock(), createBlock(_component_n_radio_group, mergeProps({
|
|
1668
|
+
key: 3,
|
|
1669
|
+
value: unref(fm)[p.code],
|
|
1670
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1671
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1672
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1673
|
+
}), {
|
|
1674
|
+
default: withCtx(() => [
|
|
1675
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(elemDsk)(p), (x) => {
|
|
1676
|
+
return openBlock(), createBlock(_component_n_radio, {
|
|
1677
|
+
key: x.value,
|
|
1678
|
+
value: x.value
|
|
1679
|
+
}, {
|
|
1680
|
+
default: withCtx(() => [
|
|
1681
|
+
createTextVNode(toDisplayString(x.label), 1)
|
|
1682
|
+
]),
|
|
1683
|
+
_: 2
|
|
1684
|
+
}, 1032, ["value"]);
|
|
1685
|
+
}), 128))
|
|
1686
|
+
]),
|
|
1687
|
+
_: 2
|
|
1688
|
+
}, 1040, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1689
|
+
activeUseTs(p, "checkbox") ? (openBlock(), createBlock(_component_n_checkbox_group, mergeProps({
|
|
1690
|
+
key: 4,
|
|
1691
|
+
value: unref(fm)[p.code],
|
|
1692
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1693
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1694
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1695
|
+
}), {
|
|
1696
|
+
default: withCtx(() => [
|
|
1697
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(elemDsk)(p), (x) => {
|
|
1698
|
+
return openBlock(), createBlock(_component_n_checkbox, {
|
|
1699
|
+
key: x.value,
|
|
1700
|
+
value: x.value,
|
|
1701
|
+
label: x.label
|
|
1702
|
+
}, null, 8, ["value", "label"]);
|
|
1703
|
+
}), 128))
|
|
1704
|
+
]),
|
|
1705
|
+
_: 2
|
|
1706
|
+
}, 1040, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1707
|
+
activeUseTs(p, dtks) ? (openBlock(), createBlock(_component_n_date_picker, mergeProps({
|
|
1708
|
+
key: 5,
|
|
1709
|
+
"formatted-value": unref(fm)[p.code],
|
|
1710
|
+
"onUpdate:formattedValue": ($event) => unref(fm)[p.code] = $event
|
|
1711
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1712
|
+
onConfirm: (v) => onCellUpdate(p, v)
|
|
1713
|
+
}), null, 16, ["formatted-value", "onUpdate:formattedValue", "onConfirm"])) : createCommentVNode("", true),
|
|
1714
|
+
activeUseTs(p, "phone|otp") ? (openBlock(), createBlock(_component_n_input_otp, mergeProps({
|
|
1715
|
+
key: 6,
|
|
1716
|
+
value: unref(fm)[p.code],
|
|
1717
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1718
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1719
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1720
|
+
}), createSlots({ _: 2 }, [
|
|
1721
|
+
p.elem == "phone" ? {
|
|
1722
|
+
name: "default",
|
|
1723
|
+
fn: withCtx(({ index: index2, ...inputProps }) => [
|
|
1724
|
+
createVNode(_component_n_input, mergeProps({ ref_for: true }, inputProps), null, 16),
|
|
1725
|
+
index2 === 2 ? (openBlock(), createElementBlock("span", _hoisted_4, "-")) : createCommentVNode("", true),
|
|
1726
|
+
index2 === 6 ? (openBlock(), createElementBlock("span", _hoisted_5, "-")) : createCommentVNode("", true)
|
|
1727
|
+
]),
|
|
1728
|
+
key: "0"
|
|
1729
|
+
} : void 0
|
|
1730
|
+
]), 1040, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1731
|
+
activeUseTs(p, "cascader") ? (openBlock(), createBlock(_component_n_cascader, mergeProps({
|
|
1732
|
+
key: 7,
|
|
1733
|
+
"check-strategy": "child",
|
|
1734
|
+
"expand-trigger": "click",
|
|
1735
|
+
filterable: "",
|
|
1736
|
+
clearable: "",
|
|
1737
|
+
"show-path": "",
|
|
1738
|
+
value: unref(fm)[p.code],
|
|
1739
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1740
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1741
|
+
options: unref(elemDsk)(p),
|
|
1742
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1743
|
+
}), null, 16, ["value", "onUpdate:value", "options"])) : createCommentVNode("", true),
|
|
1744
|
+
activeUseTs(p, "tree") ? (openBlock(), createBlock(_component_n_tree_select, mergeProps({
|
|
1745
|
+
key: 8,
|
|
1746
|
+
cascade: "",
|
|
1747
|
+
filterable: "",
|
|
1748
|
+
clearable: "",
|
|
1749
|
+
"show-path": "",
|
|
1750
|
+
"check-strategy": "child",
|
|
1751
|
+
value: unref(fm)[p.code],
|
|
1752
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1753
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1754
|
+
options: unref(elemDsk)(p),
|
|
1755
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1756
|
+
}), null, 16, ["value", "onUpdate:value", "options"])) : createCommentVNode("", true),
|
|
1757
|
+
activeUseTs(p, "switch") ? (openBlock(), createBlock(_component_n_switch, mergeProps({
|
|
1758
|
+
key: 9,
|
|
1759
|
+
value: unref(fm)[p.code],
|
|
1760
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1761
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1762
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1763
|
+
}), null, 16, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1764
|
+
activeUseTs(p, "tags") ? (openBlock(), createBlock(_component_n_dynamic_tags, mergeProps({
|
|
1765
|
+
key: 10,
|
|
1766
|
+
value: unref(fm)[p.code],
|
|
1767
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event
|
|
1768
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1769
|
+
type: "primary",
|
|
1770
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1771
|
+
}), null, 16, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1772
|
+
activeUseTs(p, "rate") ? (openBlock(), createBlock(_component_n_rate, mergeProps({
|
|
1773
|
+
key: 11,
|
|
1774
|
+
value: unref(fm)[p.code],
|
|
1775
|
+
"onUpdate:value": ($event) => unref(fm)[p.code] = $event,
|
|
1776
|
+
"allow-half": "",
|
|
1777
|
+
color: "#f40"
|
|
1778
|
+
}, { ref_for: true }, itemAttrs(p), {
|
|
1779
|
+
"onUpdate:value": (v) => onCellUpdate(p, v)
|
|
1780
|
+
}), null, 16, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
1781
|
+
renderSlot(_ctx.$slots, `field-${p.code}`, {
|
|
1782
|
+
p,
|
|
1783
|
+
m: unref(fm),
|
|
1784
|
+
s: unref(elemDsk)(p)
|
|
1785
|
+
}, void 0, true)
|
|
1786
|
+
]),
|
|
1787
|
+
_: 2
|
|
1788
|
+
}, 1032, ["path", "class", "show-require-mark", "style"]),
|
|
1789
|
+
renderSlot(_ctx.$slots, "item-after", {
|
|
1790
|
+
p,
|
|
1791
|
+
m: unref(fm),
|
|
1792
|
+
s: unref(elemDsk)(p)
|
|
1793
|
+
}, void 0, true),
|
|
1794
|
+
p.wrap ? (openBlock(), createElementBlock("div", _hoisted_6)) : createCommentVNode("", true)
|
|
1795
|
+
], 64);
|
|
1796
|
+
}), 128))
|
|
1797
|
+
], 6)
|
|
1798
|
+
], 64);
|
|
1799
|
+
}), 128))
|
|
1800
|
+
]),
|
|
1801
|
+
_: 3
|
|
1802
|
+
}, 16, ["model", "rules", "disabled"])
|
|
1803
|
+
]),
|
|
1804
|
+
_: 3
|
|
1805
|
+
}, 8, ["locale", "date-locale"])
|
|
1806
|
+
]);
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
});
|
|
1810
|
+
const cpnt$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-104c9c1b"]]);
|
|
1811
|
+
const SmForm = withInstall(cpnt$2);
|
|
1812
|
+
const _hoisted_1$1 = ["onKeydown", "innerHTML"];
|
|
1813
|
+
const _hoisted_2$1 = { class: "footer" };
|
|
1814
|
+
const _hoisted_3$1 = { class: "tip" };
|
|
1815
|
+
const __default__$1 = defineComponent({
|
|
1816
|
+
name: "sm-doc-editor"
|
|
1817
|
+
});
|
|
1818
|
+
const _sfc_main$1 = /* @__PURE__ */ Object.assign(__default__$1, {
|
|
1819
|
+
props: {
|
|
1820
|
+
config: { type: Object, required: true, default: () => ({}) },
|
|
1821
|
+
template: { type: String, required: true, default: "" },
|
|
1822
|
+
editable: { type: Boolean, default: true },
|
|
1823
|
+
debug: { type: Boolean, default: false },
|
|
1824
|
+
data: { type: Object, required: true, default: () => ({}) }
|
|
1825
|
+
},
|
|
1826
|
+
emits: ["save", "close"],
|
|
1827
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1828
|
+
var _a;
|
|
1829
|
+
const uuid = () => Math.random().toString(36).substring(2, 15);
|
|
1830
|
+
const deepClone2 = (obj) => {
|
|
1831
|
+
if (obj === null || typeof obj !== "object") return obj;
|
|
1832
|
+
const target = Array.isArray(obj) ? [] : {};
|
|
1833
|
+
for (const k in obj) obj.hasOwnProperty(k) && (target[k] = deepClone2(obj[k]));
|
|
1834
|
+
return target;
|
|
1835
|
+
};
|
|
1836
|
+
const parseLukasData = (data2) => {
|
|
1837
|
+
var _a2, _b, _c;
|
|
1838
|
+
const res = deepClone2(data2);
|
|
1839
|
+
const groups = {};
|
|
1840
|
+
for (const key in data2) {
|
|
1841
|
+
const m = key.match(/^iii_(\w+)_iii([^.]+)__iii__(.+)$/);
|
|
1842
|
+
if (!m) continue;
|
|
1843
|
+
const [, uid, arrKey, field] = m;
|
|
1844
|
+
delete res[key];
|
|
1845
|
+
(_a2 = groups[arrKey]) != null ? _a2 : groups[arrKey] = {};
|
|
1846
|
+
(_c = (_b = groups[arrKey])[uid]) != null ? _c : _b[uid] = {};
|
|
1847
|
+
groups[arrKey][uid][field] = data2[key];
|
|
1848
|
+
}
|
|
1849
|
+
Object.entries(groups).forEach(([k, obj]) => {
|
|
1850
|
+
res[k] = Object.values(obj);
|
|
1851
|
+
});
|
|
1852
|
+
return res;
|
|
1853
|
+
};
|
|
1854
|
+
const props = __props;
|
|
1855
|
+
const { config, template, data, debug, editable } = toRefs(props);
|
|
1856
|
+
const $emit = __emit;
|
|
1857
|
+
const editorEl = ref(null);
|
|
1858
|
+
const docEl = ref(null);
|
|
1859
|
+
const editorRect = ref({});
|
|
1860
|
+
const fields = ref([]);
|
|
1861
|
+
const activeField = ref("");
|
|
1862
|
+
const inerDocm = ref(template.value);
|
|
1863
|
+
const inerDss = ref(deepClone2((_a = config.value.dataSettings) != null ? _a : {}));
|
|
1864
|
+
const dsmHasArr = computed(() => {
|
|
1865
|
+
var _a2;
|
|
1866
|
+
return (_a2 = Object.entries(inerDss.value).filter(([k, x]) => x.type === "array").map((x) => ({ ...x[1], code: x[0] }))) != null ? _a2 : [];
|
|
1867
|
+
});
|
|
1868
|
+
const inerMdd = ref({});
|
|
1869
|
+
const anchorDsm = reactive({});
|
|
1870
|
+
const createElem = (k, target) => {
|
|
1871
|
+
var _a2, _b, _c, _d;
|
|
1872
|
+
const d = inerMdd.value;
|
|
1873
|
+
const line = " ".repeat(1);
|
|
1874
|
+
const { placeholder, required, readonly, datasource } = target != null ? target : {};
|
|
1875
|
+
anchorDsm[k] = datasource != null ? datasource : null;
|
|
1876
|
+
const valFn = (v, d2 = "-") => {
|
|
1877
|
+
var _a3;
|
|
1878
|
+
return target.valueFormat ? (_a3 = target.valueFormat) == null ? void 0 : _a3.call(target, v != null ? v : d2, target.index) : v != null ? v : d2;
|
|
1879
|
+
};
|
|
1880
|
+
if (!editable.value) return `<span class="x-val lx-${target.type}" style="${(_a2 = target.cssText) != null ? _a2 : ""}">${valFn(d[k], line)}</span>`;
|
|
1881
|
+
const vIsN = !d[k] && d[k] !== 0;
|
|
1882
|
+
const text = !required ? (_c = (_b = d[k]) != null ? _b : target.placeholder) != null ? _c : line : vIsN ? `<i>※</i>` : d[k];
|
|
1883
|
+
const rowClass = [required && vIsN && "required", readonly && "readonly", vIsN && "empty"].filter(Boolean).join(" ");
|
|
1884
|
+
const attrs = `class="anchor lx-${target.type} ${rowClass}" id="anchor-${k}" data-opts='${JSON.stringify({ key: k, ...inerDss.value[k] })}'`;
|
|
1885
|
+
return `<span ${attrs} style="${(_d = target.cssText) != null ? _d : ""}"> ${valFn(text)} </span>`;
|
|
1886
|
+
};
|
|
1887
|
+
const nxk = (gi, v) => `iii_${gi}_iii${v != null ? v : ""}`;
|
|
1888
|
+
const createDsDm = (x, d) => {
|
|
1889
|
+
var _a2, _b;
|
|
1890
|
+
console.log("x", x);
|
|
1891
|
+
const [tag, gi] = [`<!--${x.code}-->`, uuid()];
|
|
1892
|
+
inerDocm.value = inerDocm.value.replace(new RegExp(`@{s*${x.code}s*}`, "gm"), tag);
|
|
1893
|
+
delete inerDss.value[x.code];
|
|
1894
|
+
const btn = (t) => `<i class="${t}" data-opts='${JSON.stringify({ id: gi, cmd: t, type: "array", item: x })}'></i>`;
|
|
1895
|
+
const gh = [`<!--${gi}$S--><div class="${!editable.value ? "x-val" : ""} lx-array-box" style="${(_a2 = x.cssText) != null ? _a2 : ""}">${editable.value ? btn("add") + btn("del") : ""}`];
|
|
1896
|
+
console.log("x", x);
|
|
1897
|
+
(_b = x.elements) == null ? void 0 : _b.forEach((e, ei) => {
|
|
1898
|
+
e.datasource && (anchorDsm[e.code] = e.datasource);
|
|
1899
|
+
e.parentType = x.type;
|
|
1900
|
+
e.parentCode = x.code;
|
|
1901
|
+
const nfd = nxk(gi, x.code + "__iii__" + e.code);
|
|
1902
|
+
inerDss.value[nfd] = e;
|
|
1903
|
+
inerMdd.value[nfd] = d == null ? void 0 : d[e.code];
|
|
1904
|
+
gh.push(`<span class="gi-item" data-opts='${JSON.stringify({ ...x, element: e })}'>@{${nfd}}</span>`);
|
|
1905
|
+
});
|
|
1906
|
+
gh.push(`</div><!--${gi}$E-->${tag}`);
|
|
1907
|
+
inerDocm.value = inerDocm.value.replace(new RegExp(tag, "gm"), gh.join(""));
|
|
1908
|
+
};
|
|
1909
|
+
const docHtml = computed(() => {
|
|
1910
|
+
var _a2, _b;
|
|
1911
|
+
let index2 = 0;
|
|
1912
|
+
fields.value = [];
|
|
1913
|
+
inerMdd.value = data.value;
|
|
1914
|
+
if (dsmHasArr.value.length) {
|
|
1915
|
+
(_b = (_a2 = dsmHasArr.value) == null ? void 0 : _a2.forEach) == null ? void 0 : _b.call(_a2, (x) => {
|
|
1916
|
+
var _a3, _b2;
|
|
1917
|
+
console.log("xxx:", x, inerMdd.value);
|
|
1918
|
+
(_b2 = (_a3 = inerMdd.value[x.code]) == null ? void 0 : _a3.forEach) == null ? void 0 : _b2.call(_a3, (d) => createDsDm(x, d));
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
!Object.keys(inerMdd.value).length && Object.keys(inerDss.value).forEach((k) => inerMdd.value[k] = inerDss.value[k].value);
|
|
1922
|
+
return inerDocm.value.replace(/@{\s*([\w]+)\s*}/gm, (_, k) => {
|
|
1923
|
+
var _a3;
|
|
1924
|
+
const target = (_a3 = inerDss.value) == null ? void 0 : _a3[k];
|
|
1925
|
+
if (!target) return `<i style="color: red;padding: 0 1rem;">?未绑定字段?</i>`;
|
|
1926
|
+
!target.readonly && fields.value.push(k);
|
|
1927
|
+
target.index = index2++;
|
|
1928
|
+
return createElem(k, target);
|
|
1929
|
+
});
|
|
1930
|
+
});
|
|
1931
|
+
const editPanel = reactive({
|
|
1932
|
+
visible: false,
|
|
1933
|
+
value: "",
|
|
1934
|
+
dsmi: {},
|
|
1935
|
+
style: {}
|
|
1936
|
+
});
|
|
1937
|
+
const dsmiType = computed(() => (t) => editPanel.dsmi.type === t);
|
|
1938
|
+
const elExtPs = computed(() => (t) => {
|
|
1939
|
+
return {
|
|
1940
|
+
size: "large",
|
|
1941
|
+
autofocus: true,
|
|
1942
|
+
placeholder: editPanel.dsmi.placeholder,
|
|
1943
|
+
onKeydown(e) {
|
|
1944
|
+
switch (e.key) {
|
|
1945
|
+
case "Tab":
|
|
1946
|
+
e.preventDefault();
|
|
1947
|
+
break;
|
|
1948
|
+
case "Enter":
|
|
1949
|
+
!t && e.preventDefault();
|
|
1950
|
+
t && onConfirmEdit();
|
|
1951
|
+
break;
|
|
1952
|
+
case "Esc":
|
|
1953
|
+
case "Escape":
|
|
1954
|
+
editPanel.visible = false;
|
|
1955
|
+
break;
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
};
|
|
1959
|
+
});
|
|
1960
|
+
const dlgSs = ref({});
|
|
1961
|
+
const anchorHandler = (e) => {
|
|
1962
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
1963
|
+
const opts = JSON.parse((_c = (_b = (_a2 = e.target) == null ? void 0 : _a2.dataset) == null ? void 0 : _b.opts) != null ? _c : "{}");
|
|
1964
|
+
if (opts.cmd) {
|
|
1965
|
+
switch (opts.cmd) {
|
|
1966
|
+
case "add":
|
|
1967
|
+
const code = opts.item.code;
|
|
1968
|
+
createDsDm({ ...(_d = config.value.dataSettings) == null ? void 0 : _d[code], code });
|
|
1969
|
+
break;
|
|
1970
|
+
case "del":
|
|
1971
|
+
inerDocm.value = inerDocm.value.replace(new RegExp(`<!--${opts.id}\\$S-->.*?<!--${opts.id}\\$E-->`, "gm"), "");
|
|
1972
|
+
delete inerDss.value[opts.id];
|
|
1973
|
+
Object.keys(inerDss.value).forEach((x) => {
|
|
1974
|
+
if (!x.startsWith(nxk(opts.id))) return;
|
|
1975
|
+
delete inerDss.value[x];
|
|
1976
|
+
delete inerMdd.value[x];
|
|
1977
|
+
delete fields.value[x];
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
if (!((_g = (_f = (_e = e.target) == null ? void 0 : _e.className) == null ? void 0 : _f.includes) == null ? void 0 : _g.call(_f, "anchor"))) return editPanel.visible = false;
|
|
1983
|
+
if (opts.readonly) return $messager.warning(`只读字段${debug.value ? `【${opts.key}】` : ""},不可编辑!`);
|
|
1984
|
+
activeField.value = opts.key;
|
|
1985
|
+
editPanel.dsmi = { ...inerDss.value[opts.key], key: opts.key, datasource: anchorDsm[opts.key] };
|
|
1986
|
+
editPanel.value = inerMdd.value[opts.key];
|
|
1987
|
+
editPanel.visible = true;
|
|
1988
|
+
nextTick(() => {
|
|
1989
|
+
var _a3, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
1990
|
+
const dlg = document.querySelector(".pv-dialog");
|
|
1991
|
+
(_b2 = (_a3 = dlg.querySelector(".n-input__input-el")) == null ? void 0 : _a3.focus) == null ? void 0 : _b2.call(_a3);
|
|
1992
|
+
const bx = editorRect.value;
|
|
1993
|
+
const ex = (_e2 = (_d2 = (_c2 = e.target).getBoundingClientRect) == null ? void 0 : _d2.call(_c2)) != null ? _e2 : {};
|
|
1994
|
+
const dx = dlgSs.value = (_g2 = (_f2 = dlg == null ? void 0 : dlg.getBoundingClientRect) == null ? void 0 : _f2.call(dlg)) != null ? _g2 : {};
|
|
1995
|
+
editPanel.style = {
|
|
1996
|
+
top: parseFloat(ex.top - bx.top - dx.height - 20 || 0) + "px",
|
|
1997
|
+
left: parseFloat(ex.left - bx.left - 0 || 0) + "px",
|
|
1998
|
+
width: opts.type === "textarea" ? "500px" : "auto"
|
|
1999
|
+
};
|
|
2000
|
+
});
|
|
2001
|
+
};
|
|
2002
|
+
const tabHandler = (e) => {
|
|
2003
|
+
var _a2;
|
|
2004
|
+
const delm = docEl.value;
|
|
2005
|
+
editPanel.visible && docEl.value.focus();
|
|
2006
|
+
const idx = fields.value.findIndex((x) => x === activeField.value);
|
|
2007
|
+
const nextCode = fields.value[idx + 1];
|
|
2008
|
+
if (!nextCode) return;
|
|
2009
|
+
const el = (_a2 = editorEl.value) == null ? void 0 : _a2.querySelector(`#anchor-${nextCode}`);
|
|
2010
|
+
try {
|
|
2011
|
+
const elTop = el.getBoundingClientRect().top;
|
|
2012
|
+
if (elTop <= editorRect.value.top + delm.clientHeight - dlgSs.value.height - 20) return anchorHandler({ target: el });
|
|
2013
|
+
delm.scrollTo({ top: delm.scrollTop + delm.clientHeight - 240, behavior: "smooth" });
|
|
2014
|
+
setTimeout(() => anchorHandler({ target: el }), 1800);
|
|
2015
|
+
} catch (e2) {
|
|
2016
|
+
console.log(e2);
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
const onConfirmEdit = () => {
|
|
2020
|
+
var _a2, _b, _c;
|
|
2021
|
+
editPanel.visible = false;
|
|
2022
|
+
const { key, type } = editPanel.dsmi;
|
|
2023
|
+
let val = editPanel.value;
|
|
2024
|
+
if (type === "regions") ;
|
|
2025
|
+
else {
|
|
2026
|
+
val = type === "number" ? parseFloat(editPanel.value) : (_c = (_b = (_a2 = editPanel.value) != null ? _a2 : "") == null ? void 0 : _b.trim) == null ? void 0 : _c.call(_b);
|
|
2027
|
+
}
|
|
2028
|
+
inerMdd.value[key] = val;
|
|
2029
|
+
docEl.value.focus();
|
|
2030
|
+
};
|
|
2031
|
+
const validate = () => {
|
|
2032
|
+
return new Promise((resolve) => {
|
|
2033
|
+
var _a2, _b, _c;
|
|
2034
|
+
const eis = [];
|
|
2035
|
+
Object.entries(inerDss.value).forEach(([k, v]) => v.required && inerMdd.value[k] === "" && eis.push({ k, m: v.placeholder }));
|
|
2036
|
+
if (!eis.length) return resolve(true);
|
|
2037
|
+
const tipMsg = eis[0].m || "请填写必填项(带红色 ※ 的字段)";
|
|
2038
|
+
if ((_a2 = window.$messager) == null ? void 0 : _a2.warning) {
|
|
2039
|
+
(_c = (_b = window.$messager) == null ? void 0 : _b.warning) == null ? void 0 : _c.call(_b, tipMsg);
|
|
2040
|
+
} else {
|
|
2041
|
+
Notification.requestPermission().then((perm) => {
|
|
2042
|
+
if (perm === "granted") new Notification("提示", { body: tipMsg });
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
const target = editorEl.value.querySelector(`#anchor-${eis[0].k}`);
|
|
2046
|
+
target && docEl.value.scrollTo({ top: target.offsetTop - dlgSs.value.height - 20, behavior: "smooth" });
|
|
2047
|
+
target && setTimeout(() => anchorHandler({ target }), 1500);
|
|
2048
|
+
resolve(false);
|
|
2049
|
+
});
|
|
2050
|
+
};
|
|
2051
|
+
const onSaveDoc = async () => await validate() && $emit("save", parseLukasData(inerMdd.value));
|
|
2052
|
+
onMounted(() => editorRect.value = editorEl.value.getBoundingClientRect());
|
|
2053
|
+
__expose({
|
|
2054
|
+
isMetReuqired: async () => await validate(),
|
|
2055
|
+
getData: () => parseLukasData(inerMdd.value)
|
|
2056
|
+
});
|
|
2057
|
+
window.__lukas__sm_doc_editor = () => ({
|
|
2058
|
+
inerMdd: inerMdd.value,
|
|
2059
|
+
inerDss: inerDss.value,
|
|
2060
|
+
inerDocm: inerDocm.value,
|
|
2061
|
+
fields: fields.value,
|
|
2062
|
+
anchorDsm,
|
|
2063
|
+
getData: () => parseLukasData(inerMdd.value)
|
|
2064
|
+
});
|
|
2065
|
+
return (_ctx, _cache) => {
|
|
2066
|
+
var _a2, _b, _c;
|
|
2067
|
+
const _component_n_button = NButton;
|
|
2068
|
+
const _component_n_input = NInput;
|
|
2069
|
+
const _component_n_input_number = NInputNumber;
|
|
2070
|
+
const _component_n_select = NSelect;
|
|
2071
|
+
const _component_n_date_picker = NDatePicker;
|
|
2072
|
+
return openBlock(), createElementBlock("div", {
|
|
2073
|
+
ref_key: "editorEl",
|
|
2074
|
+
ref: editorEl,
|
|
2075
|
+
class: "sm-doc-editor"
|
|
2076
|
+
}, [
|
|
2077
|
+
createElementVNode("div", {
|
|
2078
|
+
ref_key: "docEl",
|
|
2079
|
+
ref: docEl,
|
|
2080
|
+
class: "doc",
|
|
2081
|
+
tabindex: "0",
|
|
2082
|
+
onKeydown: withKeys(withModifiers(tabHandler, ["prevent"]), ["tab"]),
|
|
2083
|
+
onClick: anchorHandler,
|
|
2084
|
+
onScroll: _cache[0] || (_cache[0] = ($event) => unref(editPanel).visible = false),
|
|
2085
|
+
innerHTML: unref(docHtml)
|
|
2086
|
+
}, null, 40, _hoisted_1$1),
|
|
2087
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
2088
|
+
createVNode(_component_n_button, {
|
|
2089
|
+
onClick: _cache[1] || (_cache[1] = ($event) => $emit("close"))
|
|
2090
|
+
}, {
|
|
2091
|
+
default: withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
2092
|
+
createTextVNode("关闭", -1)
|
|
2093
|
+
])]),
|
|
2094
|
+
_: 1
|
|
2095
|
+
}),
|
|
2096
|
+
renderSlot(_ctx.$slots, "footer", {
|
|
2097
|
+
scope: { editable: unref(editable) }
|
|
2098
|
+
}, () => [
|
|
2099
|
+
unref(editable) ? (openBlock(), createBlock(_component_n_button, {
|
|
2100
|
+
key: 0,
|
|
2101
|
+
type: "primary",
|
|
2102
|
+
onClick: onSaveDoc
|
|
2103
|
+
}, {
|
|
2104
|
+
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
2105
|
+
createTextVNode("保存", -1)
|
|
2106
|
+
])]),
|
|
2107
|
+
_: 1
|
|
2108
|
+
})) : createCommentVNode("", true)
|
|
2109
|
+
], true)
|
|
2110
|
+
]),
|
|
2111
|
+
unref(editPanel).visible ? (openBlock(), createElementBlock("div", {
|
|
2112
|
+
key: 0,
|
|
2113
|
+
class: "pv-dialog",
|
|
2114
|
+
style: normalizeStyle(unref(editPanel).style)
|
|
2115
|
+
}, [
|
|
2116
|
+
createElementVNode("span", _hoisted_3$1, toDisplayString(unref(debug) ? unref(editPanel).dsmi.key : "提示:按 Enter 键确认录入、按 Tab 键切换字段、按 Esc 键退出编辑。"), 1),
|
|
2117
|
+
unref(dsmiType)("text") ? (openBlock(), createBlock(_component_n_input, mergeProps({
|
|
2118
|
+
key: 0,
|
|
2119
|
+
value: unref(editPanel).value,
|
|
2120
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => unref(editPanel).value = $event)
|
|
2121
|
+
}, unref(elExtPs)(1)), null, 16, ["value"])) : createCommentVNode("", true),
|
|
2122
|
+
createElementVNode("span", {
|
|
2123
|
+
class: "btn-ok",
|
|
2124
|
+
onClick: _cache[3] || (_cache[3] = ($event) => onConfirmEdit())
|
|
2125
|
+
}, "确认"),
|
|
2126
|
+
unref(dsmiType)("textarea") ? (openBlock(), createBlock(_component_n_input, mergeProps({
|
|
2127
|
+
key: 1,
|
|
2128
|
+
value: unref(editPanel).value,
|
|
2129
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => unref(editPanel).value = $event)
|
|
2130
|
+
}, unref(elExtPs)(1), {
|
|
2131
|
+
type: "textarea",
|
|
2132
|
+
rows: 3
|
|
2133
|
+
}), null, 16, ["value"])) : createCommentVNode("", true),
|
|
2134
|
+
unref(dsmiType)("number") ? (openBlock(), createBlock(_component_n_input_number, mergeProps({
|
|
2135
|
+
key: 2,
|
|
2136
|
+
value: unref(editPanel).value,
|
|
2137
|
+
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => unref(editPanel).value = $event)
|
|
2138
|
+
}, unref(elExtPs)(1), { precision: 2 }), null, 16, ["value"])) : createCommentVNode("", true),
|
|
2139
|
+
unref(dsmiType)("select") ? (openBlock(), createBlock(_component_n_select, mergeProps({
|
|
2140
|
+
key: 3,
|
|
2141
|
+
value: unref(editPanel).value,
|
|
2142
|
+
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => unref(editPanel).value = $event),
|
|
2143
|
+
options: (_c = (_b = (_a2 = unref(editPanel).dsmi).datasource) == null ? void 0 : _b.call(_a2)) != null ? _c : []
|
|
2144
|
+
}, unref(elExtPs)(1), {
|
|
2145
|
+
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => onConfirmEdit())
|
|
2146
|
+
}), null, 16, ["value", "options"])) : createCommentVNode("", true),
|
|
2147
|
+
unref(dsmiType)("date") ? (openBlock(), createBlock(_component_n_date_picker, mergeProps({
|
|
2148
|
+
key: 4,
|
|
2149
|
+
format: "yyyy-MM-dd",
|
|
2150
|
+
type: "date",
|
|
2151
|
+
"default-formatted-value": unref(editPanel).value,
|
|
2152
|
+
"on-update:formatted-value": (date) => (unref(editPanel).value = date, onConfirmEdit())
|
|
2153
|
+
}, unref(elExtPs)(1)), null, 16, ["default-formatted-value", "on-update:formatted-value"])) : createCommentVNode("", true),
|
|
2154
|
+
unref(dsmiType)("regions") ? renderSlot(_ctx.$slots, "regions", {
|
|
2155
|
+
key: 5,
|
|
2156
|
+
item: unref(editPanel),
|
|
2157
|
+
attrFn: unref(elExtPs)
|
|
2158
|
+
}, void 0, true) : createCommentVNode("", true),
|
|
2159
|
+
unref(dsmiType)("other1") ? renderSlot(_ctx.$slots, "other1", {
|
|
2160
|
+
key: 6,
|
|
2161
|
+
item: unref(editPanel),
|
|
2162
|
+
attrFn: unref(elExtPs)
|
|
2163
|
+
}, void 0, true) : createCommentVNode("", true),
|
|
2164
|
+
unref(dsmiType)("other2") ? renderSlot(_ctx.$slots, "other2", {
|
|
2165
|
+
key: 7,
|
|
2166
|
+
item: unref(editPanel),
|
|
2167
|
+
attrFn: unref(elExtPs)
|
|
2168
|
+
}, void 0, true) : createCommentVNode("", true)
|
|
2169
|
+
], 4)) : createCommentVNode("", true)
|
|
2170
|
+
], 512);
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
});
|
|
2174
|
+
const cpnt$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f24a2f4b"]]);
|
|
2175
|
+
const SmDocEditor = withInstall(cpnt$1);
|
|
2176
|
+
const _hoisted_1 = { class: "sm-table" };
|
|
2177
|
+
const _hoisted_2 = { class: "empty" };
|
|
2178
|
+
const _hoisted_3 = { class: "tip" };
|
|
2179
|
+
const __default__ = defineComponent({
|
|
2180
|
+
name: "sm-table"
|
|
2181
|
+
});
|
|
2182
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
2183
|
+
props: {
|
|
2184
|
+
rowKey: {
|
|
2185
|
+
type: String,
|
|
2186
|
+
default: "id"
|
|
2187
|
+
},
|
|
2188
|
+
dataList: {
|
|
2189
|
+
type: Array,
|
|
2190
|
+
default: () => []
|
|
2191
|
+
},
|
|
2192
|
+
columns: {
|
|
2193
|
+
type: Array,
|
|
2194
|
+
default: () => []
|
|
2195
|
+
},
|
|
2196
|
+
total: {
|
|
2197
|
+
type: Number,
|
|
2198
|
+
default: -1
|
|
2199
|
+
},
|
|
2200
|
+
loading: {
|
|
2201
|
+
type: Boolean,
|
|
2202
|
+
default: false
|
|
2203
|
+
},
|
|
2204
|
+
summary: {
|
|
2205
|
+
type: Function,
|
|
2206
|
+
default: null
|
|
2207
|
+
},
|
|
2208
|
+
scrollX: {
|
|
2209
|
+
type: Number,
|
|
2210
|
+
default: () => window.innerWidth - 500
|
|
2211
|
+
},
|
|
2212
|
+
minHeight: {
|
|
2213
|
+
type: Number,
|
|
2214
|
+
default: 0
|
|
2215
|
+
},
|
|
2216
|
+
emptyTip: {
|
|
2217
|
+
type: String,
|
|
2218
|
+
default: "暂无数据"
|
|
2219
|
+
}
|
|
2220
|
+
},
|
|
2221
|
+
emits: ["pageChange", "checked"],
|
|
2222
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2223
|
+
const props = __props;
|
|
2224
|
+
const { dataList, columns, total, rowKey, loading, summary, scrollX, minHeight, emptyTip } = toRefs(props);
|
|
2225
|
+
const wating = ref(false);
|
|
2226
|
+
const emit = __emit;
|
|
2227
|
+
computed(() => {
|
|
2228
|
+
const raw = { ...useAttrs() };
|
|
2229
|
+
delete raw.class;
|
|
2230
|
+
delete raw.style;
|
|
2231
|
+
return raw;
|
|
2232
|
+
});
|
|
2233
|
+
const pagination = reactive({
|
|
2234
|
+
page: 1,
|
|
2235
|
+
pageSize: 10,
|
|
2236
|
+
showSizePicker: true,
|
|
2237
|
+
pageSizes: [10, 20, 30, 50, 100].map((value) => ({ label: value + " 条/页", value })),
|
|
2238
|
+
pageCount: 0,
|
|
2239
|
+
prefix: () => "共 " + (total.value || 0) + " 条",
|
|
2240
|
+
onChange: (page) => {
|
|
2241
|
+
pagination.page = page;
|
|
2242
|
+
wating.value = true;
|
|
2243
|
+
emit("pageChange", { page, pageSize: pagination.pageSize });
|
|
2244
|
+
calPageCount(total.value);
|
|
2245
|
+
},
|
|
2246
|
+
onPageSizeChange: (pageSize) => {
|
|
2247
|
+
pagination.pageSize = pageSize;
|
|
2248
|
+
pagination.page = 1;
|
|
2249
|
+
wating.value = true;
|
|
2250
|
+
emit("pageChange", { page: pagination.page, pageSize });
|
|
2251
|
+
calPageCount(total.value);
|
|
2252
|
+
}
|
|
2253
|
+
});
|
|
2254
|
+
function calPageCount(num) {
|
|
2255
|
+
pagination.pageCount = Math.ceil((num != null ? num : total.value) / pagination.pageSize);
|
|
2256
|
+
}
|
|
2257
|
+
watch(() => total.value, (tt) => calPageCount(tt));
|
|
2258
|
+
const columnsList = computed(() => {
|
|
2259
|
+
return columns.value.map((x) => {
|
|
2260
|
+
x.ellipsis = { tooltip: true };
|
|
2261
|
+
if (x.type == "selection") {
|
|
2262
|
+
x.width = 50;
|
|
2263
|
+
x.align = "center";
|
|
2264
|
+
}
|
|
2265
|
+
return x;
|
|
2266
|
+
});
|
|
2267
|
+
});
|
|
2268
|
+
const checkedRowKeysRef = ref([]);
|
|
2269
|
+
watch(
|
|
2270
|
+
() => checkedRowKeysRef.value,
|
|
2271
|
+
(keys) => {
|
|
2272
|
+
var _a;
|
|
2273
|
+
const rows = ((_a = dataList.value) != null ? _a : []).filter((item) => keys.includes(item[rowKey.value]));
|
|
2274
|
+
emit("checked", keys, rows);
|
|
2275
|
+
}
|
|
2276
|
+
);
|
|
2277
|
+
watch(
|
|
2278
|
+
() => dataList.value,
|
|
2279
|
+
() => {
|
|
2280
|
+
if (!wating.value) {
|
|
2281
|
+
pagination.page = 1;
|
|
2282
|
+
pagination.pageSize = 10;
|
|
2283
|
+
calPageCount();
|
|
2284
|
+
}
|
|
2285
|
+
wating.value = false;
|
|
2286
|
+
checkedRowKeysRef.value = [];
|
|
2287
|
+
},
|
|
2288
|
+
{ deep: true }
|
|
2289
|
+
);
|
|
2290
|
+
const refresh = () => {
|
|
2291
|
+
pagination.page = 1;
|
|
2292
|
+
pagination.pageSize = 10;
|
|
2293
|
+
calPageCount();
|
|
2294
|
+
};
|
|
2295
|
+
__expose({ refresh });
|
|
2296
|
+
return (_ctx, _cache) => {
|
|
2297
|
+
const _component_n_data_table = NDataTable;
|
|
2298
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2299
|
+
createVNode(_component_n_data_table, mergeProps({
|
|
2300
|
+
remote: "",
|
|
2301
|
+
striped: "",
|
|
2302
|
+
bordered: false,
|
|
2303
|
+
"single-line": false,
|
|
2304
|
+
"flex-height": ""
|
|
2305
|
+
}, _ctx.tableAttrs, {
|
|
2306
|
+
"checked-row-keys": unref(checkedRowKeysRef),
|
|
2307
|
+
"onUpdate:checkedRowKeys": _cache[0] || (_cache[0] = ($event) => isRef(checkedRowKeysRef) ? checkedRowKeysRef.value = $event : null),
|
|
2308
|
+
columns: unref(columnsList),
|
|
2309
|
+
data: unref(dataList),
|
|
2310
|
+
pagination: unref(total) > 0 ? unref(pagination) : false,
|
|
2311
|
+
"row-key": (row) => row[unref(rowKey)],
|
|
2312
|
+
"scroll-x": unref(scrollX),
|
|
2313
|
+
loading: unref(loading),
|
|
2314
|
+
"min-height": unref(minHeight),
|
|
2315
|
+
summary: unref(summary)
|
|
2316
|
+
}), {
|
|
2317
|
+
empty: withCtx(() => [
|
|
2318
|
+
createElementVNode("div", _hoisted_2, [
|
|
2319
|
+
_cache[1] || (_cache[1] = createElementVNode("svg", {
|
|
2320
|
+
t: "1778142589717",
|
|
2321
|
+
class: "icon",
|
|
2322
|
+
viewBox: "0 0 1585 1024",
|
|
2323
|
+
version: "1.1",
|
|
2324
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2325
|
+
"p-id": "20988",
|
|
2326
|
+
width: "48",
|
|
2327
|
+
height: "48"
|
|
2328
|
+
}, [
|
|
2329
|
+
createElementVNode("path", {
|
|
2330
|
+
d: "M158.504986 699.53534h21.33213a10.500955 10.500955 0 0 1 10.368868 10.434911 10.335846 10.335846 0 0 1-10.368868 10.434912H158.504986v21.133998a10.500955 10.500955 0 0 1-10.566999 10.203759 10.467933 10.467933 0 0 1-7.462943-2.938947 10.23678 10.23678 0 0 1-3.104056-7.264812v-21.133998h-21.332129A10.500955 10.500955 0 0 1 105.669991 709.970251c0-5.745806 4.557018-10.434912 10.368868-10.434911h21.332129v-21.100977a10.500955 10.500955 0 0 1 10.566999-10.23678c5.844871 0 10.566999 4.523996 10.566999 10.23678v21.133999z m1394.84388-83.545337v-21.067954a10.23678 10.23678 0 0 0-3.104056-7.297834 10.467933 10.467933 0 0 0-7.462943-2.938947 10.500955 10.500955 0 0 0-10.566999 10.236781v21.100976h-21.33213a10.467933 10.467933 0 0 0-7.396899 3.071034 10.533977 10.533977 0 0 0 7.396899 17.798789h21.33213v21.100977c0 5.745806 4.722128 10.23678 10.566999 10.23678a10.500955 10.500955 0 0 0 10.566999-10.23678v-21.100977h21.332129a10.335846 10.335846 0 0 0 10.368868-10.434911 10.500955 10.500955 0 0 0-10.368868-10.434912h-21.332129zM785.590339 960.606261H253.541934a21.16702 21.16702 0 0 1-14.925886-6.142068 20.671692 20.671692 0 0 1-6.142068-14.760777c0-11.524633 9.576343-20.869823 21.067954-20.869823h95.829473a82.224462 82.224462 0 0 1-11.227436-41.673603V271.373745c0-22.157676 8.915905-43.423762 24.799426-59.043107a84.998299 84.998299 0 0 1 59.835632-24.403164h63.302929v-20.968888c0-22.157676 8.915905-43.39074 24.799426-59.043108a84.998299 84.998299 0 0 1 59.835632-24.403163h507.017825c22.454873-0.033022 43.952112 8.717774 59.835633 24.370141 15.850499 15.652367 24.799426 36.918453 24.799426 59.07613V772.711808c0 15.190061-4.094712 29.389466-11.260459 41.640581h116.897428c11.689743 0 21.16702 9.246124 21.16702 20.869823 0 11.557655-9.411234 20.902845-21.133998 20.902845h-253.607978v20.968889c0 15.190061-4.094712 29.389466-11.260459 41.673603h11.326502c11.623699 0 21.067954 9.246124 21.067955 20.869823 0 11.557655-9.576343 20.902845-21.067955 20.902845h-111.184643a41.27734 41.27734 0 0 1-6.505309 50.853683 42.433106 42.433106 0 0 1-59.769589 0l-51.448076-50.853683z m77.27118-41.772668h67.19951c23.247398 0 42.102887-18.591314 42.102887-41.871734V270.383089c0-22.553939-18.261095-40.682946-40.782012-40.682946h-510.187925c-22.520917 0-40.782012 18.195052-40.782012 40.682946v606.545748c0 23.115311 19.020598 41.871734 42.069865 41.871734h320.807488l-10.864196-10.765131a41.343384 41.343384 0 0 1-10.963261-40.352727l-19.945211-19.74708a149.258862 149.258862 0 0 1-200.244633-21.563282 144.966019 144.966019 0 0 1 7.000637-198.890736 149.258862 149.258862 0 0 1 201.631552-7.297834 144.966019 144.966019 0 0 1 21.464216 198.230298l19.978233 19.74708c14.595667-3.896581 30.215013 0.231153 40.848056 10.831174l70.666806 69.808238z m151.570394-104.41516h63.600125a42.036843 42.036843 0 0 0 42.069865-41.772668V167.090673c0-23.115311-18.822467-41.772668-42.069865-41.772668H570.41982A42.036843 42.036843 0 0 0 528.349954 167.090673v20.869823h401.4469c22.454873-0.033022 43.952112 8.717774 59.835633 24.370142 15.850499 15.652367 24.799426 36.918453 24.799426 59.076129v543.011666zM269.458477 46.957102h31.502866a15.850499 15.850499 0 0 1 16.04863 15.685389 15.850499 15.850499 0 0 1-16.04863 15.652368H269.458477v31.139625a15.850499 15.850499 0 1 1-31.700997 0V78.261837h-31.502867a16.015608 16.015608 0 0 1-11.326502-4.523996 15.619346 15.619346 0 0 1-4.722127-11.128371 15.850499 15.850499 0 0 1 16.048629-15.652368H237.75748V15.850499a15.850499 15.850499 0 1 1 31.700997 0v31.106603zM21.133998 939.703416c0-11.524633 9.576343-20.869823 21.067955-20.869823h126.936076c11.623699 0 21.067954 9.246124 21.067955 20.869823 0 11.557655-9.576343 20.902845-21.067955 20.902845H42.201953a21.16702 21.16702 0 0 1-14.925887-6.142068 20.671692 20.671692 0 0 1-6.142068-14.760777z m666.480446-134.960392a103.589613 103.589613 0 0 0 27.34211-100.881819 105.075597 105.075597 0 0 0-74.728497-73.836906 106.561581 106.561581 0 0 0-102.070607 27.044913 103.556591 103.556591 0 0 0 0 147.673812 106.594603 106.594603 0 0 0 149.456994 0zM464.94796 313.212457c0-11.524633 9.444255-20.869823 21.133998-20.869823h232.47398c11.656721 0 21.133998 9.34519 21.133998 20.869823 0 11.557655-9.477277 20.902845-21.133998 20.902845h-232.47398a21.200042 21.200042 0 0 1-14.958908-6.109046 20.704714 20.704714 0 0 1-6.17509-14.793799z m0 104.41516c0-11.524633 9.411234-20.869823 21.001911-20.869823h338.408145a20.902845 20.902845 0 1 1 0 41.772668H485.949871a21.133998 21.133998 0 0 1-14.892865-6.142068 20.63867 20.63867 0 0 1-6.109046-14.760777z m0 104.41516c0-11.524633 9.411234-20.869823 21.100976-20.869823H634.019945c11.656721 0 21.100976 9.246124 21.100977 20.869823 0 11.557655-9.411234 20.869823-21.100977 20.869823H486.081958a21.16702 21.16702 0 0 1-14.958908-6.109046 20.671692 20.671692 0 0 1-6.142068-14.760777zM63.401995 396.757794c-22.653004 0-43.588871-11.953918-54.915374-31.337757a61.982054 61.982054 0 0 1 0-62.642491 63.534082 63.534082 0 0 1 54.915374-31.304735c35.003184 0 63.401995 28.035569 63.401994 62.642491s-28.39881 62.642491-63.401994 62.642492z m0-31.337757c11.326502 0 21.794436-5.943937 27.474197-15.652367a31.007538 31.007538 0 0 0 0-31.337757 31.767041 31.767041 0 0 0-27.474197-15.652367c-17.501592 0-31.700997 14.034296-31.700998 31.337756s14.199405 31.304735 31.700998 31.304735zM1373.709882 271.472811c-35.003184 0-63.401995-28.068591-63.401995-62.642492 0-34.606922 28.39881-62.642491 63.401995-62.642491s63.401995 28.035569 63.401994 62.642491c0 34.5739-28.39881 62.642491-63.401994 62.642492z m0-31.337757c11.326502 0 21.794436-5.943937 27.474197-15.652367a31.007538 31.007538 0 0 0 0-31.337757 31.767041 31.767041 0 0 0-27.474197-15.652367c-17.501592 0-31.700997 14.034296-31.700998 31.337756 0 17.270439 14.199405 31.304735 31.700998 31.304735z",
|
|
2331
|
+
"p-id": "20989",
|
|
2332
|
+
fill: "#707070"
|
|
2333
|
+
})
|
|
2334
|
+
], -1)),
|
|
2335
|
+
createElementVNode("span", _hoisted_3, toDisplayString(unref(emptyTip)), 1)
|
|
2336
|
+
])
|
|
2337
|
+
]),
|
|
2338
|
+
_: 1
|
|
2339
|
+
}, 16, ["checked-row-keys", "columns", "data", "pagination", "row-key", "scroll-x", "loading", "min-height", "summary"])
|
|
2340
|
+
]);
|
|
2341
|
+
};
|
|
2342
|
+
}
|
|
2343
|
+
});
|
|
2344
|
+
const cpnt = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25a8c8f1"]]);
|
|
2345
|
+
const SmTable = withInstall(cpnt);
|
|
2346
|
+
const index = {
|
|
2347
|
+
SmEcharts,
|
|
2348
|
+
SmxRolling,
|
|
2349
|
+
SmxRollingList,
|
|
2350
|
+
SmxFileViewer,
|
|
2351
|
+
// 无特殊依赖
|
|
2352
|
+
SmTransition,
|
|
2353
|
+
SmViewport,
|
|
2354
|
+
SmGridLayout,
|
|
2355
|
+
SmDatetime,
|
|
2356
|
+
SmDropdownButtons,
|
|
2357
|
+
SmTabs,
|
|
2358
|
+
SmSteps,
|
|
2359
|
+
SmFeedback,
|
|
2360
|
+
SmRollingNum,
|
|
2361
|
+
SmMultiplePicker,
|
|
2362
|
+
SmForm,
|
|
2363
|
+
SmTable,
|
|
2364
|
+
SmDocEditor
|
|
2365
|
+
};
|
|
2366
|
+
export {
|
|
2367
|
+
SmDatetime,
|
|
2368
|
+
SmDocEditor,
|
|
2369
|
+
SmDropdownButtons,
|
|
2370
|
+
SmEcharts,
|
|
2371
|
+
SmFeedback,
|
|
2372
|
+
SmForm,
|
|
2373
|
+
SmGridLayout,
|
|
2374
|
+
SmMultiplePicker,
|
|
2375
|
+
SmRollingNum,
|
|
2376
|
+
SmSteps,
|
|
2377
|
+
SmTable,
|
|
2378
|
+
SmTabs,
|
|
2379
|
+
SmTransition,
|
|
2380
|
+
SmViewport,
|
|
2381
|
+
SmxFileViewer,
|
|
2382
|
+
SmxRolling,
|
|
2383
|
+
SmxRollingList,
|
|
2384
|
+
index as default
|
|
2385
|
+
};
|