mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-21 02:50:11 +08:00
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:
parent
60483d4100
commit
9d6329cb99
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user