We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
复现代码:https://github.com/sunpm/unisave/blob/uniapp-issue-props/src/pages/index/index.vue
<script setup lang="ts"> interface Props { name?: string } const props = withDefaults(defineProps<Props>(), { name: 'sunpm', }) console.log('打印 name 参数', props.name) // 路由没有参数,打印则是 undefined </script> <template> <view flex="~ col items-center justify-center" p-50px> <h2> 路由 props name:{{ name }} </h2> </view> </template>
pages/hi.vue 还有 js 版本。 template 可以正确显示默认值,在 setup 获取不到
pages/hi.vue
The text was updated successfully, but these errors were encountered:
@Otto-J 辛宝麻烦看看
Sorry, something went wrong.
No branches or pull requests
复现代码:https://github.com/sunpm/unisave/blob/uniapp-issue-props/src/pages/index/index.vue
pages/hi.vue
还有 js 版本。template 可以正确显示默认值,在 setup 获取不到
The text was updated successfully, but these errors were encountered: