ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script lang="ts" setup>
import { computed, unref } from 'vue';
 
import { useAttrs } from '@jnpf/hooks';
 
import { Divider } from 'ant-design-vue';
 
defineOptions({ inheritAttrs: false, name: 'JnpfDivider' });
defineProps({
  content: {
    default: '',
    type: String,
  },
  contentPosition: {
    default: 'left',
    type: String as PropType<'center' | 'left' | 'right'>,
  },
});
const attrs = useAttrs({ excludeDefaultKeys: false });
 
const getBindValue = computed(() => ({ ...unref(attrs) }));
</script>
 
<template>
  <Divider :orientation="contentPosition" v-bind="getBindValue">{{ content }}</Divider>
</template>