From 4a0925d3f017f87aa5f0a8002a9939756260942a Mon Sep 17 00:00:00 2001 From: hisoka0728 <1399952343@qq.com> Date: Tue, 8 Oct 2024 15:55:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=B0=83=E8=AF=95=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ibiz.config.ts | 1 + package.json | 3 +- pnpm-lock.yaml | 217 +++++++++++++++++++++++++++++++++++++++++++- src/mob-app/App.tsx | 20 +++- 4 files changed, 236 insertions(+), 5 deletions(-) diff --git a/ibiz.config.ts b/ibiz.config.ts index 8dca4ea034..56b410c9a6 100644 --- a/ibiz.config.ts +++ b/ibiz.config.ts @@ -42,6 +42,7 @@ export default defineConfig({ 'cherry-markdown', 'quill', '@ibiz-template/mob-theme', + '@ibiz-template/devtool', '@ibiz-template-package/vs-tree-ex', '@ibiz-template/core', '@ibiz-template/runtime', diff --git a/package.json b/package.json index 54af765d9f..839d8ebaf8 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,9 @@ "@ibiz-template/runtime": "0.7.38-alpha.13", "@ibiz-template/theme": "^0.7.0", "@ibiz-template/vue3-util": "0.7.38-alpha.13", + "@ibiz-template/devtool": "0.0.1-dev.6", "@ibiz/model-core": "^0.1.55", - "@ibiz-template/mob-theme": "^0.2.13", + "@ibiz-template/mob-theme": "^0.2.14", "async-validator": "^4.2.5", "cherry-markdown": "^0.8.26", "dayjs": "^1.11.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8ddb316b5..006e2422f3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,11 @@ dependencies: '@ibiz-template/core': specifier: 0.7.35-alpha.1 version: 0.7.35-alpha.1(axios@1.6.2)(lodash-es@4.17.21)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1) + '@ibiz-template/devtool': + specifier: 0.0.1-dev.6 + version: 0.0.1-dev.6(@ibiz-template/core@0.7.35-alpha.1)(@ibiz-template/model-helper@0.7.38-alpha.13)(@ibiz-template/runtime@0.7.38-alpha.13)(@ibiz-template/theme@0.7.0)(@ibiz-template/vue3-util@0.7.38-alpha.13)(@ibiz/model-core@0.1.55)(@monaco-editor/loader@1.4.0)(async-validator@4.2.5)(axios@1.6.2)(dayjs@1.11.10)(element-plus@2.8.4)(lodash-es@4.17.21)(monaco-editor@0.45.0)(pluralize@8.0.0)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1)(vue-router@4.2.5)(vue@3.3.9)(vuedraggable@4.1.0) '@ibiz-template/mob-theme': - specifier: ^0.2.13 + specifier: ^0.2.14 version: 0.2.14(@ibiz-template/core@0.7.35-alpha.1)(@ibiz/model-core@0.1.55)(async-validator@4.2.5)(dayjs@1.11.10)(echarts@5.4.3)(handlebars@4.7.8)(lodash-es@4.17.21)(mqtt@2.18.9)(path-browserify@1.0.1)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1) '@ibiz-template/model-helper': specifier: 0.7.38-alpha.13 @@ -621,6 +624,19 @@ packages: postcss-selector-parser: 6.0.13 dev: true + /@ctrl/tinycolor@3.6.1: + resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==} + engines: {node: '>=10'} + dev: false + + /@element-plus/icons-vue@2.3.1(vue@3.3.9): + resolution: {integrity: sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==} + peerDependencies: + vue: ^3.2.0 + dependencies: + vue: 3.3.9(typescript@5.3.2) + dev: false + /@esbuild/android-arm64@0.18.20: resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -1054,6 +1070,23 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@floating-ui/core@1.6.8: + resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} + dependencies: + '@floating-ui/utils': 0.2.8 + dev: false + + /@floating-ui/dom@1.6.11: + resolution: {integrity: sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==} + dependencies: + '@floating-ui/core': 1.6.8 + '@floating-ui/utils': 0.2.8 + dev: false + + /@floating-ui/utils@0.2.8: + resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} + dev: false + /@humanwhocodes/config-array@0.11.13: resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} @@ -1185,6 +1218,56 @@ packages: ramda: 0.29.1 dev: false + /@ibiz-template/devtool@0.0.1-dev.6(@ibiz-template/core@0.7.35-alpha.1)(@ibiz-template/model-helper@0.7.38-alpha.13)(@ibiz-template/runtime@0.7.38-alpha.13)(@ibiz-template/theme@0.7.0)(@ibiz-template/vue3-util@0.7.38-alpha.13)(@ibiz/model-core@0.1.55)(@monaco-editor/loader@1.4.0)(async-validator@4.2.5)(axios@1.6.2)(dayjs@1.11.10)(element-plus@2.8.4)(lodash-es@4.17.21)(monaco-editor@0.45.0)(pluralize@8.0.0)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1)(vue-router@4.2.5)(vue@3.3.9)(vuedraggable@4.1.0): + resolution: {integrity: sha512-S7SFSTrHXqe0M58csrpNCyfQQ9f6Ebs3BrAsBIY2aMWhsIIwpjsrXqRMSt4ySCOtihfwE7BQfZJXQcwHopq1CA==} + peerDependencies: + '@ibiz-template/core': ^0.6.2 + '@ibiz-template/model-helper': ^0.6.2 + '@ibiz-template/runtime': ^0.6.2 + '@ibiz-template/theme': ^0.6.0 + '@ibiz-template/vue3-util': ^0.6.2 + '@ibiz/model-core': ^0.1.14 + '@monaco-editor/loader': ^1.4.0 + async-validator: ^4.2.5 + axios: ^1.6.1 + dayjs: ^1.11.10 + element-plus: ^2.4.2 + lodash-es: ^4.17.21 + monaco-editor: ^0.45.0 + pluralize: ^8.0.0 + qs: ^6.11.2 + qx-util: ^0.4.8 + ramda: ^0.29.1 + vue: ^3.3.8 + vue-router: ^4.2.5 + vuedraggable: ^4.1.0 + dependencies: + '@ibiz-template/core': 0.7.35-alpha.1(axios@1.6.2)(lodash-es@4.17.21)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1) + '@ibiz-template/model-helper': 0.7.38-alpha.13(@ibiz-template/runtime@0.7.38-alpha.13)(ramda@0.29.1) + '@ibiz-template/runtime': 0.7.38-alpha.13(@ibiz-template/core@0.7.35-alpha.1)(@ibiz/model-core@0.1.55)(async-validator@4.2.5)(dayjs@1.11.10)(echarts@5.4.3)(handlebars@4.7.8)(lodash-es@4.17.21)(mqtt@2.18.9)(path-browserify@1.0.1)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1) + '@ibiz-template/theme': 0.7.0 + '@ibiz-template/vue3-util': 0.7.38-alpha.13(@ibiz-template/core@0.7.35-alpha.1)(@ibiz-template/runtime@0.7.38-alpha.13)(@ibiz/model-core@0.1.55)(dayjs@1.11.10)(path-browserify@1.0.1)(pinia@2.1.7)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1)(vue-router@4.2.5)(vue@3.3.9) + '@ibiz/model-core': 0.1.55 + '@imengyu/vue3-context-menu': 1.4.2 + '@monaco-editor/loader': 1.4.0(monaco-editor@0.45.0) + async-validator: 4.2.5 + axios: 1.6.2 + dayjs: 1.11.10 + element-plus: 2.8.4(vue@3.3.9) + interactjs: 1.10.27 + lodash-es: 4.17.21 + loglevel: 1.8.1 + monaco-editor: 0.45.0 + pluralize: 8.0.0 + qs: 6.11.2 + qx-util: 0.4.8 + ramda: 0.29.1 + sortablejs: 1.15.3 + vue: 3.3.9(typescript@5.3.2) + vue-router: 4.2.5(vue@3.3.9) + vuedraggable: 4.1.0(vue@3.3.9) + dev: false + /@ibiz-template/mob-theme@0.2.14(@ibiz-template/core@0.7.35-alpha.1)(@ibiz/model-core@0.1.55)(async-validator@4.2.5)(dayjs@1.11.10)(echarts@5.4.3)(handlebars@4.7.8)(lodash-es@4.17.21)(mqtt@2.18.9)(path-browserify@1.0.1)(qs@6.11.2)(qx-util@0.4.8)(ramda@0.29.1): resolution: {integrity: sha512-sywecC1JgL5yYkOhMm0snn4D/aSQ9lFHbuuWKpF6juiksbSKI3/WeSDOrzML5gxqXS6Mfj9dg+G0intkcQthvw==} dependencies: @@ -1322,6 +1405,14 @@ packages: resolution: {integrity: sha512-15Zm86iTc+IpBRO1+UBxBwsTtnPGovPdutAj6AH+magKXO0lrk1eJtqBVz8NolSMl8J/UzPeHwMAoreCerpHww==} dev: false + /@imengyu/vue3-context-menu@1.4.2: + resolution: {integrity: sha512-oSXPjGw9cdf+fIpk3KJEqDVBK/VV7RgvO7GMLaSUGqfY/aoZByvTRtrM7tF57ad/X4SJ7TQx1ccxyRyMYVOPLg==} + dev: false + + /@interactjs/types@1.10.27: + resolution: {integrity: sha512-BUdv0cvs4H5ODuwft2Xp4eL8Vmi3LcihK42z0Ft/FbVJZoRioBsxH+LlsBdK4tAie7PqlKGy+1oyOncu1nQ6eA==} + dev: false + /@intlify/core-base@9.8.0: resolution: {integrity: sha512-UxaSZVZ1DwqC/CltUZrWZNaWNhfmKtfyV4BJSt/Zt4Or/fZs1iFj0B+OekYk1+MRHfIOe3+x00uXGQI4PbO/9g==} engines: {node: '>= 16'} @@ -1388,6 +1479,15 @@ packages: resolution: {integrity: sha512-W6CLUJ2eBMw3Rec70qrsEW0jOm/3twwJv21mrmj2yORiaVmVYGS4sSS5yUwvQc1ZlDLYGPnClVWmUUMagKNsfA==} dev: false + /@monaco-editor/loader@1.4.0(monaco-editor@0.45.0): + resolution: {integrity: sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==} + peerDependencies: + monaco-editor: '>= 0.21.0 < 1' + dependencies: + monaco-editor: 0.45.0 + state-local: 1.0.7 + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1608,6 +1708,10 @@ packages: dev: true optional: true + /@sxzz/popperjs-es@2.11.7: + resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==} + dev: false + /@tootallnate/once@2.0.0: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -1640,11 +1744,9 @@ packages: resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} dependencies: '@types/lodash': 4.14.202 - dev: true /@types/lodash@4.14.202: resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} - dev: true /@types/minimist@1.2.5: resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} @@ -1694,6 +1796,10 @@ packages: resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} dev: false + /@types/web-bluetooth@0.0.16: + resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} + dev: false + /@typescript-eslint/eslint-plugin@6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.55.0)(typescript@5.3.2): resolution: {integrity: sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2007,6 +2113,31 @@ packages: /@vue/shared@3.3.9: resolution: {integrity: sha512-ZE0VTIR0LmYgeyhurPTpy4KzKsuDyQbMSdM49eKkMnT5X4VfFBLysMzjIZhLEFQYjjOVVfbvUDHckwjDFiO2eA==} + /@vueuse/core@9.13.0(vue@3.3.9): + resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==} + dependencies: + '@types/web-bluetooth': 0.0.16 + '@vueuse/metadata': 9.13.0 + '@vueuse/shared': 9.13.0(vue@3.3.9) + vue-demi: 0.14.10(vue@3.3.9) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: false + + /@vueuse/metadata@9.13.0: + resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==} + dev: false + + /@vueuse/shared@9.13.0(vue@3.3.9): + resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==} + dependencies: + vue-demi: 0.14.10(vue@3.3.9) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: false + /JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -3646,6 +3777,31 @@ packages: resolution: {integrity: sha512-SpwUMDWe9tQu8JX5QCO1+p/hChAi9AE9UpoC3rcHVc+gdCGlbT3SGb5I1klgb952HRIyvt9wZhSz9bNBYz9swA==} dev: true + /element-plus@2.8.4(vue@3.3.9): + resolution: {integrity: sha512-ZlVAdUOoJliv4kW3ntWnnSHMT+u/Os7mXJjk2xzOlqNeHaI2/ozlF+R58ZCEak8ZnDi6+5A2viWEYRsq64IuiA==} + peerDependencies: + vue: ^3.2.0 + dependencies: + '@ctrl/tinycolor': 3.6.1 + '@element-plus/icons-vue': 2.3.1(vue@3.3.9) + '@floating-ui/dom': 1.6.11 + '@popperjs/core': /@sxzz/popperjs-es@2.11.7 + '@types/lodash': 4.14.202 + '@types/lodash-es': 4.17.12 + '@vueuse/core': 9.13.0(vue@3.3.9) + async-validator: 4.2.5 + dayjs: 1.11.10 + escape-html: 1.0.3 + lodash: 4.17.21 + lodash-es: 4.17.21 + lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21) + memoize-one: 6.0.0 + normalize-wheel-es: 1.2.0 + vue: 3.3.9(typescript@5.3.2) + transitivePeerDependencies: + - '@vue/composition-api' + dev: false + /elkjs@0.8.2: resolution: {integrity: sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ==} requiresBuild: true @@ -3867,6 +4023,10 @@ packages: engines: {node: '>=6'} dev: true + /escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: false + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -5124,6 +5284,12 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: true + /interactjs@1.10.27: + resolution: {integrity: sha512-y/8RcCftGAF24gSp76X2JS3XpHiUvDQyhF8i7ujemBz77hwiHDuJzftHx7thY8cxGogwGiPJ+o97kWB6eAXnsA==} + dependencies: + '@interactjs/types': 1.10.27 + dev: false + /internal-slot@1.0.6: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} @@ -5817,6 +5983,18 @@ packages: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} dev: false + /lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21): + resolution: {integrity: sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==} + peerDependencies: + '@types/lodash-es': '*' + lodash: '*' + lodash-es: '*' + dependencies: + '@types/lodash-es': 4.17.12 + lodash: 4.17.21 + lodash-es: 4.17.21 + dev: false + /lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} dev: true @@ -5964,6 +6142,10 @@ packages: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} dev: true + /memoize-one@6.0.0: + resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==} + dev: false + /meow@10.1.5: resolution: {integrity: sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6136,6 +6318,10 @@ packages: is-extendable: 1.0.1 dev: true + /monaco-editor@0.45.0: + resolution: {integrity: sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==} + dev: false + /mqtt-packet@5.6.1: resolution: {integrity: sha512-eaF9rO2uFrIYEHomJxziuKTDkbWW5psLBaIGCazQSKqYsTaB3n4SpvJ1PexKaDBiPnMLPIFWBIiTYT3IfEJfww==} dependencies: @@ -6277,6 +6463,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /normalize-wheel-es@1.2.0: + resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==} + dev: false + /now-and-later@2.0.1: resolution: {integrity: sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==} engines: {node: '>= 0.10'} @@ -7443,6 +7633,14 @@ packages: - supports-color dev: true + /sortablejs@1.14.0: + resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==} + dev: false + + /sortablejs@1.15.3: + resolution: {integrity: sha512-zdK3/kwwAK1cJgy1rwl1YtNTbRmc8qW/+vgXf75A7NHag5of4pyI6uK86ktmQETyWRH7IGaE73uZOOBcGxgqZg==} + dev: false + /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -7527,6 +7725,10 @@ packages: resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} dev: true + /state-local@1.0.7: + resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} + dev: false + /static-extend@0.1.2: resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} engines: {node: '>=0.10.0'} @@ -8541,6 +8743,15 @@ packages: '@vue/shared': 3.3.9 typescript: 5.3.2 + /vuedraggable@4.1.0(vue@3.3.9): + resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==} + peerDependencies: + vue: ^3.0.1 + dependencies: + sortablejs: 1.14.0 + vue: 3.3.9(typescript@5.3.2) + dev: false + /w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. diff --git a/src/mob-app/App.tsx b/src/mob-app/App.tsx index a51d42da33..f0c29e278c 100644 --- a/src/mob-app/App.tsx +++ b/src/mob-app/App.tsx @@ -1,4 +1,4 @@ -import { routerCallback } from '@ibiz-template/vue3-util'; +import { AppHooks, routerCallback } from '@ibiz-template/vue3-util'; import { Modal, ViewMode } from '@ibiz-template/runtime'; import { defineComponent, onUnmounted, ref } from 'vue'; import './App.scss'; @@ -12,6 +12,24 @@ export default defineComponent({ transitionName.value = type === 'push' ? 'forward' : 'back'; }; + // 适配devtool + const listenDevtool = async (e: KeyboardEvent): Promise => { + if ((e.ctrlKey || e.metaKey) && e.code === 'F12') { + // 一次性的监听 + document.removeEventListener('keydown', listenDevtool); + + const devtoolConfig = ibiz.env.devtoolConfig || {}; + devtoolConfig.platform = 'mob'; + ibiz.env.devtoolConfig = devtoolConfig; + // 加载模块 + const module = await import('@ibiz-template/devtool'); + const devtool = module.default || module; + AppHooks.useComponent.callSync(null, devtool); + } + }; + + document.addEventListener('keydown', listenDevtool); + on('onBeforeStackChange', onViewStackChange); onUnmounted(() => { -- Gitee