# 乐趣实验室🧪
- 这是乐趣实验室首页
demo-container
vue
values: 18
vue3
18
vue3 setup用法
<template>
<div>demo-container</div>
<div>{{ data.name }}</div>
<div>values: {{ values }}</div>
<div>
<p v-for="key in state">{{ key }}</p>
</div>
</template>
<script setup>
import { reactive, ref } from 'vue'
const data = reactive({
name: 'vue'
})
const values = ref("18")
const state = ref([
'vue3',
18,
])
</script>
<style>
.inputs {
color: #fff
}
</style>
显示代码复制代码复制代码
引用Antd组件
<template>
<a-button type="primary">Primary Button</a-button>
<a-button>Default Button</a-button>
<a-button type="dashed">Dashed Button</a-button>
<a-button type="text">Text Button</a-button>
<a-button type="link">Link Button</a-button>
</template>
<script>
import { reactive, toRefs } from 'vue'
export default {
setup (props, context) {
let _data = reactive({
})
return {
...toRefs(_data)
}
}
}
</script>
显示代码复制代码复制代码