Skip to content

Commit 711096e

Browse files
committed
111
1 parent 5989d75 commit 711096e

File tree

13 files changed

+396
-306
lines changed

13 files changed

+396
-306
lines changed

examples/playground/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div id="app"></div>
2626
<script>
2727
window.MonacoEnvironment = {
28-
getWorkerUrl: function (moduleId, label) {
28+
getWorkerUrl: (moduleId, label) => {
2929
if (label === 'json') {
3030
return './node_modules/monaco-editor/esm/vs/language/json/json.worker.js';
3131
}

examples/playground/src/constants.ts

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export const DEFAULT_APP_HXO = `<template>
32
<div class="p-6 bg-white rounded-xl shadow-sm border border-gray-100 max-w-md mx-auto">
43
<h1 class="text-2xl font-bold text-gray-800 mb-4">{{ title }}</h1>
@@ -46,12 +45,12 @@ h1 { letter-spacing: -0.025em; }
4645
</style>`;
4746

4847
export const EXAMPLES = [
49-
{
50-
name: 'Counter',
51-
files: [
52-
{
53-
name: 'App.hxo',
54-
content: `<template>
48+
{
49+
name: "Counter",
50+
files: [
51+
{
52+
name: "App.hxo",
53+
content: `<template>
5554
<div class="flex items-center gap-4 p-4 border rounded-lg w-fit">
5655
<button @click="count--" class="w-10 h-10 flex items-center justify-center bg-gray-100 hover:bg-gray-200 rounded-full">-</button>
5756
<span class="text-xl font-bold min-w-[2rem] text-center">{{ count }}</span>
@@ -62,16 +61,16 @@ export const EXAMPLES = [
6261
<script>
6362
let count = ref(0); // 像普通变量一样声明,底层是 signal
6463
</script>`,
65-
language: 'hxo'
66-
}
67-
]
68-
},
69-
{
70-
name: 'Todo List',
71-
files: [
72-
{
73-
name: 'App.hxo',
74-
content: `<template>
64+
language: "hxo",
65+
},
66+
],
67+
},
68+
{
69+
name: "Todo List",
70+
files: [
71+
{
72+
name: "App.hxo",
73+
content: `<template>
7574
<div class="max-w-md mx-auto p-6 bg-white rounded-xl shadow-lg border">
7675
<h2 class="text-xl font-bold mb-4">Todo List</h2>
7776
@@ -118,18 +117,18 @@ function addTodo(e) {
118117
e.target.value = "";
119118
}
120119
</script>`,
121-
language: 'hxo'
122-
}
123-
]
124-
},
125-
{
126-
name: 'Tailwind Demo',
127-
files: [
128-
{
129-
name: 'App.hxo',
130-
content: DEFAULT_APP_HXO,
131-
language: 'hxo'
132-
}
133-
]
134-
}
120+
language: "hxo",
121+
},
122+
],
123+
},
124+
{
125+
name: "Tailwind Demo",
126+
files: [
127+
{
128+
name: "App.hxo",
129+
content: DEFAULT_APP_HXO,
130+
language: "hxo",
131+
},
132+
],
133+
},
135134
];

0 commit comments

Comments
 (0)