chore: lint

This commit is contained in:
Anthony Fu 2022-05-03 09:28:45 +08:00
parent 8c449252e8
commit 657225563d
17 changed files with 84 additions and 82 deletions

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { contributors } from '../contributors'
</script>
<template>
<div flex="~ wrap gap-1" justify-center>
<a v-for="{ name, avatar } of contributors" :key="name" :href="`https://github.com/${name}`" m-0 rel="noopener noreferrer" :aria-label="`${name} on GitHub`">

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { coreTeamMembers } from '../contributors'
</script>
<template>
<div flex flex-col items-center>
<div flex flex-col items-center p="t-10 md:t-20 b-10">

View File

@ -1,7 +1,6 @@
<script setup lang="ts">
const times = ref(2)
const props = defineProps<{ count: number }>()
const times = ref(2)
const result = computed(() => props.count * times.value)
defineExpose(props)

View File

@ -1,9 +1,9 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
const times = ref(2)
const props = defineProps<{ count: number }>()
const times = ref(2)
const result = computed(() => props.count * times.value)
defineExpose(props)

View File

@ -29,7 +29,7 @@
"ui:test": "npm -C packages/ui run test:run"
},
"devDependencies": {
"@antfu/eslint-config": "^0.22.0",
"@antfu/eslint-config": "^0.23.0",
"@antfu/ni": "^0.16.2",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^22.0.0",

View File

@ -2,17 +2,18 @@
import type CodeMirror from 'codemirror'
import { useCodeMirror } from '../composables/codemirror'
const attrs = useAttrs()
const emit = defineEmits<{
(event: 'update:modelValue', value: string): void
(event: 'save', content: string): void
}>()
const props = defineProps<{
modelValue: string
mode?: string
readOnly?: boolean
}>()
const emit = defineEmits<{
(event: 'update:modelValue', value: string): void
(event: 'save', content: string): void
}>()
const attrs = useAttrs()
const modeMap: Record<string, any> = {
// html: 'htmlmixed',
// vue: 'htmlmixed',

View File

@ -18,7 +18,7 @@ import { client, isConnected, isConnecting } from '~/composables/client'
flex="~ col gap-2"
items-center justify-center
:class="isConnecting ? 'animate-pulse': ''"
:class="isConnecting ? 'animate-pulse' : ''"
>
<div
text="5xl"

View File

@ -76,7 +76,7 @@ function onDraft(value: boolean) {
:class="{ 'tab-button-active': viewMode === 'editor' }"
@click="changeViewMode('editor')"
>
{{ draft ? '*&#160;': '' }}Code
{{ draft ? '*&#160;' : '' }}Code
</button>
<button
tab-button

View File

@ -45,17 +45,17 @@ const transform = computed(() => {
<template>
<div
class="fixed inset-0 z-40"
:class="modelValue ? '': 'pointer-events-none'"
:class="modelValue ? '' : 'pointer-events-none'"
>
<div
class="bg-base inset-0 absolute transition-opacity duration-500 ease-out"
:class="modelValue ? 'opacity-50': 'opacity-0'"
:class="modelValue ? 'opacity-50' : 'opacity-0'"
@click="$emit('update:modelValue', false)"
/>
<div
class="bg-base border-base absolute transition-all duration-200 ease-out"
:class="[positionClass, 'scrolls']"
:style="modelValue ? {}: {transform}"
class="bg-base border-base absolute transition-all duration-200 ease-out scrolls"
:class="[positionClass]"
:style="modelValue ? {} : { transform }"
>
<slot />
</div>

View File

@ -16,7 +16,6 @@ function onItemClick(task: Task) {
showDashboard(false)
}
const toggleMode = computed(() => isDark.value ? 'light' : 'dark')
</script>
<template>

View File

@ -22,12 +22,12 @@ export default {
<template>
<!-- maybe provide a KEEP STRUCTURE mode, do not filter by search keyword -->
<!-- v-if = keepStructure || (!search || caseInsensitiveMatch(task.name, search))-->
<!-- v-if = keepStructure || (!search || caseInsensitiveMatch(task.name, search)) -->
<TaskItem
v-if="!search || caseInsensitiveMatch(task.name, search)"
v-bind="$attrs"
:task="task"
:style="{ paddingLeft: `${indent * 0.75 + 1}rem`}"
:style="{ paddingLeft: `${indent * 0.75 + 1}rem` }"
@click="onItemClick && onItemClick(task)"
/>
<div v-if="nested && task.type === 'suite' && task.tasks.length">

View File

@ -186,7 +186,7 @@ export default {
</DetailsPanel>
</template>
<!--flat-->
<!-- flat -->
<template v-else>
<TaskTree
v-for="task in filtered"
@ -198,7 +198,7 @@ export default {
:on-item-click="onItemClick"
/>
</template>
<!--empty-state-->
<!-- empty-state -->
<template v-if="isFiltered && filtered.length === 0">
<div flex="~ col" items-center p="x4 y4" font-light>
<div op30>

View File

@ -12,13 +12,13 @@ const props = defineProps<{
function formatTime(t: number) {
return (new Date(t)).toLocaleTimeString()
}
</script>
<template>
<div border="b base" p-4>
<div
text-xs mb-1
:class="props.type === 'stderr' ? 'text-red-600 dark:text-red-300': 'op30'"
:class="props.type === 'stderr' ? 'text-red-600 dark:text-red-300' : 'op30'"
>
{{ formatTime(props.time) }} | {{ props.taskName }} | {{ props.type }}
</div>

View File

@ -98,7 +98,7 @@ function relative(p: string) {
p="x3 y2"
m-2
rounded
:style="{ 'margin-left': `${task.result?.htmlError ? 0.5 : (2 * task.level + 0.5)}rem`}"
:style="{ 'margin-left': `${task.result?.htmlError ? 0.5 : (2 * task.level + 0.5)}rem` }"
>
{{ task.name }}
<div v-if="task.result?.htmlError" class="scrolls scrolls-rounded task-error">

114
pnpm-lock.yaml generated
View File

@ -9,7 +9,7 @@ importers:
.:
specifiers:
'@antfu/eslint-config': ^0.22.0
'@antfu/eslint-config': ^0.23.0
'@antfu/ni': ^0.16.2
'@rollup/plugin-alias': ^3.1.9
'@rollup/plugin-commonjs': ^22.0.0
@ -46,7 +46,7 @@ importers:
vitest: workspace:*
vue: ^3.2.33
devDependencies:
'@antfu/eslint-config': 0.22.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config': 0.23.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/ni': 0.16.2
'@rollup/plugin-alias': 3.1.9_rollup@2.71.1
'@rollup/plugin-commonjs': 22.0.0_rollup@2.71.1
@ -961,13 +961,13 @@ packages:
'@jridgewell/trace-mapping': 0.3.9
dev: true
/@antfu/eslint-config-basic/0.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-c9KMc7uQXRaTNLUAgmFYImNkzj3Ae8zCpdVZXfMep+PYOClG3lEJ3s66qdB7u8mNAoIxcnZTE9n6ya/Y0/iXtA==}
/@antfu/eslint-config-basic/0.23.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-Jygnpgq+9Rb7gBjeQjWx5SNUBPfcHtCh87nydHKXc3hly/wi2pwebp0lZMJahSfIH38DYpVTj4q4pl4lAh1sNA==}
peerDependencies:
eslint: '>=7.4.0'
dependencies:
eslint: 8.14.0
eslint-plugin-antfu: 0.22.0_t725usgvqspm5woeqpaxbfp2qu
eslint-plugin-antfu: 0.23.0_t725usgvqspm5woeqpaxbfp2qu
eslint-plugin-eslint-comments: 3.2.0_eslint@8.14.0
eslint-plugin-html: 6.2.0
eslint-plugin-import: 2.26.0_eslint@8.14.0
@ -984,12 +984,12 @@ packages:
- typescript
dev: true
/@antfu/eslint-config-react/0.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-68biOuGUrNDXfnCs+mZUzFnipB13TMhKrNdZrye/6fheoAiTOA+lwx5ipQcYaOdFn16vzPSUqjTq+lzpUVbdKg==}
/@antfu/eslint-config-react/0.23.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-bF/4ngA9IEv9WconCtKneub1xlFRu/XBVmkbYzfXSZk8QcrNfb+BZOuLQihxCSo534ulh2zWbxc4EsS/4AOs9Q==}
peerDependencies:
eslint: '>=7.4.0'
dependencies:
'@antfu/eslint-config-ts': 0.22.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config-ts': 0.23.0_t725usgvqspm5woeqpaxbfp2qu
eslint: 8.14.0
eslint-plugin-react: 7.29.4_eslint@8.14.0
transitivePeerDependencies:
@ -997,27 +997,27 @@ packages:
- typescript
dev: true
/@antfu/eslint-config-ts/0.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-jEFQO39emkurhusaDzUJYqpQcaGgnd81yhSZMEgV+VOn5JCKpIm/65pPvmW0ETFjr1MpHJ1eNyYIm1mL9BMqpg==}
/@antfu/eslint-config-ts/0.23.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-3nLrgj0jLyznTAgBxsRj9HbmnHcHw9RkYVorkge7gf2yVRXXTsjbjYo4O7YSsq/ZrF9Wj4gOJWiX5uVI981V8A==}
peerDependencies:
eslint: '>=7.4.0'
typescript: '>=3.9'
dependencies:
'@antfu/eslint-config-basic': 0.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/eslint-plugin': 5.20.0_xjzcjjuuimc7qcpu345if6ak7i
'@typescript-eslint/parser': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config-basic': 0.23.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/eslint-plugin': 5.22.0_lnjlwhtxjffjmj5o7dnwvwyqxq
'@typescript-eslint/parser': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
eslint: 8.14.0
typescript: 4.6.4
transitivePeerDependencies:
- supports-color
dev: true
/@antfu/eslint-config-vue/0.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-g786yeawFDj1njJXB0BPZ7uDir8xWMtM2djGiCJXTxlpPrLN4JwtpYwA59pH70Nuj5bmByuKdT4qZNMPqJMiJg==}
/@antfu/eslint-config-vue/0.23.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-ufgJM+iTx8sNnOJtOnb/U9cqb45g0iUVRGSuSfHBFsN6EAV4IOhHDYioO/S1x1HC7ecdYrfvmlJRLPopxJph+Q==}
peerDependencies:
eslint: '>=7.4.0'
dependencies:
'@antfu/eslint-config-ts': 0.22.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config-ts': 0.23.0_t725usgvqspm5woeqpaxbfp2qu
eslint: 8.14.0
eslint-plugin-vue: 8.7.1_eslint@8.14.0
transitivePeerDependencies:
@ -1025,15 +1025,15 @@ packages:
- typescript
dev: true
/@antfu/eslint-config/0.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-Rv2ppt98/RsSxlNkhG83d1CS/0ptkOTpywXjVlSVU68i93w9nglEdiuJ2OVRyHMT1wXKZrPQSJNEeMYAs8r1UA==}
/@antfu/eslint-config/0.23.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-hfK7zkBH1UxdKRMyUxuAzOihBuoPrk1wZBvGBtQkhpEYwkd//sl3uFaIi+DnLiAsmRWBleAmruaEfkJyvA3Efg==}
peerDependencies:
eslint: '>=7.4.0'
dependencies:
'@antfu/eslint-config-react': 0.22.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config-vue': 0.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/eslint-plugin': 5.20.0_xjzcjjuuimc7qcpu345if6ak7i
'@typescript-eslint/parser': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config-react': 0.23.0_t725usgvqspm5woeqpaxbfp2qu
'@antfu/eslint-config-vue': 0.23.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/eslint-plugin': 5.22.0_lnjlwhtxjffjmj5o7dnwvwyqxq
'@typescript-eslint/parser': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
eslint: 8.14.0
eslint-plugin-eslint-comments: 3.2.0_eslint@8.14.0
eslint-plugin-html: 6.2.0
@ -6775,8 +6775,8 @@ packages:
dev: true
optional: true
/@typescript-eslint/eslint-plugin/5.20.0_xjzcjjuuimc7qcpu345if6ak7i:
resolution: {integrity: sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==}
/@typescript-eslint/eslint-plugin/5.22.0_lnjlwhtxjffjmj5o7dnwvwyqxq:
resolution: {integrity: sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@ -6786,10 +6786,10 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/scope-manager': 5.20.0
'@typescript-eslint/type-utils': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/parser': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/type-utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
debug: 4.3.4
eslint: 8.14.0
functional-red-black-tree: 1.0.1
@ -6802,8 +6802,8 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.20.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==}
/@typescript-eslint/parser/5.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -6812,9 +6812,9 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.20.0
'@typescript-eslint/types': 5.20.0
'@typescript-eslint/typescript-estree': 5.20.0_typescript@4.6.4
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/typescript-estree': 5.22.0_typescript@4.6.4
debug: 4.3.4
eslint: 8.14.0
typescript: 4.6.4
@ -6822,16 +6822,16 @@ packages:
- supports-color
dev: true
/@typescript-eslint/scope-manager/5.20.0:
resolution: {integrity: sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==}
/@typescript-eslint/scope-manager/5.22.0:
resolution: {integrity: sha512-yA9G5NJgV5esANJCO0oF15MkBO20mIskbZ8ijfmlKIvQKg0ynVKfHZ15/nhAJN5m8Jn3X5qkwriQCiUntC9AbA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.20.0
'@typescript-eslint/visitor-keys': 5.20.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/visitor-keys': 5.22.0
dev: true
/@typescript-eslint/type-utils/5.20.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==}
/@typescript-eslint/type-utils/5.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@ -6840,7 +6840,7 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/utils': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
debug: 4.3.4
eslint: 8.14.0
tsutils: 3.21.0_typescript@4.6.4
@ -6849,13 +6849,13 @@ packages:
- supports-color
dev: true
/@typescript-eslint/types/5.20.0:
resolution: {integrity: sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==}
/@typescript-eslint/types/5.22.0:
resolution: {integrity: sha512-T7owcXW4l0v7NTijmjGWwWf/1JqdlWiBzPqzAWhobxft0SiEvMJB56QXmeCQjrPuM8zEfGUKyPQr/L8+cFUBLw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree/5.20.0_typescript@4.6.4:
resolution: {integrity: sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==}
/@typescript-eslint/typescript-estree/5.22.0_typescript@4.6.4:
resolution: {integrity: sha512-EyBEQxvNjg80yinGE2xdhpDYm41so/1kOItl0qrjIiJ1kX/L/L8WWGmJg8ni6eG3DwqmOzDqOhe6763bF92nOw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
@ -6863,8 +6863,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.20.0
'@typescript-eslint/visitor-keys': 5.20.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/visitor-keys': 5.22.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
@ -6875,16 +6875,16 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils/5.20.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==}
/@typescript-eslint/utils/5.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@typescript-eslint/scope-manager': 5.20.0
'@typescript-eslint/types': 5.20.0
'@typescript-eslint/typescript-estree': 5.20.0_typescript@4.6.4
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/typescript-estree': 5.22.0_typescript@4.6.4
eslint: 8.14.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.14.0
@ -6893,11 +6893,11 @@ packages:
- typescript
dev: true
/@typescript-eslint/visitor-keys/5.20.0:
resolution: {integrity: sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==}
/@typescript-eslint/visitor-keys/5.22.0:
resolution: {integrity: sha512-DbgTqn2Dv5RFWluG88tn0pP6Ex0ROF+dpDO1TNNZdRtLjUr6bdznjA6f/qNqJLjd2PgguAES2Zgxh/JzwzETDg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.20.0
'@typescript-eslint/types': 5.22.0
eslint-visitor-keys: 3.3.0
dev: true
@ -10764,10 +10764,10 @@ packages:
find-up: 2.1.0
dev: true
/eslint-plugin-antfu/0.22.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-yYv4nES0XyH1cHsG8IoMyzAiXzYR4XzFTSQyZ1VQVlFF00r1okYYqCP0/56/pT8q/NvQ5BnoVAtfkZrR2Lqc+w==}
/eslint-plugin-antfu/0.23.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-NiWbXYxCmfd0BVI/EunNkCLD6V33Ce9sckjlccu69MejPPPTkEAFAKfmsoxc9LuW1x38E7CE26EvODUuAKXOCw==}
dependencies:
'@typescript-eslint/utils': 5.20.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
transitivePeerDependencies:
- eslint
- supports-color

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
const defined = MY_CONSTANT
</script>
<template>
{{ defined }}
</template>

View File

@ -1,9 +1,9 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
const times = ref(2)
const props = defineProps<{ count: number }>()
const times = ref(2)
const result = computed(() => props.count * times.value)
defineExpose(props)