fix: type & vue3

This commit is contained in:
Caaalabash
2020-07-29 20:18:18 +08:00
committed by Herrington Darkholme
parent 7ede28cbe5
commit c1c4121014
2 changed files with 18 additions and 8 deletions

View File

@@ -14,14 +14,17 @@
</template>
<script>
export default {
import { defineComponent } from 'vue'
export default defineComponent({
name: 'Basic',
methods: {
handleClick() {
alert('click')
},
setup(props, ctx) {
const handleClick = () => alert('click')
return {
handleClick,
}
},
}
})
</script>
<style scoped>

View File

@@ -13,7 +13,14 @@
</template>
<script lang="ts">
export default {
import { defineComponent } from 'vue'
interface IDividerProps {
direction: string,
contentPosition: string
}
export default defineComponent({
name: 'ElDivider',
props: {
direction: {
@@ -31,5 +38,5 @@ export default {
},
},
},
}
})
</script>