Skip to content

Commit

Permalink
refactor(components): [divider] switch to script-setup (element-plus#…
Browse files Browse the repository at this point in the history
…6556)

Co-authored-by: rove <[email protected]>
  • Loading branch information
wzrove and rove authored Mar 12, 2022
1 parent 525f61f commit 0e6ff4f
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions packages/components/divider/src/divider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
return {
'--el-border-style': props.borderStyle,
} as CSSProperties
})
return {
ns,
dividerStyle,
}
},
})
const props = defineProps(dividerProps)
const ns = useNamespace('divider')
const dividerStyle = computed(() => {
return {
'--el-border-style': props.borderStyle,
} as CSSProperties
})
</script>

0 comments on commit 0e6ff4f

Please sign in to comment.