style: Add elNamespace

feat(component): Add namespace of class
This commit is contained in:
kailong321200875
2022-01-23 10:11:13 +08:00
parent e20fa76cad
commit d847ccb098
38 changed files with 507 additions and 302 deletions

View File

@@ -2,6 +2,11 @@
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus'
import { PropType } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('context-menu')
const { t } = useI18n()
@@ -23,6 +28,7 @@ const command = (item: contextMenuSchema) => {
<template>
<ElDropdown
:class="prefixCls"
:trigger="trigger"
placement="bottom-start"
@command="command"
@@ -44,9 +50,3 @@ const command = (item: contextMenuSchema) => {
</template>
</ElDropdown>
</template>
<style lang="less">
.v-context-menu-popper {
min-width: 150px;
}
</style>