mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor(components): [timeline] switch to script-setup syntax (#7705)
Co-authored-by: metanas <matanas@pre-history.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user