Skip to content

不支持element-plus的自定义命名空间, #635

@wenlongFam

Description

@wenlongFam

不支持element-plus的自定义命名空间,

App.vue
<template> <el-config-provider namespace="ep"> <ConfigGlobal :size="currentSize"> <RouterView :class="greyMode ? ${prefixCls}-grey-mode : ''" /> </ConfigGlobal> </el-config-provider> </template>

main.ts
app.use(ElementPlus, { namespace: 'ep' })

vite.config.ts
scss: { additionalData:@use "@/styles/element/index.scss" as *;, },

styles/element/index.scss
// we can add this to custom namespace, default is 'el' @forward 'element-plus/theme-chalk/src/mixins/config.scss' with ( $namespace: 'ep' // 这里'ep'可替换为你想要的任意前缀 );

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions