mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
refactor(components): [divider] switch to script-setup (#6556)
Co-authored-by: rove <rove@outlook.com>
This commit is contained in:
parent
525f61f8da
commit
0e6ff4f9a9
@ -9,30 +9,20 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, computed } from 'vue'
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { useNamespace } from '@element-plus/hooks'
|
||||
|
||||
import { dividerProps } from './divider'
|
||||
import type { CSSProperties } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
defineOptions({
|
||||
name: 'ElDivider',
|
||||
props: dividerProps,
|
||||
|
||||
setup(props) {
|
||||
const ns = useNamespace('divider')
|
||||
|
||||
const dividerStyle = computed(() => {
|
||||
})
|
||||
const props = defineProps(dividerProps)
|
||||
const ns = useNamespace('divider')
|
||||
const dividerStyle = computed(() => {
|
||||
return {
|
||||
'--el-border-style': props.borderStyle,
|
||||
} as CSSProperties
|
||||
})
|
||||
|
||||
return {
|
||||
ns,
|
||||
dividerStyle,
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user