Skip to content

Commit e37c94f

Browse files
committed
chore: organize dictionaries and update import
1 parent dd9a3a6 commit e37c94f

File tree

51 files changed

+108
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+108
-135
lines changed
Lines changed: 9 additions & 11 deletions

packages/theme-generator/README.md

Lines changed: 11 additions & 12 deletions

packages/theme-generator/src/Generator.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="theme-generator">
2+
<div id="theme-generator">
33
<dock
44
:drawerVisible="visible"
55
:showSetting="showSetting"
@@ -11,13 +11,11 @@
1111
</template>
1212

1313
<script>
14-
import { applyTokenFromLocal, initThemeStyleSheet, syncThemeToIframe } from './common/Themes';
15-
import { themeStore } from './common/Themes/store';
16-
14+
import { applyTokenFromLocal, initThemeStyleSheet, syncThemeToIframe, themeStore } from './common/themes';
1715
import { initGeneratorVars } from './common/utils';
1816
19-
import Dock from './dock/index.vue';
20-
import PanelDrawer from './panel-drawer/index.vue';
17+
import Dock from './dock';
18+
import PanelDrawer from './panel-drawer';
2119
2220
const activeTabMap = {
2321
color: 0,
@@ -87,7 +85,7 @@ export default {
8785
@import './styles/tdesign.min.css';
8886
8987
@media screen and (max-width: 960px) {
90-
.theme-generator {
88+
#theme-generator {
9189
display: none;
9290
}
9391
}

packages/theme-generator/src/color-panel/components/ColorColumn/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ import { Popup as TPopup } from 'tdesign-vue';
8686
8787
import ColorPicker from '../../../common/ColorPicker/index.vue';
8888
import langMixin from '../../../common/i18n/mixin';
89-
import { CUSTOM_TOKEN_ID } from '../../../common/Themes';
89+
import { CUSTOM_TOKEN_ID } from '../../../common/themes';
9090
import { getTokenValue, handleAttach } from '../../../common/utils';
9191
9292
export default {
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ import {
327327
Tooltip as TTooltip,
328328
} from 'tdesign-vue';
329329
330-
import ColorPicker from '../../../common/ColorPicker/index.vue';
331-
import langMixin from '../../../common/i18n/mixin';
330+
import ColorPicker from '../common/ColorPicker/index.vue';
331+
import langMixin from '../common/i18n/mixin';
332332
import {
333333
covert2Hex,
334334
generateBrandPalette,
@@ -337,25 +337,26 @@ import {
337337
getOptionFromLocal,
338338
modifyToken,
339339
syncColorTokensToStyle,
340+
themeStore,
340341
updateLocalOption,
341342
updateStyleSheetColor,
342-
} from '../../../common/Themes';
343-
import { themeStore } from '../../../common/Themes/store';
344-
import { getThemeMode, getTokenValue, handleAttach, setUpThemeObserver } from '../../../common/utils';
345-
import { colorAnimation } from '../../../common/utils/animation';
343+
} from '../common/themes';
344+
import { getThemeMode, getTokenValue, handleAttach, setUpThemeObserver } from '../common/utils';
345+
import { colorAnimation } from '../common/utils/animation';
346346
import {
347347
BRAND_TOKEN_MAP,
348348
DEFAULT_COLORS,
349349
DEFAULT_FUNCTION_COLORS,
350350
FUNCTION_TOKEN_MAPS,
351351
RECOMMEND_COLORS,
352352
SCENE_COLORS,
353-
} from '../../utils/const';
353+
} from './utils/const';
354+
355+
import ColorCollapse from './components/ColorCollapse';
356+
import ColorColumn from './components/ColorColumn';
354357
355-
import ColorColumn from '../ColorColumn/index.vue';
356-
import ColorCollapse from './ColorCollapse.vue';
357358
export default {
358-
name: 'ColorContent',
359+
name: 'ColorPanel',
359360
props: {
360361
top: Number,
361362
},

packages/theme-generator/src/color-panel/utils/const.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export const FUNCTION_TOKEN_MAPS = {
193193

194194
/* ============================== */
195195

196-
export const FONT_TOKEN_MAP = [
196+
export const FONT_COLOR_TOKEN_MAP = [
197197
{ name: '--td-text-color-primary', from: '--td-font-gray-1' },
198198
{ name: '--td-text-color-secondary', from: '--td-font-gray-2' },
199199
{ name: '--td-text-color-placeholder', from: '--td-font-gray-3' },

packages/theme-generator/src/common/StickyThemeDisplay/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</template>
1111
<script>
1212
import langMixin from '../i18n/mixin';
13-
import { themeStore } from '../Themes/store';
13+
import { themeStore } from '../themes/store';
1414
import { getTokenValue } from '../utils';
1515
1616
export default {

packages/theme-generator/src/common/SwitchTabs/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import RadiusSvg from './RadiusSvg.vue';
2929
import SizeSvg from './SizeSvg.vue';
3030
3131
import langMixin from '../i18n/mixin';
32-
import { isMobile } from '../Themes';
32+
import { isMobile } from '../themes';
3333
export default {
3434
name: 'SwitchTabs',
3535
props: {

0 commit comments

Comments
 (0)