ibsp-fg-page 4.0.2
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/.babelrc +5 -0
- package/.cz-config.cjs +60 -0
- package/.vite/deps_temp_029120a0/package.json +3 -0
- package/.vscode/extensions.json +3 -0
- package/.zed/settings.json +14 -0
- package/README.md +1 -0
- package/config/.env.dev +21 -0
- package/config/.env.fat +21 -0
- package/config/.env.pro +21 -0
- package/config/.env.sit +21 -0
- package/config/.env.template +1 -0
- package/config/.env.test +21 -0
- package/config/.env.uat +21 -0
- package/config/.env.zsdev +21 -0
- package/config/.env.zspro +21 -0
- package/env.d.ts +6 -0
- package/eslint.config.js +202 -0
- package/index.html +84 -0
- package/jsconfig.json +43 -0
- package/package.json +85 -0
- package/packages/README.md +1 -0
- package/packages/config.d.ts +97 -0
- package/packages/index.d.ts +49 -0
- package/packages/index.js +16 -0
- package/packages/package.json +87 -0
- package/public/1.json +1612 -0
- package/public/assets/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.de.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.es.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.fr.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.it.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.ja.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.ko.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.ru.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.zh-cn.js +8 -0
- package/public/assets/vs/base/common/worker/simpleWorker.nls.zh-tw.js +8 -0
- package/public/assets/vs/base/worker/workerMain.js +30 -0
- package/public/assets/vs/basic-languages/abap/abap.js +10 -0
- package/public/assets/vs/basic-languages/apex/apex.js +10 -0
- package/public/assets/vs/basic-languages/azcli/azcli.js +10 -0
- package/public/assets/vs/basic-languages/bat/bat.js +10 -0
- package/public/assets/vs/basic-languages/bicep/bicep.js +11 -0
- package/public/assets/vs/basic-languages/cameligo/cameligo.js +10 -0
- package/public/assets/vs/basic-languages/clojure/clojure.js +10 -0
- package/public/assets/vs/basic-languages/coffee/coffee.js +10 -0
- package/public/assets/vs/basic-languages/cpp/cpp.js +10 -0
- package/public/assets/vs/basic-languages/csharp/csharp.js +10 -0
- package/public/assets/vs/basic-languages/csp/csp.js +10 -0
- package/public/assets/vs/basic-languages/css/css.js +12 -0
- package/public/assets/vs/basic-languages/cypher/cypher.js +10 -0
- package/public/assets/vs/basic-languages/dart/dart.js +10 -0
- package/public/assets/vs/basic-languages/dockerfile/dockerfile.js +10 -0
- package/public/assets/vs/basic-languages/ecl/ecl.js +10 -0
- package/public/assets/vs/basic-languages/elixir/elixir.js +10 -0
- package/public/assets/vs/basic-languages/flow9/flow9.js +10 -0
- package/public/assets/vs/basic-languages/freemarker2/freemarker2.js +12 -0
- package/public/assets/vs/basic-languages/fsharp/fsharp.js +10 -0
- package/public/assets/vs/basic-languages/go/go.js +10 -0
- package/public/assets/vs/basic-languages/graphql/graphql.js +10 -0
- package/public/assets/vs/basic-languages/handlebars/handlebars.js +10 -0
- package/public/assets/vs/basic-languages/hcl/hcl.js +10 -0
- package/public/assets/vs/basic-languages/html/html.js +10 -0
- package/public/assets/vs/basic-languages/ini/ini.js +10 -0
- package/public/assets/vs/basic-languages/java/java.js +10 -0
- package/public/assets/vs/basic-languages/javascript/javascript.js +10 -0
- package/public/assets/vs/basic-languages/julia/julia.js +10 -0
- package/public/assets/vs/basic-languages/kotlin/kotlin.js +10 -0
- package/public/assets/vs/basic-languages/less/less.js +11 -0
- package/public/assets/vs/basic-languages/lexon/lexon.js +10 -0
- package/public/assets/vs/basic-languages/liquid/liquid.js +10 -0
- package/public/assets/vs/basic-languages/lua/lua.js +10 -0
- package/public/assets/vs/basic-languages/m3/m3.js +10 -0
- package/public/assets/vs/basic-languages/markdown/markdown.js +10 -0
- package/public/assets/vs/basic-languages/mdx/mdx.js +10 -0
- package/public/assets/vs/basic-languages/mips/mips.js +10 -0
- package/public/assets/vs/basic-languages/msdax/msdax.js +10 -0
- package/public/assets/vs/basic-languages/mysql/mysql.js +10 -0
- package/public/assets/vs/basic-languages/objective-c/objective-c.js +10 -0
- package/public/assets/vs/basic-languages/pascal/pascal.js +10 -0
- package/public/assets/vs/basic-languages/pascaligo/pascaligo.js +10 -0
- package/public/assets/vs/basic-languages/perl/perl.js +10 -0
- package/public/assets/vs/basic-languages/pgsql/pgsql.js +10 -0
- package/public/assets/vs/basic-languages/php/php.js +10 -0
- package/public/assets/vs/basic-languages/pla/pla.js +10 -0
- package/public/assets/vs/basic-languages/postiats/postiats.js +10 -0
- package/public/assets/vs/basic-languages/powerquery/powerquery.js +10 -0
- package/public/assets/vs/basic-languages/powershell/powershell.js +10 -0
- package/public/assets/vs/basic-languages/protobuf/protobuf.js +11 -0
- package/public/assets/vs/basic-languages/pug/pug.js +10 -0
- package/public/assets/vs/basic-languages/python/python.js +10 -0
- package/public/assets/vs/basic-languages/qsharp/qsharp.js +10 -0
- package/public/assets/vs/basic-languages/r/r.js +10 -0
- package/public/assets/vs/basic-languages/razor/razor.js +10 -0
- package/public/assets/vs/basic-languages/redis/redis.js +10 -0
- package/public/assets/vs/basic-languages/redshift/redshift.js +10 -0
- package/public/assets/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
- package/public/assets/vs/basic-languages/ruby/ruby.js +10 -0
- package/public/assets/vs/basic-languages/rust/rust.js +10 -0
- package/public/assets/vs/basic-languages/sb/sb.js +10 -0
- package/public/assets/vs/basic-languages/scala/scala.js +10 -0
- package/public/assets/vs/basic-languages/scheme/scheme.js +10 -0
- package/public/assets/vs/basic-languages/scss/scss.js +12 -0
- package/public/assets/vs/basic-languages/shell/shell.js +10 -0
- package/public/assets/vs/basic-languages/solidity/solidity.js +10 -0
- package/public/assets/vs/basic-languages/sophia/sophia.js +10 -0
- package/public/assets/vs/basic-languages/sparql/sparql.js +10 -0
- package/public/assets/vs/basic-languages/sql/sql.js +10 -0
- package/public/assets/vs/basic-languages/st/st.js +10 -0
- package/public/assets/vs/basic-languages/swift/swift.js +13 -0
- package/public/assets/vs/basic-languages/systemverilog/systemverilog.js +10 -0
- package/public/assets/vs/basic-languages/tcl/tcl.js +10 -0
- package/public/assets/vs/basic-languages/twig/twig.js +10 -0
- package/public/assets/vs/basic-languages/typescript/typescript.js +10 -0
- package/public/assets/vs/basic-languages/typespec/typespec.js +10 -0
- package/public/assets/vs/basic-languages/vb/vb.js +10 -0
- package/public/assets/vs/basic-languages/wgsl/wgsl.js +307 -0
- package/public/assets/vs/basic-languages/xml/xml.js +10 -0
- package/public/assets/vs/basic-languages/yaml/yaml.js +10 -0
- package/public/assets/vs/editor/editor.main.css +8 -0
- package/public/assets/vs/editor/editor.main.js +768 -0
- package/public/assets/vs/editor/editor.main.nls.de.js +17 -0
- package/public/assets/vs/editor/editor.main.nls.es.js +17 -0
- package/public/assets/vs/editor/editor.main.nls.fr.js +15 -0
- package/public/assets/vs/editor/editor.main.nls.it.js +15 -0
- package/public/assets/vs/editor/editor.main.nls.ja.js +17 -0
- package/public/assets/vs/editor/editor.main.nls.js +15 -0
- package/public/assets/vs/editor/editor.main.nls.ko.js +15 -0
- package/public/assets/vs/editor/editor.main.nls.ru.js +17 -0
- package/public/assets/vs/editor/editor.main.nls.zh-cn.js +17 -0
- package/public/assets/vs/editor/editor.main.nls.zh-tw.js +15 -0
- package/public/assets/vs/language/css/cssMode.js +13 -0
- package/public/assets/vs/language/css/cssWorker.js +77 -0
- package/public/assets/vs/language/html/htmlMode.js +13 -0
- package/public/assets/vs/language/html/htmlWorker.js +454 -0
- package/public/assets/vs/language/json/jsonMode.js +19 -0
- package/public/assets/vs/language/json/jsonWorker.js +42 -0
- package/public/assets/vs/language/typescript/tsMode.js +20 -0
- package/public/assets/vs/language/typescript/tsWorker.js +51328 -0
- package/public/assets/vs/loader.js +11 -0
- package/public/data-model-item.json +33 -0
- package/public/data-model.json +402 -0
- package/public/favicon.ico +0 -0
- package/public/form-data.json +78 -0
- package/public/form-json-schema.ts +33 -0
- package/public/form-json.schema.json +79 -0
- package/public/image/logo.png +0 -0
- package/public/loading.png +0 -0
- package/public/logo.svg +3 -0
- package/scripts/autoImportServiceTypes.js +40 -0
- package/src/App.vue +29 -0
- package/src/api/ibsp-bg-app.js +489 -0
- package/src/api/ibsp-bg-auth.js +24 -0
- package/src/api/ibsp-bg-counter.js +25 -0
- package/src/api/ibsp-bg-dataview.js +124 -0
- package/src/api/ibsp-bg-form.js +167 -0
- package/src/api/ibsp-bg-oss.js +33 -0
- package/src/api/ibsp-bg-page.js +158 -0
- package/src/api/ibsp-bg-problem.js +13 -0
- package/src/api/ibsp-bg-resource.js +30 -0
- package/src/api/ibsp-bg-sif.js +24 -0
- package/src/api/ibsp-bg-user.js +59 -0
- package/src/assets/font/pinia.ttf +0 -0
- package/src/assets/img/bg2.jpeg +0 -0
- package/src/assets/img/bg3.jpeg +0 -0
- package/src/assets/img/haederBg.png +0 -0
- package/src/assets/img/haederName.png +0 -0
- package/src/assets/img/login-bg.jpg +0 -0
- package/src/assets/img/logo.png +0 -0
- package/src/assets/img/logo.svg +1 -0
- package/src/assets/img/newLogo.png +0 -0
- package/src/assets/img/project.jpg +0 -0
- package/src/assets/img/wenjian1.png +0 -0
- package/src/assets/img/wenjian2.png +0 -0
- package/src/assets/img/wenjianjia.png +0 -0
- package/src/assets/img//345/272/225/351/203/250.png +0 -0
- package/src/assets/img//351/227/201/347/250/277/347/271/210/351/215/224/346/210/246/345/264/225/347/200/265/351/225/220/346/262/252/351/226/272/345/233/251/345/201/237/347/272/276/347/261/2032x.png +0 -0
- package/src/assets/img//351/227/201/347/250/277/347/271/210/351/215/224/346/210/246/345/264/225/351/216/276/356/206/274/347/273/251/351/226/270/346/222/262/350/203/266/347/273/261/346/254/2572x.png +0 -0
- package/src/assets/video//347/231/273/345/275/225/350/203/214/346/231/257.mp4 +0 -0
- package/src/bootstrap.ts +26 -0
- package/src/components/common/CascaderContextMenu.vue +82 -0
- package/src/components/common/ContextMenuPlus.vue +103 -0
- package/src/components/common/DragNavMenu.vue +248 -0
- package/src/components/common/NavMenu.vue +203 -0
- package/src/components/common/NavMenuId.vue +140 -0
- package/src/components/common/PageDrawerPopup.vue +329 -0
- package/src/components/common/PageMenuDrag.vue +245 -0
- package/src/components/common/SelectAllIcon.vue +202 -0
- package/src/components/globals/ColorPicker.vue +261 -0
- package/src/components/globals/ContextMenu.vue +143 -0
- package/src/components/globals/FormContainer.vue +122 -0
- package/src/components/globals/IbspIcon.vue +21 -0
- package/src/components/globals/LoginDialog.vue +365 -0
- package/src/components/globals/Message.vue +10 -0
- package/src/components/globals/SvgIcon.vue +122 -0
- package/src/components/ibsp/Cascader.vue +40 -0
- package/src/components/ibsp/FromPage.vue +118 -0
- package/src/components/ibsp/IbspAddTag.vue +143 -0
- package/src/components/ibsp/IbspButton.vue +27 -0
- package/src/components/ibsp/IbspColorPicker.vue +252 -0
- package/src/components/ibsp/IbspColorSelect.vue +14 -0
- package/src/components/ibsp/IbspContextmenu.vue +176 -0
- package/src/components/ibsp/IbspDialog.vue +52 -0
- package/src/components/ibsp/IbspDrawer.vue +44 -0
- package/src/components/ibsp/IbspInput.vue +29 -0
- package/src/components/ibsp/IbspMonacoCode.vue +213 -0
- package/src/components/ibsp/IbspSearchInput.vue +48 -0
- package/src/components/ibsp/IbspSelect.vue +101 -0
- package/src/components/ibsp/IbspSlotEvent.ts +64 -0
- package/src/components/ibsp/IbspTextInput.vue +41 -0
- package/src/components/ibsp/IbspTree.vue +265 -0
- package/src/components/ibsp/IbspTree2.vue +118 -0
- package/src/components/nextui/BoxSelection/hooks/useBoxSelection.ts +165 -0
- package/src/components/nextui/BoxSelection/index.ts +11 -0
- package/src/components/nextui/BoxSelection/index.vue +40 -0
- package/src/components/nextui/BoxSelection/types.ts +50 -0
- package/src/components/nextui/BoxSelection/utils.ts +35 -0
- package/src/components/nextui/Contextmenu/index.ts +230 -0
- package/src/components/nextui/Contextmenu/menu.vue +256 -0
- package/src/components/nextui/DragNode/hooks/useDrag.ts +222 -0
- package/src/components/nextui/DragNode/hooks/useRefLine.ts +878 -0
- package/src/components/nextui/DragNode/hooks/useResize.ts +182 -0
- package/src/components/nextui/DragNode/hooks/useStyle.ts +31 -0
- package/src/components/nextui/DragNode/index.ts +11 -0
- package/src/components/nextui/DragNode/index.vue +140 -0
- package/src/components/nextui/DragNode/types.ts +158 -0
- package/src/components/nextui/DragNode/util.ts +135 -0
- package/src/components/nextui/SketchRule/SketchRule.vue +176 -0
- package/src/components/nextui/SketchRule/components/RulerCanvas.vue +167 -0
- package/src/components/nextui/SketchRule/components/RulerLine.vue +150 -0
- package/src/components/nextui/SketchRule/hooks/useCanvas.ts +232 -0
- package/src/components/nextui/SketchRule/hooks/useRuler.ts +229 -0
- package/src/components/nextui/SketchRule/index.ts +10 -0
- package/src/components/nextui/SketchRule/props.ts +62 -0
- package/src/components/nextui/_utils/index.ts +2 -0
- package/src/components/nextui/_utils/tools.ts +12 -0
- package/src/components/nextui/_utils/vue/install.ts +11 -0
- package/src/components/nextui/button/Button.vue +78 -0
- package/src/components/nextui/button/index.ts +8 -0
- package/src/components/nextui/drag-grid/index.ts +1 -0
- package/src/components/nextui/drag-grid/src/hooks/useDragGrid.ts +219 -0
- package/src/components/nextui/drag-grid/src/hooks/useGridSize.ts +3 -0
- package/src/components/nextui/drag-grid/src/index.vue +213 -0
- package/src/components/nextui/drag-grid/src/props.ts +3 -0
- package/src/components/nextui/index.ts +11 -0
- package/src/components/nextui/modal/index.ts +8 -0
- package/src/components/nextui/modal/index.vue +336 -0
- package/src/components/nextui/monacoCode/MonacoCode.vue +71 -0
- package/src/components/nextui/monacoCode/config.ts +51 -0
- package/src/components/nextui/monacoCode/index.ts +1 -0
- package/src/components/nextui/monacoCode/monacoCode.ts +31 -0
- package/src/components/nextui/monacoCode/useMonacoCode.ts +116 -0
- package/src/components/nextui/nextIcon/Icon.vue +50 -0
- package/src/components/nextui/nextIcon/index.ts +7 -0
- package/src/components/nextui/tabs/Tabs.vue +170 -0
- package/src/components/nextui/tabs/index.ts +8 -0
- package/src/components/nextui/verticalMenu/VerticalMenu.vue +100 -0
- package/src/components/nextui/verticalMenu/index.ts +8 -0
- package/src/components/production/ibsp-icon/index.vue +52 -0
- package/src/components/production/index.ts +1 -0
- package/src/directives/index.js +21 -0
- package/src/directives/modules/v-drag.js +177 -0
- package/src/directives/modules/v-resize.js +277 -0
- package/src/hooks/useApp.ts +4 -0
- package/src/hooks/useClipboard.ts +56 -0
- package/src/hooks/useEnv.ts +13 -0
- package/src/hooks/useForm.ts +8 -0
- package/src/hooks/useKeyboard.ts +188 -0
- package/src/hooks/usePage.ts +11 -0
- package/src/icons/iconFont/antd/demo.css +539 -0
- package/src/icons/iconFont/antd/demo_index.html +13965 -0
- package/src/icons/iconFont/antd/iconfont.css +2411 -0
- package/src/icons/iconFont/antd/iconfont.js +27 -0
- package/src/icons/iconFont/antd/iconfont.json +4202 -0
- package/src/icons/iconFont/antd/iconfont.ttf +0 -0
- package/src/icons/iconFont/antd/iconfont.woff +0 -0
- package/src/icons/iconFont/antd/iconfont.woff2 +0 -0
- package/src/icons/iconFont/import.css +1 -0
- package/src/icons/iconFont/index.js +10 -0
- package/src/icons/svg/default_file.svg +1 -0
- package/src/icons/svg/default_folder.svg +1 -0
- package/src/icons/svg/default_folder_opened.svg +1 -0
- package/src/icons/svg/file_type_css.svg +1 -0
- package/src/icons/svg/file_type_js.svg +1 -0
- package/src/icons/svg/file_type_json.svg +1 -0
- package/src/icons/svg/file_type_vue.svg +1 -0
- package/src/icons/svg/if.svg +1 -0
- package/src/icons/svg/logo.svg +14 -0
- package/src/icons/svg/softLogo.svg +42 -0
- package/src/icons/svg//344/270/212/346/217/222/345/205/245/350/241/214.svg +7 -0
- package/src/icons/svg//344/270/212/346/254/241.svg +1 -0
- package/src/icons/svg//344/270/212/347/247/273.svg +4 -0
- package/src/icons/svg//344/270/213/346/213/211/351/200/211/346/213/251.svg +3 -0
- package/src/icons/svg//344/270/213/346/217/222/345/205/245/350/241/214.svg +7 -0
- package/src/icons/svg//344/270/213/347/247/273.svg +4 -0
- package/src/icons/svg//344/270/273/350/246/201/346/214/211/351/222/256.svg +3 -0
- package/src/icons/svg//344/272/244/344/272/222/351/205/215/347/275/256.svg +1 -0
- package/src/icons/svg//344/277/235/345/255/230.svg +16 -0
- package/src/icons/svg//344/277/235/345/255/2302.svg +1 -0
- package/src/icons/svg//344/277/241/346/201/257/346/214/211/351/222/256.svg +3 -0
- package/src/icons/svg//345/201/234/346/234/272/345/205/254/345/221/212.svg +5 -0
- package/src/icons/svg//345/205/263/344/272/216/346/210/221/344/273/254.svg +5 -0
- package/src/icons/svg//345/205/266/344/273/226.svg +3 -0
- package/src/icons/svg//345/206/205/350/201/224/346/241/206/346/236/266.svg +6 -0
- package/src/icons/svg//345/210/206/346/224/257.svg +1 -0
- package/src/icons/svg//345/210/207/346/215/242.svg +1 -0
- package/src/icons/svg//345/210/240/351/231/244.svg +1 -0
- package/src/icons/svg//345/210/240/351/231/244/345/270/203/345/261/200.svg +1 -0
- package/src/icons/svg//345/210/240/351/231/244/345/275/223/345/211/215/345/210/227.svg +7 -0
- package/src/icons/svg//345/210/240/351/231/244/345/275/223/345/211/215/350/241/214.svg +7 -0
- package/src/icons/svg//345/211/252/345/210/207.svg +1 -0
- package/src/icons/svg//345/215/225/350/241/214/350/276/223/345/205/245.svg +3 -0
- package/src/icons/svg//345/215/225/351/200/211.svg +4 -0
- package/src/icons/svg//345/215/241/347/211/207/345/256/271/345/231/250.svg +7 -0
- package/src/icons/svg//345/215/241/347/211/207/345/270/203/345/261/200.svg +3 -0
- package/src/icons/svg//345/215/261/351/231/251/346/214/211/351/222/256.svg +3 -0
- package/src/icons/svg//345/216/206/345/217/262/346/223/215/344/275/234.svg +1 -0
- package/src/icons/svg//345/217/226/346/266/210/347/273/204/345/220/210.svg +3 -0
- package/src/icons/svg//345/217/260/350/264/246/344/277/241/346/201/257.svg +1 -0
- package/src/icons/svg//345/217/263/346/217/222/345/205/245/345/210/227.svg +7 -0
- package/src/icons/svg//345/220/221/344/270/213/345/220/210/345/271/266.svg +6 -0
- package/src/icons/svg//345/220/221/345/217/263/345/220/210/345/271/266.svg +6 -0
- package/src/icons/svg//345/233/276/345/261/202.svg +1 -0
- package/src/icons/svg//345/233/276/347/211/207.svg +3 -0
- package/src/icons/svg//345/233/276/350/241/250.svg +3 -0
- package/src/icons/svg//345/237/272/347/241/200.svg +7 -0
- package/src/icons/svg//345/244/215/345/210/266.svg +1 -0
- package/src/icons/svg//345/244/215/351/200/211.svg +3 -0
- package/src/icons/svg//345/244/232/350/241/214/350/276/223/345/205/245.svg +5 -0
- package/src/icons/svg//345/244/247/347/272/262.svg +1 -0
- package/src/icons/svg//345/255/220/350/241/250/345/215/225.svg +13 -0
- package/src/icons/svg//345/256/253/346/240/274/345/270/203/345/261/200.svg +9 -0
- package/src/icons/svg//345/256/271/345/231/250.svg +3 -0
- package/src/icons/svg//345/257/206/347/240/201.svg +3 -0
- package/src/icons/svg//345/257/274/350/210/252/346/241/206/346/236/266.svg +9 -0
- package/src/icons/svg//345/261/236/346/200/247.svg +1 -0
- package/src/icons/svg//345/267/246/346/217/222/345/205/245/345/210/227.svg +7 -0
- package/src/icons/svg//345/270/203/345/261/200.svg +5 -0
- package/src/icons/svg//345/271/263/345/217/260/347/272/247.svg +1 -0
- package/src/icons/svg//345/272/224/347/224/250.svg +1 -0
- package/src/icons/svg//345/272/224/347/224/250/347/272/247.svg +12 -0
- package/src/icons/svg//345/272/225/351/203/250.png +0 -0
- package/src/icons/svg//345/274/200/345/205/263.svg +3 -0
- package/src/icons/svg//345/274/200/345/217/221/344/270/255.svg +133 -0
- package/src/icons/svg//345/274/271/346/200/247/345/270/203/345/261/200.svg +6 -0
- package/src/icons/svg//345/274/271/347/252/227.svg +3 -0
- package/src/icons/svg//346/210/220/345/212/237/346/214/211/351/222/256.svg +3 -0
- package/src/icons/svg//346/211/223/347/240/201/351/230/237/345/210/227.svg +14 -0
- package/src/icons/svg//346/212/230/345/217/240/351/235/242/346/235/277.svg +3 -0
- package/src/icons/svg//346/213/206/345/210/206/346/210/220/345/210/227.svg +8 -0
- package/src/icons/svg//346/213/206/345/210/206/346/210/220/350/241/214.svg +8 -0
- package/src/icons/svg//346/216/247/345/210/266/345/217/260.svg +13 -0
- package/src/icons/svg//346/217/217/350/277/260/345/210/227/350/241/250.svg +3 -0
- package/src/icons/svg//346/224/276/345/244/247.svg +12 -0
- package/src/icons/svg//346/225/260/346/215/256.svg +3 -0
- package/src/icons/svg//346/225/260/346/215/256/346/272/220/346/250/241/345/236/213.svg +1 -0
- package/src/icons/svg//346/225/260/346/215/256/351/205/215/347/275/256.svg +1 -0
- package/src/icons/svg//346/226/207/344/273/266/344/270/212/344/274/240.svg +3 -0
- package/src/icons/svg//346/226/207/346/234/254.svg +3 -0
- package/src/icons/svg//346/226/207/346/234/254/346/214/211/351/222/256.svg +3 -0
- package/src/icons/svg//346/226/260/345/242/236/345/270/203/345/261/200.svg +1 -0
- package/src/icons/svg//346/226/260/345/242/236/351/241/265/351/235/242.svg +1 -0
- package/src/icons/svg//346/226/271/346/263/225/345/272/223.svg +9 -0
- package/src/icons/svg//346/227/245/346/234/237/350/214/203/345/233/264.svg +3 -0
- package/src/icons/svg//346/227/245/346/234/237/351/200/211/346/213/251.svg +3 -0
- package/src/icons/svg//346/227/266/351/227/264/350/214/203/345/233/264.svg +3 -0
- package/src/icons/svg//346/227/266/351/227/264/351/200/211/346/213/251.svg +3 -0
- package/src/icons/svg//346/230/276/347/244/272.svg +1 -0
- package/src/icons/svg//346/234/215/345/212/241/345/231/250.svg +12 -0
- package/src/icons/svg//346/235/203/351/231/220.svg +13 -0
- package/src/icons/svg//346/240/205/346/240/274/345/270/203/345/261/200.svg +6 -0
- package/src/icons/svg//346/240/207/347/255/276/351/241/265.svg +6 -0
- package/src/icons/svg//346/240/207/351/242/230.svg +3 -0
- package/src/icons/svg//346/240/221/345/275/242.svg +3 -0
- package/src/icons/svg//346/243/200/346/265/213/346/217/220/351/206/222.svg +12 -0
- package/src/icons/svg//346/250/241/345/236/213/344/273/223/345/272/223.svg +1 -0
- package/src/icons/svg//346/250/241/345/236/213/345/217/202/346/225/260.svg +1 -0
- package/src/icons/svg//346/250/241/346/235/277/345/272/223.svg +1 -0
- package/src/icons/svg//346/255/245/351/252/244/346/235/241.svg +3 -0
- package/src/icons/svg//346/267/273/345/212/240/344/270/200/345/210/227.svg +7 -0
- package/src/icons/svg//346/267/273/345/212/240/344/270/200/350/241/214.svg +7 -0
- package/src/icons/svg//346/270/205/347/251/272.svg +1 -0
- package/src/icons/svg//346/273/221/345/235/227.svg +3 -0
- package/src/icons/svg//347/202/271/345/207/273.svg +13 -0
- package/src/icons/svg//347/211/210/346/234/254.svg +11 -0
- package/src/icons/svg//347/211/210/346/234/254/346/233/264/346/226/260.svg +5 -0
- package/src/icons/svg//347/247/273/345/212/250/347/253/257/345/257/274/350/210/252/346/241/206/346/236/266.svg +12 -0
- package/src/icons/svg//347/251/272/346/225/260/346/215/2562.svg +1 -0
- package/src/icons/svg//347/251/277/346/242/255/346/241/206.svg +3 -0
- package/src/icons/svg//347/262/230/350/264/264.svg +1 -0
- package/src/icons/svg//347/272/247/350/201/224/351/200/211/346/213/251.svg +3 -0
- package/src/icons/svg//347/273/204/344/273/266/345/272/223.svg +1 -0
- package/src/icons/svg//347/273/204/344/273/266/350/204/232/346/234/254.svg +9 -0
- package/src/icons/svg//347/273/204/345/220/210.svg +4 -0
- package/src/icons/svg//347/273/223/346/236/234.svg +10 -0
- package/src/icons/svg//347/273/230/345/210/266.svg +1 -0
- package/src/icons/svg//347/275/256/345/272/225.svg +4 -0
- package/src/icons/svg//347/275/256/351/241/266.svg +4 -0
- package/src/icons/svg//350/204/232/346/234/254.svg +1 -0
- package/src/icons/svg//350/204/232/346/234/2542.svg +1 -0
- package/src/icons/svg//350/204/232/346/234/254/345/272/223.svg +9 -0
- package/src/icons/svg//350/204/232/346/234/254/351/205/215/347/275/256.svg +1 -0
- package/src/icons/svg//350/204/232/346/234/254/351/235/242/346/235/277.svg +13 -0
- package/src/icons/svg//350/207/252/347/224/261/345/270/203/345/261/200.svg +7 -0
- package/src/icons/svg//350/241/250/345/215/225.svg +3 -0
- package/src/icons/svg//350/241/250/345/215/225/345/256/271/345/231/250.svg +9 -0
- package/src/icons/svg//350/241/250/345/215/225/347/273/204/344/273/266.svg +1 -0
- package/src/icons/svg//350/241/250/345/215/225/351/207/215/345/244/215/350/212/202.svg +10 -0
- package/src/icons/svg//350/241/250/346/240/274.svg +7 -0
- package/src/icons/svg//350/241/250/346/240/274/345/210/227.svg +8 -0
- package/src/icons/svg//350/241/250/346/240/274/345/270/203/345/261/200.svg +8 -0
- package/src/icons/svg//350/241/250/346/240/274/350/241/214.svg +8 -0
- package/src/icons/svg//350/241/250/350/276/276/345/274/217.svg +1 -0
- package/src/icons/svg//350/247/206/351/242/221.svg +3 -0
- package/src/icons/svg//350/255/246/345/221/212/346/214/211/351/222/256.svg +3 -0
- package/src/icons/svg//350/257/204/345/210/206.svg +3 -0
- package/src/icons/svg//350/257/246/347/273/206.svg +1 -0
- package/src/icons/svg//350/264/246/345/217/267.svg +3 -0
- package/src/icons/svg//350/264/246/345/217/267/345/256/211/345/205/250.svg +12 -0
- package/src/icons/svg//350/275/256/346/222/255.svg +3 -0
- package/src/icons/svg//350/277/220/350/241/214/350/204/232/346/234/254.svg +12 -0
- package/src/icons/svg//350/277/233/345/272/246/346/235/241.svg +3 -0
- package/src/icons/svg//351/200/232/347/224/250.svg +11 -0
- package/src/icons/svg//351/203/250/351/227/250.svg +3 -0
- package/src/icons/svg//351/207/215/345/244/215/350/212/202.svg +3 -0
- package/src/icons/svg//351/207/215/345/244/215/350/241/250.svg +3 -0
- package/src/icons/svg//351/232/220/350/227/217.svg +1 -0
- package/src/icons/svg//351/241/265/351/235/242.svg +1 -0
- package/src/icons/svg//351/241/265/351/235/2421.svg +3 -0
- package/src/icons/svg//351/241/265/351/235/2422.svg +3 -0
- package/src/icons/svg//351/241/265/351/235/2423.svg +1 -0
- package/src/icons/svg//351/241/265/351/235/242/345/256/271/345/231/250.svg +7 -0
- package/src/icons/svg//351/241/265/351/235/242/351/205/215/347/275/256.svg +1 -0
- package/src/icons/svg//351/242/204/350/247/210.svg +1 -0
- package/src/icons/svg//351/273/230/350/256/244/346/214/211/351/222/256.svg +3 -0
- package/src/libs/drag/index.vue +1546 -0
- package/src/libs/drag/utils/dom.js +60 -0
- package/src/libs/drag/utils/fns.js +39 -0
- package/src/libs/drag/vue-draggable-resizable.css +102 -0
- package/src/libs/ibspForm/FormMaking.common.js +29452 -0
- package/src/libs/ibspForm/FormMaking.css +10 -0
- package/src/libs/ibspForm/FormMaking.umd.js +29456 -0
- package/src/libs/ibspForm/FormMaking.umd.min.js +29441 -0
- package/src/libs/ibspForm/demo.html +10 -0
- package/src/libs/ibspForm/fonts/iconfont.122c3730.woff2 +0 -0
- package/src/libs/ibspForm/fonts/iconfont.2a264583.woff +0 -0
- package/src/libs/ibspForm/fonts/iconfont.3e777971.ttf +0 -0
- package/src/libs/uni/uni.webview.1.5.5.js +58 -0
- package/src/libs/vanilla-js-wheel-zoom/calculator.js +103 -0
- package/src/libs/vanilla-js-wheel-zoom/default-options.js +52 -0
- package/src/libs/vanilla-js-wheel-zoom/observers/AbstractObserver.js +51 -0
- package/src/libs/vanilla-js-wheel-zoom/observers/DragScrollableObserver.js +103 -0
- package/src/libs/vanilla-js-wheel-zoom/observers/InteractionObserver.js +122 -0
- package/src/libs/vanilla-js-wheel-zoom/observers/PinchToZoomObserver.js +86 -0
- package/src/libs/vanilla-js-wheel-zoom/toolkit.js +121 -0
- package/src/libs/vanilla-js-wheel-zoom/wheel-zoom.js +446 -0
- package/src/libs/vuedraggable/core/componentBuilderHelper.js +47 -0
- package/src/libs/vuedraggable/core/componentStructure.js +69 -0
- package/src/libs/vuedraggable/core/renderHelper.js +57 -0
- package/src/libs/vuedraggable/core/sortableEvents.js +18 -0
- package/src/libs/vuedraggable/util/console.js +9 -0
- package/src/libs/vuedraggable/util/htmlHelper.js +15 -0
- package/src/libs/vuedraggable/util/string.js +12 -0
- package/src/libs/vuedraggable/util/tags.js +138 -0
- package/src/libs/vuedraggable/vuedraggable.js +317 -0
- package/src/libs/vuejs-loadmore/icon/index.js +3 -0
- package/src/libs/vuejs-loadmore/icon/loading.scss +59 -0
- package/src/libs/vuejs-loadmore/icon/loading.vue +21 -0
- package/src/libs/vuejs-loadmore/index.js +18 -0
- package/src/libs/vuejs-loadmore/locale/index.js +32 -0
- package/src/libs/vuejs-loadmore/locale/lang/en-US.js +13 -0
- package/src/libs/vuejs-loadmore/locale/lang/zh-CN.js +13 -0
- package/src/libs/vuejs-loadmore/mixins/bind-event.js +21 -0
- package/src/libs/vuejs-loadmore/mixins/timer.js +22 -0
- package/src/libs/vuejs-loadmore/mixins/touch.js +58 -0
- package/src/libs/vuejs-loadmore/style/var.scss +23 -0
- package/src/libs/vuejs-loadmore/utils/event.js +20 -0
- package/src/libs/vuejs-loadmore/utils/getDeepValByKey.js +14 -0
- package/src/libs/vuejs-loadmore/utils/scroll.js +30 -0
- package/src/libs/vuejs-loadmore/utils/throttle.js +39 -0
- package/src/libs/vuejs-loadmore/vuejs-loadmore/index.scss +39 -0
- package/src/libs/vuejs-loadmore/vuejs-loadmore/index.vue +317 -0
- package/src/main.ts +85 -0
- package/src/models/app/ComponentLib.ts +189 -0
- package/src/models/app/IbspApp.ts +362 -0
- package/src/models/app/_utils.ts +38 -0
- package/src/models/app/app.d.ts +118 -0
- package/src/models/app/index.ts +2 -0
- package/src/models/app/uni/index.ts +1 -0
- package/src/models/app/uni/useUniAction.ts +174 -0
- package/src/models/command/CommandTypes.d.ts +24 -0
- package/src/models/command/index.ts +40 -0
- package/src/models/component/index.ts +56 -0
- package/src/models/dataModel/index.ts +243 -0
- package/src/models/dataModel/models/CategoryDict.ts +35 -0
- package/src/models/dataModel/models/DataSource.ts +181 -0
- package/src/models/dataModel/models/DataView.ts +132 -0
- package/src/models/dataModel/models/Script.ts +15 -0
- package/src/models/dataModel/models/ServiceInterface.ts +114 -0
- package/src/models/dataModel/models/Static.ts +24 -0
- package/src/models/dataModel/types/DataSource.d.ts +70 -0
- package/src/models/disabledState/StateTypes.d.ts +12 -0
- package/src/models/disabledState/index.ts +45 -0
- package/src/models/dynamicValues/index.ts +1 -0
- package/src/models/index.ts +6 -0
- package/src/models/page/IbspForm.ts +67 -0
- package/src/models/page/IbspPage.ts +571 -0
- package/src/models/page/data/api.ts +24 -0
- package/src/models/page/data/utils.ts +214 -0
- package/src/models/page/index.ts +3 -0
- package/src/models/script/index.ts +1 -0
- package/src/models/service/index.ts +35 -0
- package/src/models/tools/ComponentEvent.ts +42 -0
- package/src/models/tools/IbspEvents.ts +40 -0
- package/src/models/tools/IbspPageTools.ts +35 -0
- package/src/models/useComponentModel.js +1271 -0
- package/src/models/useConsole.ts +135 -0
- package/src/models/useDynamicValueModel.js +576 -0
- package/src/models/useEditorEnv.ts +55 -0
- package/src/models/useGlobalEvents.ts +44 -0
- package/src/models/useHistoryStackModel.ts +949 -0
- package/src/models/useJavascriptAnalysis.js +501 -0
- package/src/models/usePageModel.js +1087 -0
- package/src/models/useStack.ts +41 -0
- package/src/prodModels/index.ts +1 -0
- package/src/prodModels/useGlobalEvent/events.ts +7 -0
- package/src/prodModels/useGlobalEvent/index.ts +54 -0
- package/src/router/hooks/useGuard.ts +16 -0
- package/src/router/hooks/useJumpTo.ts +39 -0
- package/src/router/index.ts +62 -0
- package/src/router/meta.d.ts +7 -0
- package/src/stores/index.ts +3 -0
- package/src/stores/useComponentStore.ts +250 -0
- package/src/stores/usePlatformLibStore.js +212 -0
- package/src/stores/usePlatformStore.js +299 -0
- package/src/styles/global.less +516 -0
- package/src/styles/index-preview.ts +2 -0
- package/src/styles/index.ts +4 -0
- package/src/styles/reset.css +142 -0
- package/src/styles/theme/antdui.less +12 -0
- package/src/styles/theme/default-ui.less +9 -0
- package/src/styles/theme/elementui.less +178 -0
- package/src/styles/theme/index.less +4 -0
- package/src/styles/theme/nextui.less +550 -0
- package/src/types/config.d.ts +107 -0
- package/src/types/config2.d.ts +97 -0
- package/src/types/global.d.ts +90 -0
- package/src/types/ibsp.d.ts +112 -0
- package/src/types/index.ts +1 -0
- package/src/types/module.d.ts +105 -0
- package/src/types/platform.ts +19 -0
- package/src/types/service.d.ts +28 -0
- package/src/utils/config.ts +54 -0
- package/src/utils/configData.js +170 -0
- package/src/utils/dataProcess.js +0 -0
- package/src/utils/index.js +558 -0
- package/src/utils/request.js +82 -0
- package/src/utils/toolFuns.ts +11 -0
- package/src/views/builtins/components/message/Index.vue +104 -0
- package/src/views/builtins/error/404.vue +527 -0
- package/src/views/builtins/index.ts +136 -0
- package/src/views/builtins/login/MobileIndex.vue +496 -0
- package/src/views/builtins/login/MobileIndex_v1.vue +259 -0
- package/src/views/builtins/login/MobileIndex_v2.vue +421 -0
- package/src/views/builtins/login/WindowIndex.vue +288 -0
- package/src/views/builtins/login/mobile/svgData.js +67 -0
- package/src/views/builtins/login/useLogin.ts +63 -0
- package/src/views/builtins/message/MobileIndex.vue +309 -0
- package/src/views/builtins/message/mobile/svgData.js +28 -0
- package/src/views/builtins/my/MobileIndex.vue +508 -0
- package/src/views/builtins/my/index.vue +69 -0
- package/src/views/builtins/my/mobile/about/index.vue +16 -0
- package/src/views/builtins/my/mobile/account/Index.vue +129 -0
- package/src/views/builtins/my/mobile/auth/index.vue +16 -0
- package/src/views/builtins/my/mobile/password/Index.vue +352 -0
- package/src/views/builtins/my/mobile/password/svgData.js +67 -0
- package/src/views/builtins/my/mobile/problem/Index.vue +573 -0
- package/src/views/builtins/my/mobile/problem/svgData.js +26 -0
- package/src/views/builtins/my/mobile/server/Server.vue +152 -0
- package/src/views/builtins/my/mobile/setting/index.vue +16 -0
- package/src/views/builtins/my/mobile/svgData.js +263 -0
- package/src/views/builtins/my/mobile/switch-account/component/UserAvatar.vue +95 -0
- package/src/views/builtins/my/mobile/switch-account/index.vue +107 -0
- package/src/views/builtins/util/userAccout.ts +33 -0
- package/src/views/designer/components/BindValueConfig/components/Component.vue +38 -0
- package/src/views/designer/components/BindValueConfig/components/Const.vue +36 -0
- package/src/views/designer/components/BindValueConfig/components/Var.vue +38 -0
- package/src/views/designer/components/BindValueConfig/index.vue +115 -0
- package/src/views/designer/components/DragMenu.vue +135 -0
- package/src/views/designer/components/DrawerLodding.vue +69 -0
- package/src/views/designer/components/FloatModuleCard.vue +136 -0
- package/src/views/designer/components/PlatformLibLayout.vue +238 -0
- package/src/views/designer/components/ScriptPopup.vue +8 -0
- package/src/views/designer/components/drag/index.vue +1546 -0
- package/src/views/designer/components/drag/utils/dom.js +60 -0
- package/src/views/designer/components/drag/utils/fns.js +39 -0
- package/src/views/designer/components/drag/vue-draggable-resizable.css +102 -0
- package/src/views/designer/hooks/keyboardModule/index.js +43 -0
- package/src/views/designer/hooks/keyboardModule/modules/cvx.js +543 -0
- package/src/views/designer/hooks/keyboardModule/modules/del.js +47 -0
- package/src/views/designer/hooks/keyboardModule/modules/direction.js +38 -0
- package/src/views/designer/hooks/keyboardModule/modules/redo.js +22 -0
- package/src/views/designer/hooks/keyboardModule/modules/undo.js +12 -0
- package/src/views/designer/hooks/useConfigComponent.js +28 -0
- package/src/views/designer/hooks/useInitPage.ts +60 -0
- package/src/views/designer/hooks/useKeyboard.js +51 -0
- package/src/views/designer/hooks/usePageFloatMenu.js +137 -0
- package/src/views/designer/hooks/usePageValueData.js +92 -0
- package/src/views/designer/hooks/usePullDrag.js +160 -0
- package/src/views/designer/hooks/useRegisterKeyboard.js +328 -0
- package/src/views/designer/index.ts +3 -0
- package/src/views/designer/index.vue +121 -0
- package/src/views/designer/layout/FrameworkLayout.vue +542 -0
- package/src/views/designer/layout/LayoutDefault.vue +299 -0
- package/src/views/designer/layout/LayoutNextUi.vue +18 -0
- package/src/views/designer/layout/index.vue +54 -0
- package/src/views/designer/modules/canvas/canvas.service.ts +62 -0
- package/src/views/designer/modules/canvas/index.ts +4 -0
- package/src/views/designer/modules/canvas/src/CanvasHeaderTools.vue +409 -0
- package/src/views/designer/modules/canvas/src/components/AliginButtons.vue +120 -0
- package/src/views/designer/modules/canvas/src/components/GroupButton.vue +76 -0
- package/src/views/designer/modules/canvas/src/components/HistoryButton.vue +80 -0
- package/src/views/designer/modules/canvas/src/components/SortIndex.vue +86 -0
- package/src/views/designer/modules/canvas/src/components/toolbarPanel.vue +194 -0
- package/src/views/designer/modules/canvas/src/hooks/commonDisabledState.ts +42 -0
- package/src/views/designer/modules/canvas/src/hooks/commonMethods.ts +167 -0
- package/src/views/designer/modules/canvas/src/hooks/useAligin.ts +239 -0
- package/src/views/designer/modules/canvas/src/hooks/useCanvas copy.ts +117 -0
- package/src/views/designer/modules/canvas/src/hooks/useCanvas.ts +39 -0
- package/src/views/designer/modules/canvas/src/hooks/useGroup.ts +121 -0
- package/src/views/designer/modules/canvas/src/hooks/useHistory.ts +37 -0
- package/src/views/designer/modules/canvas/src/hooks/useSketchRuler.ts +167 -0
- package/src/views/designer/modules/canvas/src/hooks/useSortIndex.ts +147 -0
- package/src/views/designer/modules/canvas/src/hooks/useTranslate.ts +20 -0
- package/src/views/designer/modules/canvas/src/index.vue +600 -0
- package/src/views/designer/modules/canvas/src/scroll/index.vue +46 -0
- package/src/views/designer/modules/canvas/src/scroll/scroll.ts +230 -0
- package/src/views/designer/modules/config-data/dataConfig.service.ts +3 -0
- package/src/views/designer/modules/config-data/index.ts +3 -0
- package/src/views/designer/modules/config-data/src/index.vue +49 -0
- package/src/views/designer/modules/config-interactive/index.ts +4 -0
- package/src/views/designer/modules/config-interactive/interactive.service.ts +459 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/RefreshComponent.js +46 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/RefreshData.js +33 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/SaveForm.js +130 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/ShowHidden.js +60 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/ChangeFormMode.js +64 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/GetFormModel.js +40 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/SaveFormModel.js +40 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/SetFormModel.js +91 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/index.js +52 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/AppOpenLink.js +110 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/FrameOpenLink.js +117 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/PlatformOutsideLink.js +119 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/PlatformWithinLink.js +107 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/ClosePopup.js +31 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/ExecuteScript.js +37 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/GetCounterValue.js +67 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/ModalOpen.js +115 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/OpenMessage.js +95 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/RequestInterface.js +57 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/SetComponentValue.js +83 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/TriggerEvent.js +54 -0
- package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/VariableAssignment.js +145 -0
- package/src/views/designer/modules/config-interactive/src/components/ConditionPopup.vue +880 -0
- package/src/views/designer/modules/config-interactive/src/components/ConfigActionIndex.vue +218 -0
- package/src/views/designer/modules/config-interactive/src/components/IbspActionConfig.vue +210 -0
- package/src/views/designer/modules/config-interactive/src/components/IbspInteractivceList.vue +553 -0
- package/src/views/designer/modules/config-interactive/src/components/IbspInteractivePanel.vue +253 -0
- package/src/views/designer/modules/config-interactive/src/components/PopUpContainer.vue +61 -0
- package/src/views/designer/modules/config-interactive/src/components/SelectInteractiveList.vue +112 -0
- package/src/views/designer/modules/config-interactive/src/hooks/useEventAction.js +61 -0
- package/src/views/designer/modules/config-interactive/src/hooks/useInteractiveContext.ts +77 -0
- package/src/views/designer/modules/config-interactive/src/index.vue +382 -0
- package/src/views/designer/modules/config-interactive/src/stores/interactiveData.js +106 -0
- package/src/views/designer/modules/config-interactive/src/stores/interactiveDataPlus.js +36 -0
- package/src/views/designer/modules/config-page/index.ts +3 -0
- package/src/views/designer/modules/config-page/pageConfig.service.ts +1 -0
- package/src/views/designer/modules/config-page/src/config.js +652 -0
- package/src/views/designer/modules/config-page/src/index.vue +120 -0
- package/src/views/designer/modules/config-props/index.ts +3 -0
- package/src/views/designer/modules/config-props/propsConfig.service.ts +1 -0
- package/src/views/designer/modules/config-props/src/CommonConfig.vue +576 -0
- package/src/views/designer/modules/config-props/src/ScriptConfig.vue +67 -0
- package/src/views/designer/modules/config-props/src/components/Background.vue +372 -0
- package/src/views/designer/modules/config-props/src/components/BorderPlus.vue +128 -0
- package/src/views/designer/modules/config-props/src/components/Collapse.vue +137 -0
- package/src/views/designer/modules/config-props/src/components/Input.vue +262 -0
- package/src/views/designer/modules/config-props/src/components/Radio.vue +108 -0
- package/src/views/designer/modules/config-props/src/components/Switch.vue +57 -0
- package/src/views/designer/modules/config-props/src/index.vue +82 -0
- package/src/views/designer/modules/data-model/index.ts +3 -0
- package/src/views/designer/modules/data-model/src/components/CategoryDict.vue +144 -0
- package/src/views/designer/modules/data-model/src/components/DataModel.vue +638 -0
- package/src/views/designer/modules/data-model/src/components/DataModel2.vue +583 -0
- package/src/views/designer/modules/data-model/src/components/DataView.vue +169 -0
- package/src/views/designer/modules/data-model/src/components/EditScript.vue +83 -0
- package/src/views/designer/modules/data-model/src/components/EditTable.vue +208 -0
- package/src/views/designer/modules/data-model/src/components/FieldsGroup.vue +199 -0
- package/src/views/designer/modules/data-model/src/components/ParamSelect.vue +64 -0
- package/src/views/designer/modules/data-model/src/components/ScriptConfig.vue +53 -0
- package/src/views/designer/modules/data-model/src/components/ScriptData.vue +62 -0
- package/src/views/designer/modules/data-model/src/components/ServiceInterface.vue +248 -0
- package/src/views/designer/modules/data-model/src/components/Static.vue +236 -0
- package/src/views/designer/modules/data-model/src/components/TestData.vue +39 -0
- package/src/views/designer/modules/data-model/src/components/filter-data/components/MoreConfig.vue +121 -0
- package/src/views/designer/modules/data-model/src/components/filter-data/components/select-field/index.vue +337 -0
- package/src/views/designer/modules/data-model/src/components/filter-data/components/select-field/useSelectField.ts +104 -0
- package/src/views/designer/modules/data-model/src/components/filter-data/index.vue +140 -0
- package/src/views/designer/modules/data-model/src/hooks/useModelConfig.ts +98 -0
- package/src/views/designer/modules/data-model/src/hooks/useModelDefaultValue.ts +153 -0
- package/src/views/designer/modules/data-model/src/index.vue +374 -0
- package/src/views/designer/modules/data-model/src/types/model.d.ts +144 -0
- package/src/views/designer/modules/headerWidgetModule/HeaderWidgetIndex.vue +937 -0
- package/src/views/designer/modules/headerWidgetModule/components/CodeEditor.vue +315 -0
- package/src/views/designer/modules/headerWidgetModule/components/DirectionTooltip.vue +164 -0
- package/src/views/designer/modules/headerWidgetModule/components/DirectionTooltipComponent.vue +164 -0
- package/src/views/designer/modules/headerWidgetModule/components/MirrorTextArea.vue +73 -0
- package/src/views/designer/modules/headerWidgetModule/components/PlatformLibLayout.vue +238 -0
- package/src/views/designer/modules/headerWidgetModule/components/quoteConfig/components/configCenter.vue +51 -0
- package/src/views/designer/modules/headerWidgetModule/components/quoteConfig/index.vue +89 -0
- package/src/views/designer/modules/headerWidgetModule/constantLib/index.vue +433 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/CategoryDict.vue +141 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/DataModel.vue +638 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/DataModel2.vue +455 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/DataView.vue +233 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/EditTable.vue +208 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/FieldsGroup.vue +199 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/ScriptConfig.vue +53 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/ScriptData.vue +63 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/ServiceInterface.vue +287 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/Static.vue +170 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/components/TestData.vue +33 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/hooks/useLeaveParams.ts +26 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/hooks/useUtils.js +53 -0
- package/src/views/designer/modules/headerWidgetModule/dataSource/index.vue +471 -0
- package/src/views/designer/modules/headerWidgetModule/designerConfig/index.vue +15 -0
- package/src/views/designer/modules/headerWidgetModule/globalVarLib/index.vue +471 -0
- package/src/views/designer/modules/headerWidgetModule/iconLib/index.vue +346 -0
- package/src/views/designer/modules/headerWidgetModule/materialLib/index.vue +901 -0
- package/src/views/designer/modules/headerWidgetModule/methodLib/index.vue +551 -0
- package/src/views/designer/modules/headerWidgetModule/scriptLib/index.vue +415 -0
- package/src/views/designer/modules/ibsp-component-lib/componentLib.service.ts +17 -0
- package/src/views/designer/modules/ibsp-component-lib/index.ts +5 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/index.ts +5 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/ComponentDes.vue +175 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/ComponentPre.vue +84 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/FormItemComponent.vue +314 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/FormItemComponentPre.vue +154 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/useContextModel.ts +30 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useCommonFuns.ts +91 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useComponentContext.ts +304 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useFormDropComponent.ts +69 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useFromItemDnD.ts +264 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/index.js +47 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/content-container/ContentContainerDes.vue +56 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/content-container/ContentContainerPre.vue +32 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/content-container/index.vue +33 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/index.vue +80 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/index.vue +1362 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/utils/dom.js +60 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/utils/fns.js +39 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/vue-draggable-resizable.css +125 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/index.ts +4 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/Template.vue +214 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/config/config.js +37 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/config/data.js +191 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/config/props.js +150 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/index.vue +32 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/data/config.js +49 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/data/index.vue +205 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/data/utils.ts +20 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/RenderComponent.vue +33 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/config.ts +25 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/form-item/config.ts +25 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/form-item/index.vue +72 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/index.vue +248 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/sub-form/RenderComponent.vue +328 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/sub-form/config.ts +30 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/sub-form/index.vue +217 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/components/MobileMenu.vue +107 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/config.js +151 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/index.vue +789 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/utils/uni.webview.1.5.5.js +58 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/components/AddMenuConfig.vue +320 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/components/Header.vue +139 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/components/IMenu.vue +65 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/config.ts +25 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/aside.ts +41 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/header.ts +139 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/index.ts +12 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/nav.ts +143 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/hooks/useAppMenus.js +164 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/index.vue +100 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/SystemNavComponent.vue +810 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/components/AddMenuConfig.vue +322 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/components/MyElMenu.vue +59 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/config.js +283 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/hooks/useAppMenus.js +164 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/index.vue +74 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/pageContainer/config.js +127 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/pageContainer/index.vue +135 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/BaseContainer.vue +90 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/hooks/useAddComponent.ts +69 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/hooks/useContainerDnD.ts +79 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/index.ts +3 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/types/containerProps.ts +46 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/types/dnd.ts +17 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/flexLayout/RenderComponent.vue +33 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/flexLayout/config.js +691 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/flexLayout/index.vue +344 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/grid-drag-layout/config.js +26 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/grid-drag-layout/hooks/useDragGrid.ts +3 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/grid-drag-layout/index.vue +40 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/config.ts +36 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/gird-row/config.ts +37 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/gird-row/index.vue +173 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/gird-row/render.vue +56 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/grid-col/config.ts +51 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/grid-col/index.vue +105 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/grid-col/render.vue +34 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/index.vue +154 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/render.vue +65 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/types/grid.ts +15 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/types/gridProps.ts +126 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/PreviewComponent.vue +101 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/PreviewGroup.vue +71 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/SectionGroup.vue +627 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/SectionGroup4_back.vue +388 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/SectionGroup_back.vue +503 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/MergeBox.vue +294 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/SectionTools.vue +0 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/index.vue +1360 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/utils/dom.js +60 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/utils/fns.js +39 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/vue-draggable-resizable.css +125 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/config.js +117 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/group-config.js +26 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/index.vue +1200 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/section.js +67 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/section.service.ts +7 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/config.ts +28 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/hooks/useColActions.ts +244 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/index.vue +218 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/render.vue +97 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-col/config.ts +41 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-col/index.vue +69 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-col/render.vue +47 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-row/config.ts +25 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-row/index.vue +78 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-row/render.vue +38 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/types/table.ts +15 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/types/tableProps.ts +87 -0
- package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/types/props.d.ts +12 -0
- package/src/views/designer/modules/ibsp-component-lib/src/components/ColorPalette.vue +394 -0
- package/src/views/designer/modules/ibsp-component-lib/src/index.vue +530 -0
- package/src/views/designer/modules/ibsp-config/ConfigIndex.vue +222 -0
- package/src/views/designer/modules/ibsp-config/builtinComponents/DataModel.jsx +65 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/batchGroup.ts +8 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectComponents.ts +22 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectDataModel.ts +9 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectForms.ts +14 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectPages.ts +14 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectScript.ts +46 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectVars.ts +32 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/configs.d.ts +5 -0
- package/src/views/designer/modules/ibsp-config/commonlyConfig/index.ts +7 -0
- package/src/views/designer/modules/ibsp-config/components/BuiltinFormItems.vue +82 -0
- package/src/views/designer/modules/ibsp-config/components/CollapseItem.vue +23 -0
- package/src/views/designer/modules/ibsp-config/components/ExpressionPopup.vue +357 -0
- package/src/views/designer/modules/ibsp-config/components/FormItem.vue +201 -0
- package/src/views/designer/modules/ibsp-config/components/InterfaceParam.vue +714 -0
- package/src/views/designer/modules/ibsp-config/components/ResourcePopup.vue +319 -0
- package/src/views/designer/modules/ibsp-config/components/dynamicValueBindingModule/DynamicValuePlusIndex.vue +283 -0
- package/src/views/designer/modules/ibsp-config/components/dynamicValueBindingModule/index.vue +266 -0
- package/src/views/designer/modules/ibsp-config/components/staticTable/ContextMenu.vue +107 -0
- package/src/views/designer/modules/ibsp-config/components/staticTable/index.vue +264 -0
- package/src/views/designer/modules/ibsp-config/components/staticTable/upload.vue +60 -0
- package/src/views/designer/modules/ibsp-config/config.service.ts +17 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Button.vue +56 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/CascaderSelect.vue +83 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/CateTreeList.vue +571 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Checkbox.vue +57 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Collapse.vue +163 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Color.vue +57 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/RadioConfig.vue +11 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/RegionalSelectionConfig.vue +159 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/SelectConfig.vue +599 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/components/table.vue +51 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/index.vue +62 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataColumns.vue +171 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/CategoryDict.vue +67 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/DataView.vue +124 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/EditTable.vue +209 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/ScriptConfig.vue +48 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/ServiceInterface.vue +130 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/Static.vue +141 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/index.vue +122 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Dialog.vue +147 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DragTabs.vue +836 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Drawer.vue +61 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/DynamicDataValue.vue +120 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Expression/hooks/useWhere.ts +67 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Expression/index.vue +679 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/FormItem.vue +133 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Input.vue +205 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/InputNumber.vue +101 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/InterfaceParamConfig.vue +51 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Modal.vue +84 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/MonacoEditor.vue +108 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ParamConfig.vue +501 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Position.vue +94 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Radio.vue +182 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/ScriptData.vue +55 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Select.vue +148 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/SelectExpression.vue +94 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/SelectIcon.vue +107 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/SelectResource.vue +117 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/SetParamSource.vue +181 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Slider.vue +55 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/StaticTable.vue +42 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Switch.vue +40 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Tab.vue +221 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Tabs.vue +91 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Tabs2.vue +546 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/Title.vue +86 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/TreeSelect.vue +142 -0
- package/src/views/designer/modules/ibsp-config/configComponentLibs/TreeSelectPlus.vue +70 -0
- package/src/views/designer/modules/ibsp-config/configGroups/BaseData.js +60 -0
- package/src/views/designer/modules/ibsp-config/hooks/useModelValue.ts +22 -0
- package/src/views/designer/modules/ibsp-config/index.ts +44 -0
- package/src/views/designer/modules/ibsp-config/utils.ts +6 -0
- package/src/views/designer/modules/ibsp-form-domain/index.ts +3 -0
- package/src/views/designer/modules/ibsp-form-domain/src/index.vue +178 -0
- package/src/views/designer/modules/ibsp-history/history.service.ts +3 -0
- package/src/views/designer/modules/ibsp-history/index.ts +3 -0
- package/src/views/designer/modules/ibsp-history/src/index.vue +126 -0
- package/src/views/designer/modules/ibsp-outline/index.ts +3 -0
- package/src/views/designer/modules/ibsp-outline/outline.service.ts +1 -0
- package/src/views/designer/modules/ibsp-outline/src/index.vue +256 -0
- package/src/views/designer/modules/ibsp-page/index.ts +4 -0
- package/src/views/designer/modules/ibsp-page/pageList.service.ts +3 -0
- package/src/views/designer/modules/ibsp-page/src/index.vue +393 -0
- package/src/views/designer/modules/ibsp-script/index.ts +3 -0
- package/src/views/designer/modules/ibsp-script/script.service.ts +161 -0
- package/src/views/designer/modules/ibsp-script/src/ScriptIndex.vue +408 -0
- package/src/views/designer/modules/ibsp-script/src/components/Contextmenu.vue +104 -0
- package/src/views/designer/modules/ibsp-script/src/components/ScriptData.vue +518 -0
- package/src/views/designer/modules/ibsp-script/src/components/ScriptPanel.vue +415 -0
- package/src/views/designer/modules/ibsp-script/src/components/ScriptSetting.vue +48 -0
- package/src/views/designer/modules/ibsp-script/src/components/console/Console.vue +53 -0
- package/src/views/designer/modules/ibsp-script/src/components/console/components/ConsoleError.vue +33 -0
- package/src/views/designer/modules/ibsp-script/src/components/console/components/ConsoleLine.vue +53 -0
- package/src/views/designer/modules/ibsp-script/src/components/console/components/ConsoleLog.vue +93 -0
- package/src/views/designer/modules/ibsp-script/src/components/console/console.ts +11 -0
- package/src/views/designer/modules/ibsp-script/src/hooks/useComponentEditor.ts +21 -0
- package/src/views/designer/modules/ibsp-script/src/hooks/useContextmenu.js +70 -0
- package/src/views/designer/modules/ibsp-script/src/hooks/useScriptData.ts +73 -0
- package/src/views/designer/modules/ibsp-script/src/index.vue +114 -0
- package/src/views/designer/modules/ibsp-template/index.ts +3 -0
- package/src/views/designer/modules/ibsp-template/src/index.vue +19 -0
- package/src/views/designer/modules/ibsp-template/template.service.ts +1 -0
- package/src/views/designer/modules/index.ts +198 -0
- package/src/views/designer/modules/platform-const/const.service.ts +1 -0
- package/src/views/designer/modules/platform-const/index.ts +4 -0
- package/src/views/designer/modules/platform-const/src/index.vue +432 -0
- package/src/views/designer/modules/platform-icon/icon.service.ts +1 -0
- package/src/views/designer/modules/platform-icon/index.ts +4 -0
- package/src/views/designer/modules/platform-icon/src/index.vue +346 -0
- package/src/views/designer/modules/platform-material/index.ts +3 -0
- package/src/views/designer/modules/platform-material/material.service.ts +1 -0
- package/src/views/designer/modules/platform-material/src/index.vue +901 -0
- package/src/views/designer/modules/platform-method/index.ts +4 -0
- package/src/views/designer/modules/platform-method/method.service.ts +1 -0
- package/src/views/designer/modules/platform-method/src/index.vue +14 -0
- package/src/views/designer/modules/platform-script/index.ts +4 -0
- package/src/views/designer/modules/platform-script/script.service.ts +1 -0
- package/src/views/designer/modules/platform-script/src/index.vue +14 -0
- package/src/views/designer/modules/platform-var/index.ts +6 -0
- package/src/views/designer/modules/platform-var/src/index.vue +450 -0
- package/src/views/designer/modules/platform-var/var.service.ts +1 -0
- package/src/views/designer/modules/scriptModule/ScriptIndex.vue +686 -0
- package/src/views/designer/modules/scriptModule/ScriptIndexPlus.vue +1308 -0
- package/src/views/designer/modules/scriptModule/components/Contextmenu.vue +100 -0
- package/src/views/designer/modules/scriptModule/components/EnvData.vue +78 -0
- package/src/views/designer/modules/scriptModule/components/ScriptData.vue +541 -0
- package/src/views/designer/modules/scriptModule/components/ScriptEditPanel.vue +658 -0
- package/src/views/designer/modules/scriptModule/components/ScriptList.vue +365 -0
- package/src/views/designer/modules/scriptModule/components/ScriptNavContentLayout.vue +66 -0
- package/src/views/designer/modules/scriptModule/components/console/Console.vue +53 -0
- package/src/views/designer/modules/scriptModule/components/console/components/ConsoleError.vue +33 -0
- package/src/views/designer/modules/scriptModule/components/console/components/ConsoleLine.vue +53 -0
- package/src/views/designer/modules/scriptModule/components/console/components/ConsoleLog.vue +93 -0
- package/src/views/designer/modules/scriptModule/components/console/console.ts +11 -0
- package/src/views/designer/modules/scriptModule/components/scriptManagement.vue +78 -0
- package/src/views/designer/modules/scriptModule/hooks/useComponentEditor.ts +22 -0
- package/src/views/designer/modules/scriptModule/hooks/useContextmenu.js +70 -0
- package/src/views/designer/modules/scriptModule/hooks/useIbspScript.js +95 -0
- package/src/views/designer/modules/scriptModule/hooks/useIbspScriptPlus.js +38 -0
- package/src/views/designer/modules/scriptModule/hooks/useScript.js +27 -0
- package/src/views/designer/modules/scriptModule/useScriptStore.js +142 -0
- package/src/views/designer/modules/shortcut-keys/index.ts +2 -0
- package/src/views/designer/modules/shortcut-keys/shortcutKey.service.ts +1 -0
- package/src/views/doc/index.ts +3 -0
- package/src/views/doc/src/index.vue +40 -0
- package/src/views/home/hooks/useApp.ts +127 -0
- package/src/views/home/index.vue +397 -0
- package/src/views/preview/index.ts +6 -0
- package/src/views/preview/src/PreviewPage.vue +215 -0
- package/src/views/preview/src/action-parse-lib/componentAction/RefreshComponent.js +10 -0
- package/src/views/preview/src/action-parse-lib/componentAction/RefreshData.js +8 -0
- package/src/views/preview/src/action-parse-lib/componentAction/SaveForm.js +111 -0
- package/src/views/preview/src/action-parse-lib/componentAction/ShowHidden.js +20 -0
- package/src/views/preview/src/action-parse-lib/formAction/ChangeFormMode.js +86 -0
- package/src/views/preview/src/action-parse-lib/formAction/GetFormModel.js +42 -0
- package/src/views/preview/src/action-parse-lib/formAction/SaveFormModel.js +47 -0
- package/src/views/preview/src/action-parse-lib/formAction/SetFormModel.js +28 -0
- package/src/views/preview/src/action-parse-lib/index.js +23 -0
- package/src/views/preview/src/action-parse-lib/linkAction/AppOpenLink.js +34 -0
- package/src/views/preview/src/action-parse-lib/linkAction/FrameOpenLink.js +33 -0
- package/src/views/preview/src/action-parse-lib/linkAction/PlatformOutsideLink.js +34 -0
- package/src/views/preview/src/action-parse-lib/linkAction/PlatformWithinLink.js +51 -0
- package/src/views/preview/src/action-parse-lib/outerAction/ClosePopup.js +8 -0
- package/src/views/preview/src/action-parse-lib/outerAction/ExecuteScript.js +22 -0
- package/src/views/preview/src/action-parse-lib/outerAction/GetCounterValue.js +7 -0
- package/src/views/preview/src/action-parse-lib/outerAction/ModalOpen.js +48 -0
- package/src/views/preview/src/action-parse-lib/outerAction/OpenMessage.js +14 -0
- package/src/views/preview/src/action-parse-lib/outerAction/RequestInterface.js +135 -0
- package/src/views/preview/src/action-parse-lib/outerAction/SetComponentValue.js +41 -0
- package/src/views/preview/src/action-parse-lib/outerAction/TriggerEvent.js +6 -0
- package/src/views/preview/src/action-parse-lib/outerAction/VariableAssignment.js +12 -0
- package/src/views/preview/src/hooks/useHandleParams.js +13 -0
- package/src/views/preview/src/index.vue +113 -0
- package/src/views/preview/src/index_back.vue +149 -0
- package/src/views/preview/src/interaction-model/Interaction.ts +280 -0
- package/src/views/preview/src/preview.ts +42 -0
- package/src/views/template/index.ts +4 -0
- package/src/views/template/src/PreviewIndex.vue +36 -0
- package/src/views/template/src/TemplateDesignerIndex.vue +492 -0
- package/src/views/template/src/index.vue +15 -0
- package/tsconfig.json +63 -0
- package/vite.config.js +106 -0
- package/vite.config.template.js +31 -0
|
@@ -0,0 +1,1360 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { matchesSelectorToParentElements, getComputedSize, addEvent, removeEvent } from './utils/dom'
|
|
3
|
+
import { computeWidth, computeHeight, restrictToBounds, snapToGrid } from './utils/fns'
|
|
4
|
+
import './vue-draggable-resizable.css'
|
|
5
|
+
|
|
6
|
+
const events = {
|
|
7
|
+
mouse: {
|
|
8
|
+
start: 'mousedown',
|
|
9
|
+
move: 'mousemove',
|
|
10
|
+
stop: 'mouseup'
|
|
11
|
+
},
|
|
12
|
+
touch: {
|
|
13
|
+
start: 'touchstart',
|
|
14
|
+
move: 'touchmove',
|
|
15
|
+
stop: 'touchend'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 禁止用户选取
|
|
20
|
+
const userSelectNone = {
|
|
21
|
+
userSelect: 'none',
|
|
22
|
+
MozUserSelect: 'none',
|
|
23
|
+
WebkitUserSelect: 'none',
|
|
24
|
+
MsUserSelect: 'none'
|
|
25
|
+
}
|
|
26
|
+
// 用户选中自动
|
|
27
|
+
const userSelectAuto = {
|
|
28
|
+
userSelect: 'auto',
|
|
29
|
+
MozUserSelect: 'auto',
|
|
30
|
+
WebkitUserSelect: 'auto',
|
|
31
|
+
MsUserSelect: 'auto'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let eventsFor = events.mouse
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
replace: true,
|
|
38
|
+
name: 'vue-draggable-resizable',
|
|
39
|
+
props: {
|
|
40
|
+
id: {
|
|
41
|
+
type: String
|
|
42
|
+
},
|
|
43
|
+
className: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 'vdr'
|
|
46
|
+
},
|
|
47
|
+
classNameDraggable: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: 'draggable'
|
|
50
|
+
},
|
|
51
|
+
classNameResizable: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: 'resizable'
|
|
54
|
+
},
|
|
55
|
+
classNameDragging: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'dragging'
|
|
58
|
+
},
|
|
59
|
+
classNameResizing: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'resizing'
|
|
62
|
+
},
|
|
63
|
+
classNameActive: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: 'active'
|
|
66
|
+
},
|
|
67
|
+
classNameHandle: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: 'handle'
|
|
70
|
+
},
|
|
71
|
+
disableUserSelect: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
74
|
+
},
|
|
75
|
+
dragLineNum: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
enableNativeDrag: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
preventDeactivation: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
87
|
+
active: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
91
|
+
draggable: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: true
|
|
94
|
+
},
|
|
95
|
+
resizable: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
99
|
+
// 锁定宽高比
|
|
100
|
+
lockAspectRatio: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
103
|
+
},
|
|
104
|
+
w: {
|
|
105
|
+
type: [Number, String],
|
|
106
|
+
default: 200,
|
|
107
|
+
validator: (val) => {
|
|
108
|
+
if (typeof val === 'number') {
|
|
109
|
+
return val > 0
|
|
110
|
+
}
|
|
111
|
+
return typeof val === 'string'
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
h: {
|
|
115
|
+
type: [Number, String],
|
|
116
|
+
default: 200,
|
|
117
|
+
validator: (val) => {
|
|
118
|
+
if (typeof val === 'number') {
|
|
119
|
+
return val > 0
|
|
120
|
+
}
|
|
121
|
+
return typeof val === 'string'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
minWidth: {
|
|
125
|
+
type: Number,
|
|
126
|
+
default: 0,
|
|
127
|
+
validator: (val) => val >= 0
|
|
128
|
+
},
|
|
129
|
+
minHeight: {
|
|
130
|
+
type: Number,
|
|
131
|
+
default: 0,
|
|
132
|
+
validator: (val) => val >= 0
|
|
133
|
+
},
|
|
134
|
+
maxWidth: {
|
|
135
|
+
type: Number,
|
|
136
|
+
default: null,
|
|
137
|
+
validator: (val) => val >= 0
|
|
138
|
+
},
|
|
139
|
+
maxHeight: {
|
|
140
|
+
type: Number,
|
|
141
|
+
default: null,
|
|
142
|
+
validator: (val) => val >= 0
|
|
143
|
+
},
|
|
144
|
+
x: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: 0
|
|
147
|
+
},
|
|
148
|
+
y: {
|
|
149
|
+
type: Number,
|
|
150
|
+
default: 0
|
|
151
|
+
},
|
|
152
|
+
z: {
|
|
153
|
+
type: [String, Number],
|
|
154
|
+
default: 'auto',
|
|
155
|
+
validator: (val) => (typeof val === 'string' ? val === 'auto' : val >= 0)
|
|
156
|
+
},
|
|
157
|
+
handles: {
|
|
158
|
+
type: Array,
|
|
159
|
+
default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'],
|
|
160
|
+
validator: (val) => {
|
|
161
|
+
const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'])
|
|
162
|
+
|
|
163
|
+
return new Set(val.filter(h => s.has(h))).size === val.length
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
dragHandle: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: null
|
|
169
|
+
},
|
|
170
|
+
dragCancel: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: null
|
|
173
|
+
},
|
|
174
|
+
axis: {
|
|
175
|
+
type: String,
|
|
176
|
+
default: 'both',
|
|
177
|
+
validator: (val) => ['x', 'y', 'both'].includes(val)
|
|
178
|
+
},
|
|
179
|
+
grid: {
|
|
180
|
+
type: Array,
|
|
181
|
+
default: () => [1, 1]
|
|
182
|
+
},
|
|
183
|
+
parent: {
|
|
184
|
+
type: [Boolean, String],
|
|
185
|
+
default: false
|
|
186
|
+
},
|
|
187
|
+
onDragStart: {
|
|
188
|
+
type: Function,
|
|
189
|
+
default: () => true
|
|
190
|
+
},
|
|
191
|
+
onDrag: {
|
|
192
|
+
type: Function,
|
|
193
|
+
default: () => true
|
|
194
|
+
},
|
|
195
|
+
onResizeStart: {
|
|
196
|
+
type: Function,
|
|
197
|
+
default: () => true
|
|
198
|
+
},
|
|
199
|
+
onResize: {
|
|
200
|
+
type: Function,
|
|
201
|
+
default: () => true
|
|
202
|
+
},
|
|
203
|
+
// 冲突检测
|
|
204
|
+
isConflictCheck: {
|
|
205
|
+
type: Boolean, default: false
|
|
206
|
+
},
|
|
207
|
+
// 元素对齐
|
|
208
|
+
snap: {
|
|
209
|
+
type: Boolean, default: false
|
|
210
|
+
},
|
|
211
|
+
// 当调用对齐时,用来设置组件与组件之间的对齐距离,以像素为单位
|
|
212
|
+
snapTolerance: {
|
|
213
|
+
type: Number,
|
|
214
|
+
default: 5,
|
|
215
|
+
validator: function (val) {
|
|
216
|
+
return typeof val === 'number'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
// 缩放比例
|
|
220
|
+
scaleRatio: {
|
|
221
|
+
type: Number,
|
|
222
|
+
default: 1,
|
|
223
|
+
validator: (val) => typeof val === 'number'
|
|
224
|
+
},
|
|
225
|
+
// handle是否缩放
|
|
226
|
+
handleInfo: {
|
|
227
|
+
type: Object,
|
|
228
|
+
default: () => {
|
|
229
|
+
return {
|
|
230
|
+
size: 8,
|
|
231
|
+
offset: -5,
|
|
232
|
+
switch: true
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
data: function () {
|
|
239
|
+
return {
|
|
240
|
+
left: this.x,
|
|
241
|
+
top: this.y,
|
|
242
|
+
right: null,
|
|
243
|
+
bottom: null,
|
|
244
|
+
|
|
245
|
+
width: null,
|
|
246
|
+
height: null,
|
|
247
|
+
widthTouched: false,
|
|
248
|
+
heightTouched: false,
|
|
249
|
+
aspectFactor: null,
|
|
250
|
+
|
|
251
|
+
parentWidth: null,
|
|
252
|
+
parentHeight: null,
|
|
253
|
+
|
|
254
|
+
minW: this.minWidth,
|
|
255
|
+
minH: this.minHeight,
|
|
256
|
+
|
|
257
|
+
maxW: this.maxWidth,
|
|
258
|
+
maxH: this.maxHeight,
|
|
259
|
+
|
|
260
|
+
handle: null,
|
|
261
|
+
enabled: this.active,
|
|
262
|
+
resizing: false,
|
|
263
|
+
dragging: false,
|
|
264
|
+
zIndex: this.z
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
created: function () {
|
|
268
|
+
// eslint-disable-next-line 无效的prop:minWidth不能大于maxWidth
|
|
269
|
+
if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth')
|
|
270
|
+
// eslint-disable-next-line 无效prop:minHeight不能大于maxHeight'
|
|
271
|
+
if (this.maxWidth && this.minHeight > this.maxHeight) console.warn('[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight')
|
|
272
|
+
this.resetBoundsAndMouseState()
|
|
273
|
+
},
|
|
274
|
+
mounted: function () {
|
|
275
|
+
if (!this.enableNativeDrag) {
|
|
276
|
+
this.$el.ondragstart = () => false
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const [parentWidth, parentHeight] = this.getParentSize()
|
|
280
|
+
|
|
281
|
+
this.parentWidth = parentWidth
|
|
282
|
+
this.parentHeight = parentHeight
|
|
283
|
+
const [width, height] = getComputedSize(this.$el)
|
|
284
|
+
this.aspectFactor = (this.w !== 'auto' ? this.w : width) / (this.h !== 'auto' ? this.h : height)
|
|
285
|
+
this.width = this.w !== 'auto' ? this.w : width
|
|
286
|
+
this.height = this.h !== 'auto' ? this.h : height
|
|
287
|
+
this.right = this.parentWidth - this.width - this.left
|
|
288
|
+
this.bottom = this.parentHeight - this.height - this.top
|
|
289
|
+
|
|
290
|
+
this.settingAttribute()
|
|
291
|
+
|
|
292
|
+
// 优化:取消选中的行为优先绑定在父节点上
|
|
293
|
+
const parentElement = this.$el.parentNode
|
|
294
|
+
addEvent(parentElement || document.documentElement, 'mousedown', this.deselect)
|
|
295
|
+
addEvent(parentElement || document.documentElement, 'touchend touchcancel', this.deselect)
|
|
296
|
+
|
|
297
|
+
addEvent(window, 'resize', this.checkParentSize)
|
|
298
|
+
},
|
|
299
|
+
beforeUnmount: function () {
|
|
300
|
+
removeEvent(document.documentElement, 'mousedown', this.deselect)
|
|
301
|
+
removeEvent(document.documentElement, 'touchstart', this.handleUp)
|
|
302
|
+
removeEvent(document.documentElement, 'mousemove', this.move)
|
|
303
|
+
removeEvent(document.documentElement, 'touchmove', this.move)
|
|
304
|
+
removeEvent(document.documentElement, 'mouseup', this.handleUp)
|
|
305
|
+
removeEvent(document.documentElement, 'touchend touchcancel', this.deselect)
|
|
306
|
+
|
|
307
|
+
removeEvent(window, 'resize', this.checkParentSize)
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
methods: {
|
|
311
|
+
// 右键菜单
|
|
312
|
+
onContextMenu (e) {
|
|
313
|
+
this.$emit('contextmenu', e)
|
|
314
|
+
},
|
|
315
|
+
// 重置边界和鼠标状态
|
|
316
|
+
resetBoundsAndMouseState () {
|
|
317
|
+
this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 }
|
|
318
|
+
|
|
319
|
+
this.bounds = {
|
|
320
|
+
minLeft: null,
|
|
321
|
+
maxLeft: null,
|
|
322
|
+
minRight: null,
|
|
323
|
+
maxRight: null,
|
|
324
|
+
minTop: null,
|
|
325
|
+
maxTop: null,
|
|
326
|
+
minBottom: null,
|
|
327
|
+
maxBottom: null
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
// 检查父元素大小
|
|
331
|
+
checkParentSize () {
|
|
332
|
+
if (this.parent) {
|
|
333
|
+
const [newParentWidth, newParentHeight] = this.getParentSize()
|
|
334
|
+
// 修复父元素改变大小后,组件resizing时活动异常
|
|
335
|
+
this.right = newParentWidth - this.width - this.left
|
|
336
|
+
this.bottom = newParentHeight - this.height - this.top
|
|
337
|
+
|
|
338
|
+
this.parentWidth = newParentWidth
|
|
339
|
+
this.parentHeight = newParentHeight
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
// 获取父元素大小
|
|
343
|
+
getParentSize () {
|
|
344
|
+
if (this.parent === true) {
|
|
345
|
+
const style = window.getComputedStyle(this.$el.parentNode, null)
|
|
346
|
+
return [
|
|
347
|
+
parseInt(style.getPropertyValue('width'), 10),
|
|
348
|
+
parseInt(style.getPropertyValue('height'), 10)
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
if (typeof this.parent === 'string') {
|
|
352
|
+
let parentNode = document.querySelector(this.parent)
|
|
353
|
+
if (!(parentNode instanceof HTMLElement)) {
|
|
354
|
+
parentNode = document.querySelector('#app')
|
|
355
|
+
console.error(`The selector ${this.parent} does not match any element`)
|
|
356
|
+
}
|
|
357
|
+
return [parentNode.offsetWidth, parentNode.offsetHeight]
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return [null, null]
|
|
361
|
+
},
|
|
362
|
+
// 元素触摸按下
|
|
363
|
+
elementTouchDown (e) {
|
|
364
|
+
eventsFor = events.touch
|
|
365
|
+
|
|
366
|
+
this.elementDown(e)
|
|
367
|
+
},
|
|
368
|
+
elementMouseDown (e) {
|
|
369
|
+
eventsFor = events.mouse
|
|
370
|
+
this.elementDown(e)
|
|
371
|
+
},
|
|
372
|
+
// 元素按下
|
|
373
|
+
elementDown (e) {
|
|
374
|
+
if (e instanceof MouseEvent && e.which !== 1) {
|
|
375
|
+
return
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
const target = e.target || e.srcElement
|
|
379
|
+
|
|
380
|
+
if (this.$el.contains(target)) {
|
|
381
|
+
if (this.onDragStart(e) === false) {
|
|
382
|
+
return
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (
|
|
386
|
+
(this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) ||
|
|
387
|
+
(this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))
|
|
388
|
+
) {
|
|
389
|
+
this.dragging = false
|
|
390
|
+
|
|
391
|
+
return
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (!this.enabled) {
|
|
395
|
+
this.enabled = true
|
|
396
|
+
|
|
397
|
+
this.$emit('activated')
|
|
398
|
+
this.$emit('update:active', true)
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if (this.draggable) {
|
|
402
|
+
this.dragging = true
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX
|
|
406
|
+
this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY
|
|
407
|
+
|
|
408
|
+
this.mouseClickPosition.left = this.left
|
|
409
|
+
this.mouseClickPosition.right = this.right
|
|
410
|
+
this.mouseClickPosition.top = this.top
|
|
411
|
+
this.mouseClickPosition.bottom = this.bottom
|
|
412
|
+
this.mouseClickPosition.w = this.width
|
|
413
|
+
this.mouseClickPosition.h = this.height
|
|
414
|
+
|
|
415
|
+
if (this.parent) {
|
|
416
|
+
this.bounds = this.calcDragLimits()
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
addEvent(document.documentElement, eventsFor.move, this.move)
|
|
420
|
+
addEvent(document.documentElement, eventsFor.stop, this.handleUp)
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
// 计算移动范围
|
|
424
|
+
calcDragLimits () {
|
|
425
|
+
return {
|
|
426
|
+
minLeft: this.left % this.grid[0],
|
|
427
|
+
maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left,
|
|
428
|
+
minRight: this.right % this.grid[0],
|
|
429
|
+
maxRight: Math.floor((this.parentWidth - this.width - this.right) / this.grid[0]) * this.grid[0] + this.right,
|
|
430
|
+
minTop: this.top % this.grid[1],
|
|
431
|
+
maxTop: Math.floor((this.parentHeight - this.height - this.top) / this.grid[1]) * this.grid[1] + this.top,
|
|
432
|
+
minBottom: this.bottom % this.grid[1],
|
|
433
|
+
maxBottom: Math.floor((this.parentHeight - this.height - this.bottom) / this.grid[1]) * this.grid[1] + this.bottom
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
// 取消
|
|
437
|
+
deselect (e) {
|
|
438
|
+
const target = e.target || e.srcElement
|
|
439
|
+
const regex = new RegExp(this.className + '-([trmbl]{2})', '')
|
|
440
|
+
|
|
441
|
+
if (!this.$el.contains(target) && !regex.test(target.className)) {
|
|
442
|
+
if (this.enabled && !this.preventDeactivation) {
|
|
443
|
+
this.enabled = false
|
|
444
|
+
|
|
445
|
+
this.$emit('deactivated')
|
|
446
|
+
this.$emit('update:active', false)
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
removeEvent(document.documentElement, eventsFor.move, this.handleResize)
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
this.resetBoundsAndMouseState()
|
|
453
|
+
},
|
|
454
|
+
// 控制柄触摸按下
|
|
455
|
+
handleTouchDown (handle, e) {
|
|
456
|
+
eventsFor = events.touch
|
|
457
|
+
|
|
458
|
+
this.handleDown(handle, e)
|
|
459
|
+
},
|
|
460
|
+
// 控制柄按下
|
|
461
|
+
handleDown (handle, e) {
|
|
462
|
+
if (e instanceof MouseEvent && e.which !== 1) {
|
|
463
|
+
return
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (this.onResizeStart(handle, e) === false) {
|
|
467
|
+
return
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (e.stopPropagation) e.stopPropagation()
|
|
471
|
+
|
|
472
|
+
// Here we avoid a dangerous recursion by faking
|
|
473
|
+
// corner handles as middle handles
|
|
474
|
+
if (this.lockAspectRatio && !handle.includes('m')) {
|
|
475
|
+
this.handle = 'm' + handle.substring(1)
|
|
476
|
+
} else {
|
|
477
|
+
this.handle = handle
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
this.resizing = true
|
|
481
|
+
|
|
482
|
+
this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX
|
|
483
|
+
this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY
|
|
484
|
+
this.mouseClickPosition.left = this.left
|
|
485
|
+
this.mouseClickPosition.right = this.right
|
|
486
|
+
this.mouseClickPosition.top = this.top
|
|
487
|
+
this.mouseClickPosition.bottom = this.bottom
|
|
488
|
+
this.mouseClickPosition.w = this.width
|
|
489
|
+
this.mouseClickPosition.h = this.height
|
|
490
|
+
|
|
491
|
+
this.bounds = this.calcResizeLimits()
|
|
492
|
+
|
|
493
|
+
addEvent(document.documentElement, eventsFor.move, this.handleResize)
|
|
494
|
+
addEvent(document.documentElement, eventsFor.stop, this.handleUp)
|
|
495
|
+
},
|
|
496
|
+
// 计算调整大小范围
|
|
497
|
+
calcResizeLimits () {
|
|
498
|
+
let minW = this.minW
|
|
499
|
+
let minH = this.minH
|
|
500
|
+
let maxW = this.maxW
|
|
501
|
+
let maxH = this.maxH
|
|
502
|
+
|
|
503
|
+
const aspectFactor = this.aspectFactor
|
|
504
|
+
const [gridX, gridY] = this.grid
|
|
505
|
+
const width = this.width
|
|
506
|
+
const height = this.height
|
|
507
|
+
const left = this.left
|
|
508
|
+
const top = this.top
|
|
509
|
+
const right = this.right
|
|
510
|
+
const bottom = this.bottom
|
|
511
|
+
|
|
512
|
+
if (this.lockAspectRatio) {
|
|
513
|
+
if (minW / minH > aspectFactor) {
|
|
514
|
+
minH = minW / aspectFactor
|
|
515
|
+
} else {
|
|
516
|
+
minW = aspectFactor * minH
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
if (maxW && maxH) {
|
|
520
|
+
maxW = Math.min(maxW, aspectFactor * maxH)
|
|
521
|
+
maxH = Math.min(maxH, maxW / aspectFactor)
|
|
522
|
+
} else if (maxW) {
|
|
523
|
+
maxH = maxW / aspectFactor
|
|
524
|
+
} else if (maxH) {
|
|
525
|
+
maxW = aspectFactor * maxH
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
maxW = maxW - (maxW % gridX)
|
|
530
|
+
maxH = maxH - (maxH % gridY)
|
|
531
|
+
|
|
532
|
+
const limits = {
|
|
533
|
+
minLeft: null,
|
|
534
|
+
maxLeft: null,
|
|
535
|
+
minTop: null,
|
|
536
|
+
maxTop: null,
|
|
537
|
+
minRight: null,
|
|
538
|
+
maxRight: null,
|
|
539
|
+
minBottom: null,
|
|
540
|
+
maxBottom: null
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (this.parent) {
|
|
544
|
+
limits.minLeft = left % gridX
|
|
545
|
+
limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX
|
|
546
|
+
limits.minTop = top % gridY
|
|
547
|
+
limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY
|
|
548
|
+
limits.minRight = right % gridX
|
|
549
|
+
limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX
|
|
550
|
+
limits.minBottom = bottom % gridY
|
|
551
|
+
limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY
|
|
552
|
+
|
|
553
|
+
if (maxW) {
|
|
554
|
+
limits.minLeft = Math.max(limits.minLeft, this.parentWidth - right - maxW)
|
|
555
|
+
limits.minRight = Math.max(limits.minRight, this.parentWidth - left - maxW)
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
if (maxH) {
|
|
559
|
+
limits.minTop = Math.max(limits.minTop, this.parentHeight - bottom - maxH)
|
|
560
|
+
limits.minBottom = Math.max(limits.minBottom, this.parentHeight - top - maxH)
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
if (this.lockAspectRatio) {
|
|
564
|
+
limits.minLeft = Math.max(limits.minLeft, left - top * aspectFactor)
|
|
565
|
+
limits.minTop = Math.max(limits.minTop, top - left / aspectFactor)
|
|
566
|
+
limits.minRight = Math.max(limits.minRight, right - bottom * aspectFactor)
|
|
567
|
+
limits.minBottom = Math.max(limits.minBottom, bottom - right / aspectFactor)
|
|
568
|
+
}
|
|
569
|
+
} else {
|
|
570
|
+
limits.minLeft = null
|
|
571
|
+
limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX
|
|
572
|
+
limits.minTop = null
|
|
573
|
+
limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY
|
|
574
|
+
limits.minRight = null
|
|
575
|
+
limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX
|
|
576
|
+
limits.minBottom = null
|
|
577
|
+
limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY
|
|
578
|
+
|
|
579
|
+
if (maxW) {
|
|
580
|
+
limits.minLeft = -(right + maxW)
|
|
581
|
+
limits.minRight = -(left + maxW)
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
if (maxH) {
|
|
585
|
+
limits.minTop = -(bottom + maxH)
|
|
586
|
+
limits.minBottom = -(top + maxH)
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (this.lockAspectRatio && (maxW && maxH)) {
|
|
590
|
+
limits.minLeft = Math.min(limits.minLeft, -(right + maxW))
|
|
591
|
+
limits.minTop = Math.min(limits.minTop, -(maxH + bottom))
|
|
592
|
+
limits.minRight = Math.min(limits.minRight, -left - maxW)
|
|
593
|
+
limits.minBottom = Math.min(limits.minBottom, -top - maxH)
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
return limits
|
|
598
|
+
},
|
|
599
|
+
// 移动
|
|
600
|
+
move (e) {
|
|
601
|
+
if (this.resizing) {
|
|
602
|
+
this.handleResize(e)
|
|
603
|
+
} else if (this.dragging) {
|
|
604
|
+
this.handleDrag(e)
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
// 元素移动
|
|
608
|
+
async handleDrag (e) {
|
|
609
|
+
const axis = this.axis
|
|
610
|
+
const grid = this.grid
|
|
611
|
+
const bounds = this.bounds
|
|
612
|
+
const mouseClickPosition = this.mouseClickPosition
|
|
613
|
+
|
|
614
|
+
const tmpDeltaX = axis && axis !== 'y' ? mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX) : 0
|
|
615
|
+
const tmpDeltaY = axis && axis !== 'x' ? mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY) : 0
|
|
616
|
+
|
|
617
|
+
const [deltaX, deltaY] = snapToGrid(grid, tmpDeltaX, tmpDeltaY, this.scaleRatio)
|
|
618
|
+
|
|
619
|
+
const left = restrictToBounds(mouseClickPosition.left - deltaX, bounds.minLeft, bounds.maxLeft)
|
|
620
|
+
const top = restrictToBounds(mouseClickPosition.top - deltaY, bounds.minTop, bounds.maxTop)
|
|
621
|
+
if (this.onDrag(left, top) === false) {
|
|
622
|
+
return
|
|
623
|
+
}
|
|
624
|
+
const right = restrictToBounds(mouseClickPosition.right + deltaX, bounds.minRight, bounds.maxRight)
|
|
625
|
+
const bottom = restrictToBounds(mouseClickPosition.bottom + deltaY, bounds.minBottom, bounds.maxBottom)
|
|
626
|
+
this.left = left
|
|
627
|
+
this.right = right
|
|
628
|
+
this.bottom = bottom
|
|
629
|
+
this.top = top
|
|
630
|
+
await this.snapCheck()
|
|
631
|
+
await this.dragDistance();
|
|
632
|
+
this.$emit('dragging', this.left, this.top, deltaX, deltaY)
|
|
633
|
+
},
|
|
634
|
+
moveHorizontally (val) {
|
|
635
|
+
const [deltaX, _] = snapToGrid(this.grid, val, this.top, this.scale)
|
|
636
|
+
const left = restrictToBounds(deltaX, this.bounds.minLeft, this.bounds.maxLeft)
|
|
637
|
+
this.left = left
|
|
638
|
+
this.right = this.parentWidth - this.width - left
|
|
639
|
+
},
|
|
640
|
+
moveVertically (val) {
|
|
641
|
+
const [_, deltaY] = snapToGrid(this.grid, this.left, val, this.scale)
|
|
642
|
+
const top = restrictToBounds(deltaY, this.bounds.minTop, this.bounds.maxTop)
|
|
643
|
+
this.top = top
|
|
644
|
+
this.bottom = this.parentHeight - this.height - top
|
|
645
|
+
},
|
|
646
|
+
// 控制柄移动
|
|
647
|
+
handleResize (e) {
|
|
648
|
+
let left = this.left
|
|
649
|
+
let top = this.top
|
|
650
|
+
let right = this.right
|
|
651
|
+
let bottom = this.bottom
|
|
652
|
+
|
|
653
|
+
const mouseClickPosition = this.mouseClickPosition
|
|
654
|
+
const lockAspectRatio = this.lockAspectRatio
|
|
655
|
+
const aspectFactor = this.aspectFactor
|
|
656
|
+
|
|
657
|
+
const tmpDeltaX = mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX)
|
|
658
|
+
const tmpDeltaY = mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY)
|
|
659
|
+
|
|
660
|
+
if (!this.widthTouched && tmpDeltaX) {
|
|
661
|
+
this.widthTouched = true
|
|
662
|
+
}
|
|
663
|
+
if (!this.heightTouched && tmpDeltaY) {
|
|
664
|
+
this.heightTouched = true
|
|
665
|
+
}
|
|
666
|
+
const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scaleRatio)
|
|
667
|
+
|
|
668
|
+
if (this.handle.includes('b')) {
|
|
669
|
+
bottom = restrictToBounds(
|
|
670
|
+
mouseClickPosition.bottom + deltaY,
|
|
671
|
+
this.bounds.minBottom,
|
|
672
|
+
this.bounds.maxBottom
|
|
673
|
+
)
|
|
674
|
+
if (this.lockAspectRatio && this.resizingOnY) {
|
|
675
|
+
right = this.right - (this.bottom - bottom) * aspectFactor
|
|
676
|
+
}
|
|
677
|
+
} else if (this.handle.includes('t')) {
|
|
678
|
+
top = restrictToBounds(
|
|
679
|
+
mouseClickPosition.top - deltaY,
|
|
680
|
+
this.bounds.minTop,
|
|
681
|
+
this.bounds.maxTop
|
|
682
|
+
)
|
|
683
|
+
if (this.lockAspectRatio && this.resizingOnY) {
|
|
684
|
+
left = this.left - (this.top - top) * aspectFactor
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
if (this.handle.includes('r')) {
|
|
689
|
+
right = restrictToBounds(
|
|
690
|
+
mouseClickPosition.right + deltaX,
|
|
691
|
+
this.bounds.minRight,
|
|
692
|
+
this.bounds.maxRight
|
|
693
|
+
)
|
|
694
|
+
if (this.lockAspectRatio && this.resizingOnX) {
|
|
695
|
+
bottom = this.bottom - (this.right - right) / aspectFactor
|
|
696
|
+
}
|
|
697
|
+
} else if (this.handle.includes('l')) {
|
|
698
|
+
left = restrictToBounds(
|
|
699
|
+
mouseClickPosition.left - deltaX,
|
|
700
|
+
this.bounds.minLeft,
|
|
701
|
+
this.bounds.maxLeft
|
|
702
|
+
)
|
|
703
|
+
if (this.lockAspectRatio && this.resizingOnX) {
|
|
704
|
+
top = this.top - (this.left - left) / aspectFactor
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
const width = computeWidth(this.parentWidth, left, right)
|
|
709
|
+
const height = computeHeight(this.parentHeight, top, bottom)
|
|
710
|
+
if (this.onResize(this.handle, left, top, width, height) === false) {
|
|
711
|
+
return
|
|
712
|
+
}
|
|
713
|
+
this.left = left
|
|
714
|
+
this.top = top
|
|
715
|
+
this.right = right
|
|
716
|
+
this.bottom = bottom
|
|
717
|
+
this.width = width
|
|
718
|
+
this.height = height
|
|
719
|
+
this.$emit('resizing', this.left, this.top, this.width, this.height)
|
|
720
|
+
},
|
|
721
|
+
changeWidth (val) {
|
|
722
|
+
const [newWidth, _] = snapToGrid(this.grid, val, 0, this.scale)
|
|
723
|
+
let right = restrictToBounds(
|
|
724
|
+
(this.parentWidth - newWidth - this.left),
|
|
725
|
+
this.bounds.minRight,
|
|
726
|
+
this.bounds.maxRight
|
|
727
|
+
)
|
|
728
|
+
let bottom = this.bottom
|
|
729
|
+
if (this.lockAspectRatio) {
|
|
730
|
+
bottom = this.bottom - (this.right - right) / this.aspectFactor
|
|
731
|
+
}
|
|
732
|
+
const width = computeWidth(this.parentWidth, this.left, right)
|
|
733
|
+
const height = computeHeight(this.parentHeight, this.top, bottom)
|
|
734
|
+
this.right = right
|
|
735
|
+
this.bottom = bottom
|
|
736
|
+
this.width = width
|
|
737
|
+
this.height = height
|
|
738
|
+
},
|
|
739
|
+
changeHeight (val) {
|
|
740
|
+
const [_, newHeight] = snapToGrid(this.grid, 0, val, this.scale)
|
|
741
|
+
let bottom = restrictToBounds(
|
|
742
|
+
(this.parentHeight - newHeight - this.top),
|
|
743
|
+
this.bounds.minBottom,
|
|
744
|
+
this.bounds.maxBottom
|
|
745
|
+
)
|
|
746
|
+
let right = this.right
|
|
747
|
+
if (this.lockAspectRatio) {
|
|
748
|
+
right = this.right - (this.bottom - bottom) * this.aspectFactor
|
|
749
|
+
}
|
|
750
|
+
const width = computeWidth(this.parentWidth, this.left, right)
|
|
751
|
+
const height = computeHeight(this.parentHeight, this.top, bottom)
|
|
752
|
+
this.right = right
|
|
753
|
+
this.bottom = bottom
|
|
754
|
+
this.width = width
|
|
755
|
+
this.height = height
|
|
756
|
+
},
|
|
757
|
+
// 从控制柄松开
|
|
758
|
+
async handleUp (e) {
|
|
759
|
+
this.handle = null
|
|
760
|
+
|
|
761
|
+
// 初始化辅助线数据
|
|
762
|
+
const temArr = new Array(3).fill({ display: false, position: '', origin: '', lineLength: '' })
|
|
763
|
+
const refLine = { vLine: [], hLine: [] }
|
|
764
|
+
for (let i in refLine) {
|
|
765
|
+
refLine[i] = JSON.parse(JSON.stringify(temArr))
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
if (this.resizing) {
|
|
769
|
+
this.resizing = false
|
|
770
|
+
await this.conflictCheck()
|
|
771
|
+
this.$emit('refLineParams', refLine)
|
|
772
|
+
this.$emit('resizestop', this.left, this.top, this.width, this.height)
|
|
773
|
+
}
|
|
774
|
+
if (this.dragging) {
|
|
775
|
+
this.dragging = false
|
|
776
|
+
await this.conflictCheck()
|
|
777
|
+
this.$emit('refLineParams', refLine)
|
|
778
|
+
this.$emit('dragstop', this.left, this.top)
|
|
779
|
+
}
|
|
780
|
+
this.resetBoundsAndMouseState()
|
|
781
|
+
removeEvent(document.documentElement, eventsFor.move, this.handleResize)
|
|
782
|
+
},
|
|
783
|
+
// 新增方法 ↓↓↓
|
|
784
|
+
// 设置属性
|
|
785
|
+
settingAttribute () {
|
|
786
|
+
|
|
787
|
+
// 设置对齐元素
|
|
788
|
+
this.$el.setAttribute('data-is-snap', `${this.snap}`)
|
|
789
|
+
},
|
|
790
|
+
// 冲突检测
|
|
791
|
+
conflictCheck () {
|
|
792
|
+
const top = this.top
|
|
793
|
+
const left = this.left
|
|
794
|
+
const width = this.width
|
|
795
|
+
const height = this.height
|
|
796
|
+
|
|
797
|
+
if (this.isConflictCheck) {
|
|
798
|
+
// 设置冲突检测
|
|
799
|
+
this.$el.setAttribute('data-is-check', `${this.isConflictCheck}`)
|
|
800
|
+
const nodes = this.$el.parentNode.childNodes // 获取当前父节点下所有子节点
|
|
801
|
+
for (let item of nodes) {
|
|
802
|
+
if (item.className !== undefined && !item.className.includes(this.classNameActive) && item.getAttribute('data-is-check') !== null && item.getAttribute('data-is-check') !== 'false') {
|
|
803
|
+
const tw = item.offsetWidth
|
|
804
|
+
const th = item.offsetHeight
|
|
805
|
+
// 正则获取left与right
|
|
806
|
+
let [tl, tt] = this.formatTransformVal(item.style.transform)
|
|
807
|
+
|
|
808
|
+
// 左上角与右下角重叠
|
|
809
|
+
const tfAndBr = (top >= tt && left >= tl && tt + th > top && tl + tw > left) || (top <= tt && left < tl && top + height > tt && left + width > tl)
|
|
810
|
+
// 右上角与左下角重叠
|
|
811
|
+
const brAndTf = (left <= tl && top >= tt && left + width > tl && top < tt + th) || (top < tt && left > tl && top + height > tt && left < tl + tw)
|
|
812
|
+
// 下边与上边重叠
|
|
813
|
+
const bAndT = (top <= tt && left >= tl && top + height > tt && left < tl + tw) || (top >= tt && left <= tl && top < tt + th && left > tl + tw)
|
|
814
|
+
// 上边与下边重叠(宽度不一样)
|
|
815
|
+
const tAndB = (top <= tt && left >= tl && top + height > tt && left < tl + tw) || (top >= tt && left <= tl && top < tt + th && left > tl + tw)
|
|
816
|
+
// 左边与右边重叠
|
|
817
|
+
const lAndR = (left >= tl && top >= tt && left < tl + tw && top < tt + th) || (top > tt && left <= tl && left + width > tl && top < tt + th)
|
|
818
|
+
// 左边与右边重叠(高度不一样)
|
|
819
|
+
const rAndL = (top <= tt && left >= tl && top + height > tt && left < tl + tw) || (top >= tt && left <= tl && top < tt + th && left + width > tl)
|
|
820
|
+
|
|
821
|
+
// 如果冲突,就将回退到移动前的位置
|
|
822
|
+
if (tfAndBr || brAndTf || bAndT || tAndB || lAndR || rAndL) {
|
|
823
|
+
this.top = this.mouseClickPosition.top
|
|
824
|
+
this.left = this.mouseClickPosition.left
|
|
825
|
+
this.right = this.mouseClickPosition.right
|
|
826
|
+
this.bottom = this.mouseClickPosition.bottom
|
|
827
|
+
this.width = this.mouseClickPosition.w
|
|
828
|
+
this.height = this.mouseClickPosition.h
|
|
829
|
+
this.$emit('resizing', this.left, this.top, this.width, this.height)
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
// 拖拽距离计算
|
|
836
|
+
async dragDistance() {
|
|
837
|
+
if (this.dragLineNum) {
|
|
838
|
+
let width = this.width
|
|
839
|
+
let height = this.height
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
// 检测对齐元素
|
|
843
|
+
async snapCheck () {
|
|
844
|
+
let width = this.$el.offsetWidth;
|
|
845
|
+
let height = this.$el.offsetHeight;
|
|
846
|
+
if (this.snap) {
|
|
847
|
+
let activeLeft = this.left
|
|
848
|
+
let activeRight = this.left + width
|
|
849
|
+
let activeTop = this.top
|
|
850
|
+
let activeBottom = this.top + height
|
|
851
|
+
// 初始化辅助线数据
|
|
852
|
+
const temArr = new Array(3).fill({ display: false, position: '', origin: '', lineLength: '', relativeLength: '' })
|
|
853
|
+
const refLine = { vLine: [], hLine: [] }
|
|
854
|
+
const [_left, _top] = this.formatTransformVal(this.$el.style.transform);
|
|
855
|
+
const _right = _left + width, _bottom = _top + height;
|
|
856
|
+
|
|
857
|
+
for (let i in refLine) {
|
|
858
|
+
refLine[i] = JSON.parse(JSON.stringify(temArr))
|
|
859
|
+
}
|
|
860
|
+
let dLine = {
|
|
861
|
+
x: null,
|
|
862
|
+
y: null
|
|
863
|
+
}
|
|
864
|
+
// 获取当前父节点下所有子节点
|
|
865
|
+
const nodes = this.$el.parentNode.childNodes
|
|
866
|
+
|
|
867
|
+
let tem = {
|
|
868
|
+
value: { x: [[], [], []], y: [[], [], []] },
|
|
869
|
+
display: [],
|
|
870
|
+
position: []
|
|
871
|
+
}
|
|
872
|
+
const { groupWidth, groupHeight, groupLeft, groupTop, bln } = await this.getActiveAll(nodes)
|
|
873
|
+
if (!bln) {
|
|
874
|
+
width = groupWidth
|
|
875
|
+
height = groupHeight
|
|
876
|
+
activeLeft = groupLeft
|
|
877
|
+
activeRight = groupLeft + groupWidth
|
|
878
|
+
activeTop = groupTop
|
|
879
|
+
activeBottom = groupTop + groupHeight
|
|
880
|
+
}
|
|
881
|
+
let centerLeft = 0
|
|
882
|
+
let centerRight = 0
|
|
883
|
+
let centerLength = 0
|
|
884
|
+
let dragLineNum = this.dragLineNum
|
|
885
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
886
|
+
const item = nodes[index]
|
|
887
|
+
|
|
888
|
+
if (item.className !== undefined && !item.className.includes(this.classNameActive) && item.getAttribute('data-is-snap') !== null && item.getAttribute('data-is-snap') !== 'false') {
|
|
889
|
+
const w = item.offsetWidth
|
|
890
|
+
const h = item.offsetHeight
|
|
891
|
+
const [l, t] = this.formatTransformVal(item.style.transform)
|
|
892
|
+
const r = l + w // 对齐目标right
|
|
893
|
+
const b = t + h // 对齐目标的bottom
|
|
894
|
+
|
|
895
|
+
const hc = Math.abs((activeTop + height / 2) - (t + h / 2)) <= this.snapTolerance // 水平中线
|
|
896
|
+
const vc = Math.abs((activeLeft + width / 2) - (l + w / 2)) <= this.snapTolerance // 垂直中线
|
|
897
|
+
|
|
898
|
+
const ts = Math.abs(t - activeBottom) <= this.snapTolerance // 从上到下
|
|
899
|
+
const TS = Math.abs(b - activeBottom) <= this.snapTolerance // 从上到下
|
|
900
|
+
const bs = Math.abs(t - activeTop) <= this.snapTolerance // 从下到上
|
|
901
|
+
const BS = Math.abs(b - activeTop) <= this.snapTolerance // 从下到上
|
|
902
|
+
|
|
903
|
+
const ls = Math.abs(l - activeRight) <= this.snapTolerance // 外左
|
|
904
|
+
const LS = Math.abs(r - activeRight) <= this.snapTolerance // 外左
|
|
905
|
+
const rs = Math.abs(l - activeLeft) <= this.snapTolerance // 外右
|
|
906
|
+
const RS = Math.abs(r - activeLeft) <= this.snapTolerance // 外右
|
|
907
|
+
|
|
908
|
+
tem.display = [ts, TS, bs, BS, hc, hc, ls, LS, rs, RS, vc, vc]
|
|
909
|
+
tem.position = [t, b, t, b, t + h / 2, t + h / 2, l, r, l, r, l + w / 2, l + w / 2]
|
|
910
|
+
if (ts || TS || bs || BS || hc) {
|
|
911
|
+
let dis = l - _right, x = _right, y = _top + height / 2;
|
|
912
|
+
if (_right > r) {
|
|
913
|
+
dis = _left - r;
|
|
914
|
+
x = r;
|
|
915
|
+
}
|
|
916
|
+
if (!hc) {
|
|
917
|
+
y = (ts || bs) ? t : b;
|
|
918
|
+
}
|
|
919
|
+
if (dis >= 0) {
|
|
920
|
+
if (!dLine.x || (dLine.x && dis < dLine.x.lineLength)) {
|
|
921
|
+
dLine.x = {
|
|
922
|
+
lineLength: dis,
|
|
923
|
+
left: x,
|
|
924
|
+
top: y
|
|
925
|
+
}
|
|
926
|
+
} else {
|
|
927
|
+
dLine.x.top = y;
|
|
928
|
+
}
|
|
929
|
+
} else {
|
|
930
|
+
dLine.x = null;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
if (ls || LS || rs || RS || vc) {
|
|
935
|
+
let dis = t - _bottom, y = _bottom, x = _left + width / 2;
|
|
936
|
+
if (_top > b) {
|
|
937
|
+
dis = _top - b;
|
|
938
|
+
y = b;
|
|
939
|
+
}
|
|
940
|
+
if (!vc) {
|
|
941
|
+
x = (ls || rs) ? l : r
|
|
942
|
+
}
|
|
943
|
+
if (dis >= 0) {
|
|
944
|
+
if (!dLine.y || (dLine.y && dis < dLine.y.lineLength)) {
|
|
945
|
+
dLine.y = {
|
|
946
|
+
lineLength: dis,
|
|
947
|
+
left: x,
|
|
948
|
+
top: y
|
|
949
|
+
}
|
|
950
|
+
} else {
|
|
951
|
+
dLine.y.left = x;
|
|
952
|
+
}
|
|
953
|
+
} else {
|
|
954
|
+
dLine.y = 0;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// fix:中线自动对齐,元素可能超过父元素边界的问题
|
|
959
|
+
if (ts) {
|
|
960
|
+
if (bln) {
|
|
961
|
+
this.top = Math.max(t - height, this.bounds.minTop)
|
|
962
|
+
this.bottom = this.parentHeight - this.top - height
|
|
963
|
+
}
|
|
964
|
+
tem.value.y[0].push(l, r, activeLeft, activeRight);
|
|
965
|
+
}
|
|
966
|
+
if (bs) {
|
|
967
|
+
if (bln) {
|
|
968
|
+
this.top = t
|
|
969
|
+
this.bottom = this.parentHeight - this.top - height
|
|
970
|
+
}
|
|
971
|
+
tem.value.y[0].push(l, r, activeLeft, activeRight)
|
|
972
|
+
}
|
|
973
|
+
if (TS) {
|
|
974
|
+
if (bln) {
|
|
975
|
+
this.top = Math.max(b - height, this.bounds.minTop)
|
|
976
|
+
this.bottom = this.parentHeight - this.top - height
|
|
977
|
+
}
|
|
978
|
+
tem.value.y[1].push(l, r, activeLeft, activeRight)
|
|
979
|
+
}
|
|
980
|
+
if (BS) {
|
|
981
|
+
if (bln) {
|
|
982
|
+
this.top = b
|
|
983
|
+
this.bottom = this.parentHeight - this.top - height
|
|
984
|
+
}
|
|
985
|
+
tem.value.y[1].push(l, r, activeLeft, activeRight)
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
if (ls) {
|
|
989
|
+
if (bln) {
|
|
990
|
+
this.left = Math.max(l - width, this.bounds.minLeft)
|
|
991
|
+
this.right = this.parentWidth - this.left - width
|
|
992
|
+
}
|
|
993
|
+
tem.value.x[0].push(t, b, activeTop, activeBottom)
|
|
994
|
+
}
|
|
995
|
+
if (rs) {
|
|
996
|
+
if (bln) {
|
|
997
|
+
this.left = l
|
|
998
|
+
this.right = this.parentWidth - this.left - width
|
|
999
|
+
}
|
|
1000
|
+
tem.value.x[0].push(t, b, activeTop, activeBottom)
|
|
1001
|
+
}
|
|
1002
|
+
if (LS) {
|
|
1003
|
+
if (bln) {
|
|
1004
|
+
this.left = Math.max(r - width, this.bounds.minLeft)
|
|
1005
|
+
this.right = this.parentWidth - this.left - width
|
|
1006
|
+
}
|
|
1007
|
+
tem.value.x[1].push(t, b, activeTop, activeBottom)
|
|
1008
|
+
}
|
|
1009
|
+
if (RS) {
|
|
1010
|
+
if (bln) {
|
|
1011
|
+
this.left = r
|
|
1012
|
+
this.right = this.parentWidth - this.left - width
|
|
1013
|
+
}
|
|
1014
|
+
tem.value.x[1].push(t, b, activeTop, activeBottom)
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
if (hc) {
|
|
1018
|
+
if (bln) {
|
|
1019
|
+
this.top = Math.max(t + h / 2 - height / 2, this.bounds.minTop)
|
|
1020
|
+
this.bottom = this.parentHeight - this.top - height
|
|
1021
|
+
}
|
|
1022
|
+
tem.value.y[2].push(l, r, activeLeft, activeRight)
|
|
1023
|
+
}
|
|
1024
|
+
if (vc) {
|
|
1025
|
+
if (bln) {
|
|
1026
|
+
this.left = Math.max(l + w / 2 - width / 2, this.bounds.minLeft)
|
|
1027
|
+
this.right = this.parentWidth - this.left - width
|
|
1028
|
+
}
|
|
1029
|
+
tem.value.x[2].push(t, b, activeTop, activeBottom)
|
|
1030
|
+
}
|
|
1031
|
+
// console.log(tem);
|
|
1032
|
+
// 辅助线坐标与是否显示(display)对应的数组,易于循环遍历
|
|
1033
|
+
const arrTem = [0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 2]
|
|
1034
|
+
for (let i = 0; i <= arrTem.length; i++) {
|
|
1035
|
+
// 前6为Y辅助线,后6为X辅助线
|
|
1036
|
+
const xory = i < 6 ? 'y' : 'x'
|
|
1037
|
+
const horv = i < 6 ? 'hLine' : 'vLine'
|
|
1038
|
+
if (tem.display[i]) {
|
|
1039
|
+
const { origin, length } = this.calcLineValues(tem.value[xory][arrTem[i]])
|
|
1040
|
+
refLine[horv][arrTem[i]].display = tem.display[i]
|
|
1041
|
+
refLine[horv][arrTem[i]].position = tem.position[i]
|
|
1042
|
+
|
|
1043
|
+
if (dragLineNum) {
|
|
1044
|
+
if (i === 4 || i === 5) {
|
|
1045
|
+
// const z = l + w / 2
|
|
1046
|
+
// const activeZ = activeLeft + width / 2
|
|
1047
|
+
// const len = Math.abs(activeZ - z)
|
|
1048
|
+
// if (len > centerLength && centerLength !== 0) {
|
|
1049
|
+
// refLine[horv][arrTem[i]].lineLength = 0
|
|
1050
|
+
// centerLength = len
|
|
1051
|
+
// continue
|
|
1052
|
+
// }
|
|
1053
|
+
refLine[horv][arrTem[i]].origin = origin + w
|
|
1054
|
+
refLine[horv][arrTem[i]].lineLength = Math.abs(length - width - w)
|
|
1055
|
+
// console.log(Math.abs(length - width - w), length, width, w);
|
|
1056
|
+
|
|
1057
|
+
// centerLength = len
|
|
1058
|
+
|
|
1059
|
+
} else if (i === 10 || i === 11) {
|
|
1060
|
+
refLine[horv][arrTem[i]].origin = origin + h
|
|
1061
|
+
refLine[horv][arrTem[i]].lineLength = Math.abs(length - height - h)
|
|
1062
|
+
} else {
|
|
1063
|
+
refLine[horv][arrTem[i]].origin = origin
|
|
1064
|
+
refLine[horv][arrTem[i]].lineLength = length
|
|
1065
|
+
}
|
|
1066
|
+
} else {
|
|
1067
|
+
refLine[horv][arrTem[i]].origin = origin
|
|
1068
|
+
refLine[horv][arrTem[i]].lineLength = length
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
// refLine[horv][arrTem[i]].relativeLength = relativeLength
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
}
|
|
1078
|
+
refLine.dLine = dLine;
|
|
1079
|
+
// console.log(refLine);
|
|
1080
|
+
this.$emit('refLineParams', refLine)
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
getLinePosition(arr) {
|
|
1084
|
+
let position = {
|
|
1085
|
+
left: arr[0],
|
|
1086
|
+
width: arr[3] - arr[0]
|
|
1087
|
+
}
|
|
1088
|
+
if (arr[0] > arr[3]) {
|
|
1089
|
+
position.left = arr[3];
|
|
1090
|
+
position.width = arr[1] - arr[3];
|
|
1091
|
+
}
|
|
1092
|
+
return position;
|
|
1093
|
+
},
|
|
1094
|
+
calcLineValues (arr) {
|
|
1095
|
+
// console.log(arr);
|
|
1096
|
+
const l = Math.max(...arr) - Math.min(...arr)
|
|
1097
|
+
const length = (l > this.parentHeight ? this.parentHeight : l)
|
|
1098
|
+
const origin = Math.min(...arr)
|
|
1099
|
+
const relativeLength = {
|
|
1100
|
+
x: arr[1],
|
|
1101
|
+
y: arr[2],
|
|
1102
|
+
length: Math.abs(arr[2] - arr[1])
|
|
1103
|
+
}
|
|
1104
|
+
return { length, origin, relativeLength }
|
|
1105
|
+
},
|
|
1106
|
+
getActiveAll (nodes) {
|
|
1107
|
+
const activeAll = []
|
|
1108
|
+
const XArray = []
|
|
1109
|
+
const YArray = []
|
|
1110
|
+
let groupWidth = 0
|
|
1111
|
+
let groupHeight = 0
|
|
1112
|
+
let groupLeft = 0
|
|
1113
|
+
let groupTop = 0
|
|
1114
|
+
for (let item of nodes) {
|
|
1115
|
+
if (item.className !== undefined && item.className.includes(this.classNameActive)) {
|
|
1116
|
+
activeAll.push(item)
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
const AllLength = activeAll.length
|
|
1120
|
+
if (AllLength > 1) {
|
|
1121
|
+
for (let i of activeAll) {
|
|
1122
|
+
const l = i.offsetLeft
|
|
1123
|
+
const r = l + i.offsetWidth
|
|
1124
|
+
const t = i.offsetTop
|
|
1125
|
+
const b = t + i.offsetHeight
|
|
1126
|
+
XArray.push(t, b)
|
|
1127
|
+
YArray.push(l, r)
|
|
1128
|
+
}
|
|
1129
|
+
groupWidth = Math.max(...YArray) - Math.min(...YArray)
|
|
1130
|
+
groupHeight = Math.max(...XArray) - Math.min(...XArray)
|
|
1131
|
+
groupLeft = Math.min(...YArray)
|
|
1132
|
+
groupTop = Math.min(...XArray)
|
|
1133
|
+
}
|
|
1134
|
+
const bln = AllLength === 1
|
|
1135
|
+
return { groupWidth, groupHeight, groupLeft, groupTop, bln }
|
|
1136
|
+
},
|
|
1137
|
+
// 正则获取left与top
|
|
1138
|
+
formatTransformVal (string) {
|
|
1139
|
+
let [left, top] = string.replace(/[^0-9\-,]/g, '').split(',')
|
|
1140
|
+
if (top === undefined) top = 0
|
|
1141
|
+
return [+left, +top]
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
computed: {
|
|
1145
|
+
handleStyle () {
|
|
1146
|
+
return (stick) => {
|
|
1147
|
+
if (!this.handleInfo.switch) return { display: this.enabled ? 'block' : 'none' }
|
|
1148
|
+
|
|
1149
|
+
const size = (this.handleInfo.size / this.scaleRatio).toFixed(2)
|
|
1150
|
+
const offset = (this.handleInfo.offset / this.scaleRatio).toFixed(2)
|
|
1151
|
+
const center = (size / 2).toFixed(2)
|
|
1152
|
+
|
|
1153
|
+
const styleMap = {
|
|
1154
|
+
tl: {
|
|
1155
|
+
top: `${offset}px`,
|
|
1156
|
+
left: `${offset}px`
|
|
1157
|
+
},
|
|
1158
|
+
tm: {
|
|
1159
|
+
top: `${offset}px`,
|
|
1160
|
+
left: `calc(50% - ${center}px)`
|
|
1161
|
+
},
|
|
1162
|
+
tr: {
|
|
1163
|
+
top: `${offset}px`,
|
|
1164
|
+
right: `${offset}px`
|
|
1165
|
+
},
|
|
1166
|
+
mr: {
|
|
1167
|
+
top: `calc(50% - ${center}px)`,
|
|
1168
|
+
right: `${offset}px`
|
|
1169
|
+
},
|
|
1170
|
+
br: {
|
|
1171
|
+
bottom: `${offset}px`,
|
|
1172
|
+
right: `${offset}px`
|
|
1173
|
+
},
|
|
1174
|
+
bm: {
|
|
1175
|
+
bottom: `${offset}px`,
|
|
1176
|
+
right: `calc(50% - ${center}px)`
|
|
1177
|
+
},
|
|
1178
|
+
bl: {
|
|
1179
|
+
bottom: `${offset}px`,
|
|
1180
|
+
left: `${offset}px`
|
|
1181
|
+
},
|
|
1182
|
+
ml: {
|
|
1183
|
+
top: `calc(50% - ${center}px)`,
|
|
1184
|
+
left: `${offset}px`
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
const stickStyle = {
|
|
1188
|
+
width: `${size}px`,
|
|
1189
|
+
height: `${size}px`,
|
|
1190
|
+
top: styleMap[stick].top,
|
|
1191
|
+
left: styleMap[stick].left,
|
|
1192
|
+
right: styleMap[stick].right,
|
|
1193
|
+
bottom: styleMap[stick].bottom
|
|
1194
|
+
}
|
|
1195
|
+
stickStyle.display = this.enabled ? 'block' : 'none'
|
|
1196
|
+
return stickStyle
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
style () {
|
|
1200
|
+
return {
|
|
1201
|
+
transform: `translate(${this.left}px, ${this.top}px)`,
|
|
1202
|
+
width: this.computedWidth,
|
|
1203
|
+
height: this.computedHeight,
|
|
1204
|
+
zIndex: this.zIndex,
|
|
1205
|
+
...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto)
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
// 控制柄显示与否
|
|
1209
|
+
actualHandles () {
|
|
1210
|
+
if (!this.resizable) return []
|
|
1211
|
+
|
|
1212
|
+
return this.handles
|
|
1213
|
+
},
|
|
1214
|
+
computedWidth () {
|
|
1215
|
+
if (this.w === 'auto') {
|
|
1216
|
+
if (!this.widthTouched) {
|
|
1217
|
+
return 'auto'
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
return this.width + 'px'
|
|
1221
|
+
},
|
|
1222
|
+
computedHeight () {
|
|
1223
|
+
if (this.h === 'auto') {
|
|
1224
|
+
if (!this.heightTouched) {
|
|
1225
|
+
return 'auto'
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
return this.height + 'px'
|
|
1229
|
+
},
|
|
1230
|
+
resizingOnX () {
|
|
1231
|
+
return (Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r')))
|
|
1232
|
+
},
|
|
1233
|
+
resizingOnY () {
|
|
1234
|
+
return (Boolean(this.handle) && (this.handle.includes('t') || this.handle.includes('b')))
|
|
1235
|
+
},
|
|
1236
|
+
isCornerHandle () {
|
|
1237
|
+
return (Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle))
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
|
|
1241
|
+
watch: {
|
|
1242
|
+
snap(val) {
|
|
1243
|
+
if (val) {
|
|
1244
|
+
this.$el.setAttribute('data-is-snap', `${this.snap}`)
|
|
1245
|
+
} else {
|
|
1246
|
+
this.$el.removeAttribute('data-is-snap')
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
active (val) {
|
|
1250
|
+
this.enabled = val
|
|
1251
|
+
|
|
1252
|
+
if (val) {
|
|
1253
|
+
this.$emit('activated')
|
|
1254
|
+
} else {
|
|
1255
|
+
this.$emit('deactivated')
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
z (val) {
|
|
1259
|
+
if (val >= 0 || val === 'auto') {
|
|
1260
|
+
this.zIndex = val
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
x (val) {
|
|
1264
|
+
if (this.resizing || this.dragging) {
|
|
1265
|
+
return
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
if (this.parent) {
|
|
1269
|
+
this.bounds = this.calcDragLimits()
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
this.moveHorizontally(val)
|
|
1273
|
+
},
|
|
1274
|
+
y (val) {
|
|
1275
|
+
if (this.resizing || this.dragging) {
|
|
1276
|
+
return
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
if (this.parent) {
|
|
1280
|
+
this.bounds = this.calcDragLimits()
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
this.moveVertically(val)
|
|
1284
|
+
},
|
|
1285
|
+
lockAspectRatio (val) {
|
|
1286
|
+
if (val) {
|
|
1287
|
+
this.aspectFactor = this.width / this.height
|
|
1288
|
+
} else {
|
|
1289
|
+
this.aspectFactor = undefined
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
minWidth (val) {
|
|
1293
|
+
if (val > 0 && val <= this.width) {
|
|
1294
|
+
this.minW = val
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
minHeight (val) {
|
|
1298
|
+
if (val > 0 && val <= this.height) {
|
|
1299
|
+
this.minH = val
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
maxWidth (val) {
|
|
1303
|
+
this.maxW = val
|
|
1304
|
+
},
|
|
1305
|
+
maxHeight (val) {
|
|
1306
|
+
this.maxH = val
|
|
1307
|
+
},
|
|
1308
|
+
w (val) {
|
|
1309
|
+
if (this.resizing || this.dragging) {
|
|
1310
|
+
return
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
if (this.parent) {
|
|
1314
|
+
this.bounds = this.calcResizeLimits()
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
this.changeWidth(val)
|
|
1318
|
+
},
|
|
1319
|
+
h (val) {
|
|
1320
|
+
if (this.resizing || this.dragging) {
|
|
1321
|
+
return
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
if (this.parent) {
|
|
1325
|
+
this.bounds = this.calcResizeLimits()
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
this.changeHeight(val)
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
</script>
|
|
1333
|
+
|
|
1334
|
+
<template>
|
|
1335
|
+
<div
|
|
1336
|
+
:style="style"
|
|
1337
|
+
:class="[{
|
|
1338
|
+
[classNameActive]: enabled,
|
|
1339
|
+
[classNameDragging]: dragging,
|
|
1340
|
+
[classNameResizing]: resizing,
|
|
1341
|
+
[classNameDraggable]: draggable,
|
|
1342
|
+
[classNameResizable]: resizable
|
|
1343
|
+
}, className]"
|
|
1344
|
+
@mousedown="elementMouseDown"
|
|
1345
|
+
@touchstart="elementTouchDown"
|
|
1346
|
+
@contextmenu.prevent.stop="onContextMenu"
|
|
1347
|
+
>
|
|
1348
|
+
<div
|
|
1349
|
+
v-for="handle in actualHandles"
|
|
1350
|
+
:key="handle"
|
|
1351
|
+
:class="[classNameHandle, classNameHandle + '-' + handle]"
|
|
1352
|
+
:style="handleStyle(handle)"
|
|
1353
|
+
@mousedown.stop.prevent="handleDown(handle, $event)"
|
|
1354
|
+
@touchstart.stop.prevent="handleTouchDown(handle, $event)"
|
|
1355
|
+
>
|
|
1356
|
+
<slot :name="handle"></slot>
|
|
1357
|
+
</div>
|
|
1358
|
+
<slot></slot>
|
|
1359
|
+
</div>
|
|
1360
|
+
</template>
|