Skip to content

Commit 2c6cd25

Browse files
committed
minor refactor
1 parent 2f68f5b commit 2c6cd25

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"unplugin-auto-import": "^0.6.1",
3737
"vite": "^2.8.0",
3838
"vue": "^3.2.25",
39-
"vue-tsc": "^0.31.4"
39+
"vue-tsc": "^0.31.4",
40+
"xterm": "^4.18.0"
4041
}
4142
}

pnpm-lock.yaml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tui/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import App from './App.vue'
22
// import App from './demos/Borders.vue'
33
import { createApp } from 'vue-termui'
44

5-
await createApp(App).mount()
5+
createApp(App).mount()
+5-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import { h } from '@vue/runtime-core'
1+
import { h, FunctionalComponent } from '@vue/runtime-core'
22

3-
export const TuiNewline = defineComponent({
4-
name: 'TuiNewline',
5-
props: {
6-
n: Number,
7-
},
8-
setup(props) {
9-
return () => h('tui-text', '\n'.repeat(props.n || 1))
10-
},
11-
})
3+
export const TuiNewline: FunctionalComponent<{ n?: number }> = (props) =>
4+
h('tui-text', '\n'.repeat(props.n ?? 1))
5+
6+
TuiNewline.displayName = 'TuiNewline'

0 commit comments

Comments
 (0)