refactor(components): [timeline] switch to script-setup syntax (#7705)

Co-authored-by: metanas <matanas@pre-history.com>
This commit is contained in:
Anas Boudih
2022-05-16 14:17:36 +01:00
committed by GitHub
parent 9d6329cb99
commit c77155b899
2 changed files with 9 additions and 13 deletions

View File

@@ -74,6 +74,7 @@ describe('TimeLine.vue', () => {
`,
data() {
return {
iconMoreFilled: markRaw(MoreFilled),
activities: [
{
content: 'Step 1: xxxxxx',
@@ -112,6 +113,7 @@ describe('TimeLine.vue', () => {
`,
data() {
return {
iconMoreFilled: markRaw(MoreFilled),
activities: [
{
content: 'Step 1: xxxxxx',
@@ -257,6 +259,7 @@ describe('TimeLine.vue', () => {
`,
data() {
return {
iconMoreFilled: markRaw(MoreFilled),
activities: [
{
content: 'Step 1: xxxxxx',

View File

@@ -43,23 +43,16 @@
</li>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
<script lang="ts" setup>
import { ElIcon } from '@element-plus/components/icon'
import { useNamespace } from '@element-plus/hooks'
import { timelineItemProps } from './timeline-item'
export default defineComponent({
defineOptions({
name: 'ElTimelineItem',
components: {
ElIcon,
},
props: timelineItemProps,
setup() {
const ns = useNamespace('timeline-item')
return {
ns,
}
},
})
defineProps(timelineItemProps)
const ns = useNamespace('timeline-item')
</script>