feat(demo): enum 使用范例

This commit is contained in:
菲鸽
2024-03-01 14:27:45 +08:00
parent 5e1dd51802
commit eb81b89a37
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<route lang="json5" type="page">
{
style: { navigationBarTitleText: 'enum' },
}
</route>
<template>
<view class="">enum</view>
</template>
<script lang="ts" setup>
import { TestEnum } from '@/typings.d'
type T = TestEnum.A
const a = 'a' as T
console.log(a)
</script>
<style lang="scss" scoped>
//
</style>