Skip to content
New issue

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

强烈支持将 page-meta 作为组件使用 #5273

Open
mutuguangda opened this issue Dec 26, 2024 · 0 comments
Open

强烈支持将 page-meta 作为组件使用 #5273

mutuguangda opened this issue Dec 26, 2024 · 0 comments

Comments

@mutuguangda
Copy link

示例:

<template>
  <page-meta v-bind="pageMetaBindValue">
    <navigation-bar v-bind="navigationBarBindValue" />
  </page-meta>
  <view class="content">
    <slot />
  </view>
</template>

<script setup lang="ts">
import type { WrapperPropsType } from './wrapper'
import { omit } from 'lodash-es'
import { computed } from 'vue'

defineOptions({
  name: 'HoWrapper',
})

const props = withDefaults(defineProps<Partial<WrapperPropsType>>(), {})
const pageMetaBindValue = computed(() => {
  return omit(props, 'navigationBar')
})
const navigationBarBindValue = computed(() => {
  return props.navigationBar
})
</script>

<style lang="scss" scoped>
.content {
  background-color: #f5f5f5;
  height: 100%;
  font-size: 28rpx;
  color: #333333;
  line-height: 1;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant