Skip to content
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

feat(theme-generator): support uploading css style to previews #547

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/theme-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

### 🏗️ Develop

- `npm run dev`

- `npm install`
- `npm run build`
- `npm link`
- `npm run build:watch` execute `npm link` as well to preview in application project
- Use `npm link tdesign-theme-generator` in the `site` branch of `tdesign-vue-next-starter`

### ⚙️ Build

Expand Down
46 changes: 41 additions & 5 deletions packages/theme-generator/src/common/Themes/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,34 @@ import TencentHealthcare from "!raw-loader!./svg/TencentHealthcare";
import TencentGames from "!raw-loader!./svg/TencentGames";
import TencentSafe from "!raw-loader!./svg/TencentSafe";

// export const UPLOAD_LIMIT_EXCEEDED_MESSAGE = {
// en: "Upload limit exceeded",
// zh: "超过上传数量"
// };

export const defaultTheme = {
id: "DEFAULT",
name: "默认主题",
enName:'TDesign',
enName: 'TDesign',
subtitle: TDesignOriginal,
subtitleText:'TDesign Original',
subtitleText: 'TDesign Original',
subBgColor: '#0052D9',
value: "#0052D9",
};

/** 确保 id,title 唯一 */
export const RECOMMEND_THEMES = [
{
title: "官方推荐",
id: "OFFICIAL",
title: "officialRecommendation",
options: [
defaultTheme,
{
name: "腾讯云",
enName:'TCloud',
enName: 'TCloud',
subtitle: TencentCloud,
subtitleText:'Tencent Cloud',
subtitleText: 'Tencent Cloud',
subBgColor: '#006EFF',
value: "#006EFF",
},
// {
Expand Down Expand Up @@ -65,6 +75,18 @@ export const RECOMMEND_THEMES = [
],
},
// {
// id: "CUSTOM",
// title: "customUpload",
// options: [
// {
// name: "自定义上传",
// enName: 'Custom Upload',
// subtitle: TencentSafe,
// value: "#623BFF",
// }
// ]
// }
// {
// title: "业务推荐",
// options: [
// {
Expand All @@ -86,3 +108,17 @@ export const RECOMMEND_THEMES = [
// ],
// },
];

export const UPLOAD_THEMES = {
id: "CUSTOM",
title: "customUpload",
options: {
id: "CUSTOM",
name: "自定义上传",
enName: 'Custom Upload',
subtitle: TencentSafe,
subtitleText: 'Tencent Cloud',
subBgColor: '#623BFF',
value: "#623BFF",
}
}
Loading