Merge pull request #14297 from wangguohao/dev

Docs: update custom-theme docs
pull/14325/head
Zhi Cun 2019-02-02 10:18:24 +08:00 committed by GitHub
commit f5822c0634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 18 deletions

View File

@ -110,12 +110,15 @@ Vue.use(ElementUI)
If you are using `babel-plugin-component` for on-demand import, just modify `.babelrc` and specify `styleLibraryName` to the path where your custom theme is located relative to `.babelrc`. Note that `~` is required: If you are using `babel-plugin-component` for on-demand import, just modify `.babelrc` and specify `styleLibraryName` to the path where your custom theme is located relative to `.babelrc`. Note that `~` is required:
```json ```json
{ {
"plugins": [["component", [ "plugins": [
{ [
"libraryName": "element-ui", "component",
"styleLibraryName": "~theme" {
} "libraryName": "element-ui",
]]] "styleLibraryName": "~theme"
}
]
]
} }
``` ```

View File

@ -110,12 +110,15 @@ Vue.use(ElementUI)
Si esta utilizando `babel-plugin-component` para importar bajo demanda, solo debe modificar el archivo `.babelrc` y especificar en la propiedad `styleLibraryName` la ruta en donde se encuentra localizado su tema personalizado relativo a `.babelrc`. **Nota** el carácter `~` es obligatorio: Si esta utilizando `babel-plugin-component` para importar bajo demanda, solo debe modificar el archivo `.babelrc` y especificar en la propiedad `styleLibraryName` la ruta en donde se encuentra localizado su tema personalizado relativo a `.babelrc`. **Nota** el carácter `~` es obligatorio:
```json ```json
{ {
"plugins": [["component", [ "plugins": [
{ [
"libraryName": "element-ui", "component",
"styleLibraryName": "~theme" {
} "libraryName": "element-ui",
]]] "styleLibraryName": "~theme"
}
]
]
} }
``` ```

View File

@ -109,12 +109,15 @@ Vue.use(ElementUI)
如果是搭配 `babel-plugin-component` 一起使用,只需要修改 `.babelrc` 的配置,指定 `styleLibraryName` 路径为自定义主题相对于 `.babelrc` 的路径,注意要加 `~` 如果是搭配 `babel-plugin-component` 一起使用,只需要修改 `.babelrc` 的配置,指定 `styleLibraryName` 路径为自定义主题相对于 `.babelrc` 的路径,注意要加 `~`
```json ```json
{ {
"plugins": [["component", [ "plugins": [
{ [
"libraryName": "element-ui", "component",
"styleLibraryName": "~theme" {
} "libraryName": "element-ui",
]]] "styleLibraryName": "~theme"
}
]
]
} }
``` ```