Vue
Installation
bash
pnpm add @sandboxrun/vue
bash
npm i @sandboxrun/vue
Register Component
ts
// src/main.ts
import { createApp } from 'vue';
import { SandBoxRun } from '@sandboxrun/vue';
import App from './App.vue';
import '@sandboxrun/vue/style';
const app = createApp(App);
app.component('SandBoxRun', SandBoxRun);
app.mount('#app');
SandBoxRun Props
ts
interface SandBoxRunProps {
html: string; // 初始 html 内容
js: string; // 初始 js 内容
css: string; // 初始 css 内容
}
Demo
Code
vue
<SandBoxRun html="<div>Sandboxrun</div>" />