{"_id":"@composy/portal-vue","name":"@composy/portal-vue","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@composy/portal-vue","version":"0.0.1","description":"Vue 3 components for @composy/portal-core","keywords":["portal","vue","vue3","component"],"author":{"name":"LDesign Team"},"license":"MIT","type":"module","sideEffects":false,"exports":{".":{"types":"./es/index.d.ts","import":"./es/index.js","require":"./lib/index.cjs","default":"./es/index.js"},"./composables/usePortalEditor":{"types":"./es/composables/usePortalEditor.d.ts","import":"./es/composables/usePortalEditor.js","require":"./lib/composables/usePortalEditor.cjs","default":"./es/composables/usePortalEditor.js"},"./composables/usePortalViewer":{"types":"./es/composables/usePortalViewer.d.ts","import":"./es/composables/usePortalViewer.js","require":"./lib/composables/usePortalViewer.cjs","default":"./es/composables/usePortalViewer.js"},"./plugins/portal-plugin":{"types":"./es/plugins/portal-plugin.d.ts","import":"./es/plugins/portal-plugin.js","require":"./lib/plugins/portal-plugin.cjs","default":"./es/plugins/portal-plugin.js"},"./package.json":"./package.json"},"main":"./lib/index.cjs","module":"./es/index.js","types":"./es/index.d.ts","unpkg":"./dist/index.min.js","jsdelivr":"./dist/index.min.js","scripts":{"build":"ldesign-builder build","postbuild":"node --experimental-strip-types ../../../../scripts/index.ts workspace:normalize-package-output --cwd .. --target packages/vue && node --experimental-strip-types ../../../../scripts/index.ts workspace:check-package-outputs --cwd .. --target packages/vue","lint":"eslint . --cache","lint:check":"eslint . --cache --max-warnings 0","lint:fix":"eslint . --cache --fix","type-check":"vue-tsc --noEmit -p tsconfig.typecheck.json","test":"ltesting run:unit","test:run":"ltesting run:unit"},"dependencies":{"@composy/portal-core":"^0.0.1"},"peerDependencies":{"vue":"^3.5.32"},"devDependencies":{"@antfu/eslint-config":"9.1.0","@composy/builder":"^0.0.1","@composy/testing":"^0.0.1","eslint":"10.7.0","typescript":"5.9.3","vue":"3.5.39","vue-tsc":"^3.3.7"},"publishConfig":{"registry":"http://npm.longrise.cn:6286/"},"typings":"./es/index.d.ts","browser":"./dist/index.js","_id":"@composy/portal-vue@0.0.1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-EQ5R1+zE92gkKeB7nJWjbk1AZvcGIalxzwaQDlOi7vRtbwg/ADuC3jQgL+f/C1CtJlkMTn6wQS6GFglKnuek+w==","shasum":"847bbef387c68be67902926b0ea526ce1da74afe","tarball":"https://registry.npmjs.org/@composy/portal-vue/-/portal-vue-0.0.1.tgz","fileCount":63,"unpackedSize":146600,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHgnJ88dmCqLet4esqIVhqSmxPV2yurlFH8Cwfrf63gEAiEAhM+tTl1OkmnvIBy90ud9s9K34KEjKHT4J4TUVCeFs4U="}]},"_npmUser":{"name":"swimly","email":"979741120@qq.com"},"directories":{},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/portal-vue_0.0.1_1786949490135_0.8393916697477815"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:51:28.418Z","0.0.1":"2026-08-17T06:51:30.295Z","modified":"2026-08-17T06:51:30.815Z"},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"description":"Vue 3 components for @composy/portal-core","keywords":["portal","vue","vue3","component"],"author":{"name":"LDesign Team"},"license":"MIT","readme":"# @composy/portal-vue\n\n企业门户编辑器 Vue 3 组件封装\n\n## 安装\n\n```bash\npnpm add @composy/portal-vue\n```\n\n## 快速开始\n\n```vue\n<template>\n  <LDesignPortalEditor\n    v-model=\"layout\"\n    theme=\"light\"\n    :columns=\"12\"\n    :row-height=\"80\"\n    @change=\"handleChange\"\n  />\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { LDesignPortalEditor } from '@composy/portal-vue'\n\nconst layout = ref(null)\n\nfunction handleChange(newLayout) {\n  console.log('布局变化：', newLayout)\n}\n</script>\n```\n\n## 组件\n\n### LDesignPortalEditor\n\n| Prop | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| `modelValue` | `LayoutData` | - | 布局数据（v-model） |\n| `theme` | `'light' \\| 'dark'` | `'light'` | 主题模式 |\n| `disabled` | `boolean` | `false` | 是否禁用 |\n| `columns` | `number` | `12` | 列数 |\n| `rowHeight` | `number` | `80` | 行高 |\n| `widgets` | `WidgetDefinition[]` | - | 自定义 Widget |\n| `builtinWidgets` | `string[]` | - | 启用的内置 Widget |\n\n### LDesignPortalViewer\n\n| Prop | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| `layout` | `LayoutData` | - | 布局数据 |\n| `theme` | `'light' \\| 'dark'` | `'light'` | 主题模式 |\n| `rowHeight` | `number` | `80` | 行高 |\n| `widgets` | `WidgetDefinition[]` | - | 自定义 Widget |\n\n## Composables\n\n### usePortalEditor\n\n```typescript\nconst { instance, layout, create, addWidget, removeWidget, destroy } = usePortalEditor()\n```\n\n### usePortalViewer\n\n```typescript\nconst { instance, create, setLayout, setTheme, destroy } = usePortalViewer()\n```\n\n## 插件\n\n```typescript\nimport { PortalPlugin } from '@composy/portal-vue'\n\napp.use(PortalPlugin, { editorName: 'LDesignPortalEditor' })\n```\n\n## 构建产物\n\n| 目录 | 说明 |\n|------|------|\n| `dist/` | UMD 格式（含 min.js、style.css） |\n| `es/` | ESM 格式 |\n| `esm/` | ESM 格式（preserveModules） |\n| `lib/` | CJS 格式 |\n\n## 验证\n\n```bash\npnpm --dir libraries/portal/packages/vue run type-check\npnpm --dir libraries/portal/packages/vue run build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-4f5bca50bbe46990b4604c4096373270"}