refactor(components): [main] switch to script-setup syntax (#7707)

* refactor(components): [main] switch to script-setup syntax

* refactor(components): [main] switch to script-setup syntax
This commit is contained in:
류한경 2022-05-16 22:11:59 +09:00 committed by GitHub
parent 60483d4100
commit 9d6329cb99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -18,3 +18,5 @@ export const ElAside = withNoopInstall(Aside)
export const ElFooter = withNoopInstall(Footer)
export const ElHeader = withNoopInstall(Header)
export const ElMain = withNoopInstall(Main)
export type MainInstance = InstanceType<typeof Main>

View File

@ -3,18 +3,12 @@
<slot />
</main>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
<script lang="ts" setup>
import { useNamespace } from '@element-plus/hooks'
export default defineComponent({
defineOptions({
name: 'ElMain',
setup() {
const ns = useNamespace('main')
return {
ns,
}
},
})
const ns = useNamespace('main')
</script>

View File

@ -5,7 +5,6 @@
@include b(main) {
@include set-component-css-var('main', $main);
// IE11 supports the <main> element partially https://caniuse.com/#search=main
display: block;
flex: 1;
flex-basis: auto;