Skip to content

🐛 [Bug]: 文档内容与实际使用效果不一致问题(主题色、按需引入等) #1545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
peiyanlu opened this issue Feb 1, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@peiyanlu
Copy link

peiyanlu commented Feb 1, 2023

Version

1.5.1

Vue Version

3.2.45

Link to minimal reproduction

1、主题问题
按照文档安装依赖之后,引入时并没有文档中所提供的的多种主题
2、按需引入问题
部分组件路径错误,例如:
Snipaste_2023-01-31_16-04-51

3、文档部分错误,例如:
// 第二种 引入局部调用
import { message } from 'vue-devui'

应为:
// 第二种 引入局部调用
import { Message } from 'vue-devui'

Step to reproduce

暂无

What is expected

No response

What is actually happening

No response

Any additional comments (optional)

No response

@kagol kagol added the bug Something isn't working label Feb 1, 2023
@kagol
Copy link
Member

kagol commented Feb 1, 2023

@peiyanlu 感谢你的反馈!
第一个问题我尝试了下,通过以下方式是可以导入文档提到的五种主题的:

import {
  ThemeServiceInit,
  infinityTheme,
  provenceTheme,
  sweetTheme,
  deepTheme,
  galaxyTheme,
} from 'devui-theme'

不过通过以下方式初始化主题,确实是存在问题,应该是主题工具的一个bug,我们将尽快修复:

ThemeServiceInit({ infinityTheme }, 'infinityTheme');

在我们修复之前,你可以通过另一个方式初始化主题:

const themeService = ThemeServiceInit({ infinityTheme }, 'infinityTheme');

themeService.applyTheme(deepTheme)

第二个问题,Layout/Content/Header/Footer/Aside都属于layout组件的子组件,如果要按需导入,你可以使用以下方式:

import { Layout, Content, Header, Footer, Aside } from 'vue-devui/layout'

不可以通过以下方式:

import { Aside } from 'vue-devui/aside'

第三个问题确实是我们的文档没有区分大小写,我们将尽快修复。

再次感谢你的反馈,欢迎使用 Vue DevUI,后续遇到问题也欢迎给我们反馈!

@kagol kagol added the good first issue Good for newcomers label Feb 1, 2023
@peiyanlu
Copy link
Author

peiyanlu commented Feb 1, 2023

@kagol 感谢回复,第一个问题中使用的devui-theme是0.04版本,明天继续排查一下;第二个问题产生的原因是使用了官方提供的按需引入插件运行时自动生成的,还是希望可以通过插件减少手动引入。

@peiyanlu
Copy link
Author

peiyanlu commented Feb 2, 2023

@kagol 补一下主题引入之后的tu图
Snipaste_2023-02-02_09-22-43
Snipaste_2023-02-02_09-28-08

@lgxemperor
Copy link

按文档使用了按需引入 Components({
resolvers: [
DevUiResolver()
]
})
报错:
/* unplugin-vue-components disabled */import { Layout as __unplugin_components_1 } from 'vue-devui/layout/index.es.js';import 'vue-devui/layout/style.css';
2 | import { Aside as __unplugin_components_0 } from 'vue-devui/aside/index.es.js';import 'vue-devui/layout/style.css';
| ^
3 | import { defineComponent as _defineComponent } from "vue";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants