{"_id":"@cimom/vben-core-composables","_rev":"9-62669bc0ee1f51b237e0bf41327f3cb7","name":"@cimom/vben-core-composables","dist-tags":{"latest":"5.6.6"},"versions":{"5.5.8":{"name":"@cimom/vben-core-composables","version":"5.5.8","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.5.8","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"6b9b89176031a40ba0820efc1c60043752539111","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.5.8.tgz","fileCount":5,"integrity":"sha512-Jp7axr2h4jblbKAs483W+JI8DGXPtEcuZsy4PwtJgCzCOJ1DEkBzsgafCXESLPfrXPbwfZEEy75jNTX1GDITlQ==","signatures":[{"sig":"MEYCIQDANe2ujg80nQx+cnAtGRUxIlYgwMGNuaJi9fhg4AD+MAIhANfJKvs9wfunddWJB2E0aXEazGw+7OfxRrJt4j3K0tUz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23152},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/index.ts","default":"./dist/index.mjs","development":"./src/index.ts"}},"private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"^5.5.9"},"publishConfig":{"access":"public","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}}},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.5.8_1748415104275_0.9489818380225128","host":"s3://npm-registry-packages-npm-production"}},"5.5.9":{"name":"@cimom/vben-core-composables","version":"5.5.9","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.5.9","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"8f523ae84908d919b6e0b8d1d0bc5128a0c02f9c","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.5.9.tgz","fileCount":5,"integrity":"sha512-hwN1Waxhs1hx7ERxkXc1BWU5yEETcboEz2gapaxQF+Vkqz+nsTTVmnVLBVaGmfqbNYJb5ulyUWbmwtXhBuplxA==","signatures":[{"sig":"MEUCIAaKVwjHEASUuHOXLaTIgI+osxi8ligZwZfeoV/lamLTAiEAtu6ZLrVxq/9woPnHdkx6iR7UOf+3L/L+4LpFw6M23h8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23152},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/index.ts","default":"./dist/index.mjs","development":"./src/index.ts"}},"private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"^5.5.9"},"publishConfig":{"access":"public","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}}},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.5.9_1748415156338_0.32530876187330393","host":"s3://npm-registry-packages-npm-production"}},"5.5.12":{"name":"@cimom/vben-core-composables","version":"5.5.12","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.5.12","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"420e8e5000e2162bcfb192098c3a8821d78a0034","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.5.12.tgz","fileCount":5,"integrity":"sha512-BiGOjxuLn2x/Me5fFsTci5SkQJCgtho4qlcqxTVfdbH/VnSEU8uGoajBpkq6RW6aznMY6QMrKZyl5va41fCaoA==","signatures":[{"sig":"MEQCIEcecKdxkvQo2vp9WCli/e4iD93haHrVhH1GRb83qZ4QAiAwEhcth1PHhFDRPqi91sZYdA6rDvXNeN7WaO8mCF1DoQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22920},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"^5.5.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.5.12_1748506723408_0.46222111800563326","host":"s3://npm-registry-packages-npm-production"}},"5.6.0":{"name":"@cimom/vben-core-composables","version":"5.6.0","license":"MIT","_id":"@cimom/vben-core-composables@5.6.0","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"1c3335d11899a42ea4761148dce562d19cb762d3","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.6.0.tgz","fileCount":1,"integrity":"sha512-TsnSvCiY9IdUr1bPaJjeKYdB5UHCgENOIVxiqVwaGoUqyLa8qBYJw/Sc4K5JD/3X9RgcRKzx/YU6jtRuOLZpbw==","signatures":[{"sig":"MEYCIQDS+K35lmIMgJkummISb9bBfSooQ2AxxBrbqQvQ4CQyowIhAI2UnuVbEqEAQkzSvKqFleK3cwnra/tuwSuUU1mOzhqi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":896},"main":"./dist/index.mjs","type":"module","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"gitHead":"24e92c6254ccf3ebf0a31fecdee560339ed47e46","scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"catalog:","radix-vue":"catalog:","sortablejs":"catalog:","@vueuse/core":"catalog:","@cimom/vben-core-shared":"^5.6.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"catalog:"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.6.0_1749432969450_0.6206854779825901","host":"s3://npm-registry-packages-npm-production"}},"5.6.1":{"name":"@cimom/vben-core-composables","version":"5.6.1","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.6.1","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"a997d40a0c6982e0cfb87df2b4b00ae6e66e96b5","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.6.1.tgz","fileCount":4,"integrity":"sha512-znk/FqEbInQr1O/0lSVpSIh95+hHMgbYE7i7mbXxduvJWZFh2XGALn0BoI7sKpU6e906XkG/9Yk1Xma/SBHNJw==","signatures":[{"sig":"MEQCIARvUpTgWgOVvi1v+wdc+toULi6nMgT2WJAwZQu5BNULAiBqHHax6Xp7j3FDcFhKIGMMrfNWazfKVp9jR21A4eXNtw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16715},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"gitHead":"24e92c6254ccf3ebf0a31fecdee560339ed47e46","private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"^5.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.6.1_1749434706950_0.5957445743091287","host":"s3://npm-registry-packages-npm-production"}},"5.6.3":{"name":"@cimom/vben-core-composables","version":"5.6.3","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.6.3","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"8a7e6ba210e883ee7c32bf2582dea9f380e325d8","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.6.3.tgz","fileCount":2,"integrity":"sha512-WAh+SVxReL3qdM5RjH4QFK+o+/kGcCsl1zVZPhNoqCMW2V9tuDWzmfIDkCnLMS2hQ8GIbyw5+P+yyvtrp87v+w==","signatures":[{"sig":"MEQCIFlbjcZdlF2Df2+s2T/6RAydQp3Tihd3zSGrtR9Auy9vAiBjaX+eSrghP/ODfKxNk3cAhuUHvE4t0fw01AaxoTH1LQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7240},"main":"./dist/index.mjs","type":"module","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"gitHead":"24e92c6254ccf3ebf0a31fecdee560339ed47e46","private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.6.3_1749456808208_0.40867869883963204","host":"s3://npm-registry-packages-npm-production"}},"5.6.5":{"name":"@cimom/vben-core-composables","version":"5.6.5","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.6.5","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"638cc006fe88048c5416004a5f34763754b7b37f","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.6.5.tgz","fileCount":5,"integrity":"sha512-7hdCDKLL8CUnytGW7How6DRMTe0pRE1dKvKvOJdKZ0XeDUqWkgw1qy7rOmGP8206CzGeQIAjUxfv8wVsVpD54w==","signatures":[{"sig":"MEQCIAC0OoSao9JhIkyQ1jxJLsZeTPWLx53007bZMODL2X3XAiA3/xfGLq4sKS5WcRy1UXSw+VMmj+BZptG0fzMBDzIsvg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22130},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"gitHead":"24e92c6254ccf3ebf0a31fecdee560339ed47e46","private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.6.5_1749460674435_0.3602484130559236","host":"s3://npm-registry-packages-npm-production"}},"5.6.6":{"name":"@cimom/vben-core-composables","version":"5.6.6","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","_id":"@cimom/vben-core-composables@5.6.6","maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"},{"name":"xxcazzy","email":"6983376@qq.com"}],"homepage":"https://github.com/vbenjs/vue-vben-admin","bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"dist":{"shasum":"b0b94de9c8525d383a11d3682ad08a5dbaedc094","tarball":"https://registry.npmjs.org/@cimom/vben-core-composables/-/vben-core-composables-5.6.6.tgz","fileCount":16,"integrity":"sha512-aCNZRLJNo0h3YNJBOBkTMwrDvuERgM5iUEJFzq1yzJj+JyHbYQEViDRbNfxAogzkvwx8b0CQ8qBzjFW1PUrgdA==","signatures":[{"sig":"MEYCIQCWv5YOY7uQo2YoQHVTVtt3ymfbKpa47+r5FriGu2WuBwIhAJIw0YQDCDM2rNs7q0wDpv0rVY/FQowWt8LlhtpN2BUU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35444},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"gitHead":"4658e451554fb07b03bcd870c1694010f7362c31","private":false,"scripts":{"build":"pnpm unbuild"},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"_npmVersion":"10.5.1","description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"vue":"^3.5.13","radix-vue":"^1.9.17","sortablejs":"^1.15.6","@vueuse/core":"^13.1.0","@cimom/vben-core-shared":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/sortablejs":"^1.15.8"},"_npmOperationalInternal":{"tmp":"tmp/vben-core-composables_5.6.6_1749566808350_0.781986086648935","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-05-28T06:51:44.205Z","modified":"2026-01-14T01:37:28.943Z","5.5.8":"2025-05-28T06:51:44.470Z","5.5.9":"2025-05-28T06:52:36.547Z","5.5.12":"2025-05-29T08:18:43.586Z","5.6.0":"2025-06-09T01:36:09.643Z","5.6.1":"2025-06-09T02:05:07.112Z","5.6.3":"2025-06-09T08:13:28.387Z","5.6.5":"2025-06-09T09:17:54.622Z","5.6.6":"2025-06-10T14:46:48.540Z"},"bugs":{"url":"https://github.com/vbenjs/vue-vben-admin/issues"},"author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","homepage":"https://github.com/vbenjs/vue-vben-admin","repository":{"url":"git+https://github.com/vbenjs/vue-vben-admin.git","type":"git","directory":"packages/@core/composables"},"description":"Vue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。","maintainers":[{"email":"msj1370380114@gmail.com","name":"moushangjie"},{"email":"57237184@qq.com","name":"hdeqi2005"},{"email":"6983376@qq.com","name":"xxcazzy"}],"readme":"# @cimom/vben-core-composables\n\nVue 组合式 API 工具集，提供了一系列可复用的组合式函数（Composables），用于简化 Vue 应用开发中的常见任务。\n\n## 安装\n\n```bash\nnpm install @cimom/vben-core-composables\n```\n\n## 可用组合式函数\n\n### useIsMobile\n\n检测当前设备是否为移动设备。\n\n```ts\nimport { useIsMobile } from '@cimom/vben-core-composables';\n\nconst { isMobile } = useIsMobile();\n\n// 使用示例\nif (isMobile.value) {\n  // 执行移动设备相关逻辑\n}\n```\n\n**返回值：**\n\n- `isMobile`: Ref\\<boolean\\> - 是否为移动设备\n\n### useLayoutStyle\n\n用于管理布局样式，包括头部和页脚的高度设置。\n\n```ts\nimport {\n  useLayoutHeaderStyle,\n  useLayoutFooterHeight,\n} from '@cimom/vben-core-composables';\n\n// 设置头部高度\nconst { setLayoutHeaderHeight, layoutHeaderHeight } = useLayoutHeaderStyle();\nsetLayoutHeaderHeight(60);\n\n// 设置页脚高度\nconst { setLayoutFooterHeight, layoutFooterHeight } = useLayoutFooterStyle();\nsetLayoutFooterHeight(40);\n```\n\n**返回值：**\n\n- `setLayoutHeaderHeight`: (height: number) => void - 设置头部高度的函数\n- `layoutHeaderHeight`: Ref\\<number\\> - 头部高度值\n- `setLayoutFooterHeight`: (height: number) => void - 设置页脚高度的函数\n- `layoutFooterHeight`: Ref\\<number\\> - 页脚高度值\n\n### useNamespace\n\n用于生成带命名空间的 CSS 类名，便于组件样式隔离。\n\n```ts\nimport { useNamespace } from '@cimom/vben-core-composables';\n\n// 创建一个命名空间为 'button' 的工具\nconst ns = useNamespace('button');\n\n// 使用示例\nconst classes = {\n  base: ns.b(), // 'vben-button'\n  primary: ns.m('primary'), // 'vben-button--primary'\n  disabled: ns.is('disabled'), // 'is-disabled'\n  icon: ns.e('icon'), // 'vben-button__icon'\n};\n```\n\n**参数：**\n\n- `block`: string - 组件的基础名称\n\n**返回值：**\n\n- `b`: () => string - 返回基础类名\n- `e`: (element: string) => string - 返回元素类名\n- `m`: (modifier: string) => string - 返回修饰符类名\n- `be`: (block: string, element: string) => string - 返回块元素组合类名\n- `em`: (element: string, modifier: string) => string - 返回元素修饰符组合类名\n- `bm`: (block: string, modifier: string) => string - 返回块修饰符组合类名\n- `bem`: (block: string, element: string, modifier: string) => string - 返回块元素修饰符组合类名\n- `is`: (name: string, state?: boolean) => string - 返回状态类名\n\n### usePriorityValues\n\n用于处理具有优先级的属性值，可以从多个来源获取值并按优先级返回。\n\n```ts\nimport { usePriorityValues } from '@cimom/vben-core-composables';\n\nconst props = {\n  title: '默认标题',\n  showIcon: true,\n};\n\nconst state = ref({\n  title: '状态标题',\n  showIcon: false,\n});\n\n// 使用示例\nconst { title, showIcon } = usePriorityValues(props, state);\nconsole.log(title.value); // '状态标题' (state 优先级高于 props)\n```\n\n**参数：**\n\n- `sources`: ...any[] - 多个值来源，按优先级从低到高排列\n\n**返回值：**\n\n- 包含所有属性的响应式对象，每个属性都是一个 Ref\n\n### useScrollLock\n\n用于锁定/解锁页面滚动。\n\n```ts\nimport { useScrollLock } from '@cimom/vben-core-composables';\n\nconst { lockScroll, unlockScroll } = useScrollLock();\n\n// 锁定滚动\nlockScroll();\n\n// 解锁滚动\nunlockScroll();\n```\n\n**返回值：**\n\n- `lockScroll`: () => void - 锁定滚动的函数\n- `unlockScroll`: () => void - 解锁滚动的函数\n\n### useSimpleLocale\n\n简化的国际化工具，用于获取和设置语言。\n\n```ts\nimport { useSimpleLocale } from '@cimom/vben-core-composables';\n\nconst { $t, locale, setLocale } = useSimpleLocale();\n\n// 翻译文本\nconst welcomeText = $t('welcome');\n\n// 获取当前语言\nconsole.log(locale.value); // 'zh-CN'\n\n// 设置语言\nsetLocale('en-US');\n```\n\n**返回值：**\n\n- `$t`: (key: string) => string - 翻译函数\n- `locale`: Ref\\<string\\> - 当前语言\n- `setLocale`: (locale: string) => void - 设置语言的函数\n\n### useSortable\n\n用于实现元素拖拽排序功能。\n\n```ts\nimport { useSortable } from '@cimom/vben-core-composables';\n\n// 在组件中使用\nconst containerRef = ref<HTMLElement | null>(null);\n\n// 初始化排序功能\nconst { destroy } = useSortable(containerRef, {\n  animation: 150,\n  onEnd: (evt) => {\n    console.log('排序结束', evt.oldIndex, evt.newIndex);\n  },\n});\n\n// 组件卸载时销毁\nonUnmounted(() => {\n  destroy();\n});\n```\n\n**参数：**\n\n- `el`: Ref<HTMLElement | null> - 容器元素引用\n- `options`: SortableOptions - Sortable.js 配置选项\n\n**返回值：**\n\n- `destroy`: () => void - 销毁排序功能的函数\n\n### 从 radix-vue 导出的工具\n\n```ts\nimport {\n  useEmitAsProps,\n  useForwardExpose,\n  useForwardProps,\n  useForwardPropsEmits,\n} from '@cimom/vben-core-composables';\n\n// useEmitAsProps: 将组件的 emit 事件转换为 props\n// useForwardExpose: 转发组件暴露的属性和方法\n// useForwardProps: 转发组件的 props\n// useForwardPropsEmits: 同时转发组件的 props 和 emits\n```\n\n## 使用示例\n\n### 在组件中使用 useNamespace 和 useIsMobile\n\n```vue\n<template>\n  <div :class=\"[ns.b(), isMobile ? ns.m('mobile') : '']\">\n    <header :class=\"ns.e('header')\">\n      <h1 :class=\"ns.e('title')\">标题</h1>\n    </header>\n    <main :class=\"ns.e('content')\">内容区域</main>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useNamespace, useIsMobile } from '@cimom/vben-core-composables';\n\nconst ns = useNamespace('layout');\nconst { isMobile } = useIsMobile();\n</script>\n```\n\n### 使用 usePriorityValues 处理组件属性\n\n```vue\n<template>\n  <div>\n    <h1>{{ title }}</h1>\n    <button v-if=\"showButton\">点击</button>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { usePriorityValues } from '@cimom/vben-core-composables';\n\nconst props = defineProps({\n  title: { type: String, default: '默认标题' },\n  showButton: { type: Boolean, default: true },\n});\n\nconst state = ref({\n  title: '状态中的标题',\n});\n\n// 优先使用 state 中的值，如果没有则使用 props 中的值\nconst { title, showButton } = usePriorityValues(props, state);\n</script>\n```\n","readmeFilename":"README.md"}