@edanweis/vue-code-layout
vue-code-layout
This is a fork of the original vue-code-layout that adds built-in state persistence with Pinia and optional Supabase integration. You can use it to automatically save and restore layout states across sessions.
A Vue editor layout component that like VSCode and can be used to develop web editors.

English | 中文
Features
- Simple and easy to use, small size
- Support adding panels
- Support drag and drop panel
- Support customize panel icons, text, rendering, etc
- Supports VSCode outer layout and inner editor area layout
- Support saving and loading data
- Support defining CSS styles
- Built-in state persistence with Pinia (optional)
- Optional Supabase integration for cloud storage
- Layout persistence with versioning (using Supabase)
TypeScript Support
When using TypeScript with the layout store plugin, you may need to override some types. The library currently uses @ts-nocheck in some internal files for compatibility. If you encounter type errors with initialize or other methods, you can extend the types as needed:
declare module '@edanweis/vue-code-layout' {
interface LayoutStoreOptions {
supabase?: any;
stateId?: string;
additionalData?: Record<string, any>;
// Add other options as needed
}
}
Install
Import in main.ts:
import 'vue-code-layout/lib/vue-code-layout.css'
import VueCodeLayout from '@edanweis/vue-code-layout'
createApp(App)
.use(VueCodeLayout)
For detailed usage, please refer to the documentation.
Documentation
Develop
git clone git@github.com:edanweis/vue-code-layout.git
cd vue-code-layout
npm install
npm run dev # Development serve project
npm run build-demo # Build example project
npm run build-lib # Build library project
Problem
Open source projects require everyone's support to get better and better.
If you encounter any problems, you can submit an issue and I will do my best to solve it for you.
If you have any good modifications, welecome submit a PR!
AD: Author's other project
License
Related Packages
Monaco Editor for Vue 2&3 - use the monaco-editor in any Vue application without...
Monaco Editor for Vue - use the monaco-editor in Vue2/3 without needing to use p...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.4.2 | ^3.3.4 | MIT | |
| 1.4.1 | ^3.3.4 | MIT | |
| 1.4.0 | ^3.3.4 | MIT | |
| 1.3.2 | ^3.3.4 | MIT | |
| 1.3.1 | ^3.3.4 | MIT | |
| 1.3.0 | ^3.3.4 | MIT |
Pre-releases (95)
| Version | Released | Vue | License |
|---|---|---|---|
| 1.4.3-beta.87 | ^3.3.4 | MIT | |
| 1.4.3-beta.86 | ^3.3.4 | MIT | |
| 1.4.3-beta.85 | ^3.3.4 | MIT | |
| 1.4.3-beta.84 | ^3.3.4 | MIT | |
| 1.4.3-beta.83 | ^3.3.4 | MIT | |
| 1.4.3-beta.82 | ^3.3.4 | MIT | |
| 1.4.3-beta.81 | ^3.3.4 | MIT | |
| 1.4.3-beta.80 | ^3.3.4 | MIT | |
| 1.4.3-beta.79 | ^3.3.4 | MIT | |
| 1.4.3-beta.78 | ^3.3.4 | MIT | |
| 1.4.3-beta.77 | ^3.3.4 | MIT | |
| 1.4.3-beta.76 | ^3.3.4 | MIT | |
| 1.4.3-beta.75 | ^3.3.4 | MIT | |
| 1.4.3-beta.74 | ^3.3.4 | MIT | |
| 1.4.3-beta.73 | ^3.3.4 | MIT | |
| 1.4.3-beta.72 | ^3.3.4 | MIT | |
| 1.4.3-beta.71 | ^3.3.4 | MIT | |
| 1.4.3-beta.70 | ^3.3.4 | MIT | |
| 1.4.3-beta.69 | ^3.3.4 | MIT | |
| 1.4.3-beta.68 | ^3.3.4 | MIT | |
| 1.4.3-beta.67 | ^3.3.4 | MIT | |
| 1.4.3-beta.66 | ^3.3.4 | MIT | |
| 1.4.3-beta.65 | ^3.3.4 | MIT | |
| 1.4.3-beta.64 | ^3.3.4 | MIT | |
| 1.4.3-beta.63 | ^3.3.4 | MIT | |
| 1.4.3-beta.62 | ^3.3.4 | MIT | |
| 1.4.3-beta.61 | ^3.3.4 | MIT | |
| 1.4.3-beta.60 | ^3.3.4 | MIT | |
| 1.4.3-beta.59 | ^3.3.4 | MIT | |
| 1.4.3-beta.58 | ^3.3.4 | MIT |
Showing the latest 30 of 95. See every release on npm