Skip to content

Commit 2e62d7c

Browse files
uyarnliweijie0812github-actions[bot]
authored
chore: release 1.10.7-naruto (#3426)
* fix(colorPicker): fix colorMode i18n (#3403) * fix(colorPicker): fix colorMode i18n * feat: use common constants * chore: update common * chore: update common * chore: update common --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Uyarn <[email protected]> * fix(table): resolve props.filterIcon not work (#3422) * fix(table): resolve props.filterIcon not work * chore: fix * fix(Dialog): fix dialog props duplicate (#3423) * fix(Dialog): fix dialog props duplicate * fix(Dialog): fix dialog props duplicate * chore: release 1.10.7 (#3425) * chore: release 1.10.7 * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: release 1.10.7-naruto --------- Co-authored-by: liweijie0812 <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 276418b commit 2e62d7c

File tree

13 files changed

+94
-37
lines changed

13 files changed

+94
-37
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ toc: false
55
docClass: timeline
66
---
77

8+
## 🌈 1.10.7 `2024-12-16`
9+
### 🐞 Bug Fixes
10+
- `ColorPicker`: 修复颜色选择器的国际化配置问题 @liweijie0812 ([#3403](https://github.com/Tencent/tdesign-vue/pull/3403))
11+
- `Dialog`: 修复`1.10.6`版本中`Dialog`组件 `props` 重复导致的异常问题 @uyarn ([#3423](https://github.com/Tencent/tdesign-vue/pull/3423))
12+
- `Table`: 修复 `filterIcon` 不生效的问题 @liweijie0812 ([#3422](https://github.com/Tencent/tdesign-vue/pull/3422))
13+
14+
15+
16+
817
## 🌈 1.10.6 `2024-12-05`
918

1019
### 🚀 Features

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tdesign-vue",
33
"purename": "tdesign",
4-
"version": "1.10.6-naruto",
4+
"version": "1.10.7-naruto",
55
"description": "tdesign-vue",
66
"title": "tdesign-vue",
77
"keywords": [

src/color-picker/const.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/color-picker/panel/format/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import upperCase from 'lodash/upperCase';
55
import { TdColorHandler } from '../../../color-picker/interfaces';
66
import { TdColorPickerProps } from '../../type';
77
import props from '../../props';
8-
import { FORMATS } from '../../const';
8+
import { FORMATS } from '../../../_common/js/color-picker/constants';
99
import { Color } from '../../utils';
1010
import { Select as TSelect, Option as TOption } from '../../../select';
1111
import { Input as TInput } from '../../../input';
@@ -60,7 +60,6 @@ export default defineComponent({
6060
};
6161
},
6262
render(h) {
63-
const formats: TdColorPickerProps['format'][] = [...FORMATS];
6463
const { baseClassName, handleModeChange } = this;
6564
const newProps = {
6665
...this.$props,
@@ -84,7 +83,7 @@ export default defineComponent({
8483
onChange={handleModeChange}
8584
disabled={this.disabled}
8685
>
87-
{formats.map((item) => (
86+
{FORMATS.map((item) => (
8887
<t-option key={item} value={item} label={upperCase(item)} style={{ fontSize: '12px' }} />
8988
))}
9089
</t-select>

src/color-picker/panel/header.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import {
22
defineComponent, PropType, ref, watch,
33
} from 'vue';
44
import props from '../props';
5-
import { COLOR_MODES } from '../const';
5+
import { COLOR_MODES } from '../../_common/js/color-picker/constants';
66
import { RadioGroup as TRadioGroup, RadioButton as TRadioButton } from '../../radio';
77
import { TdColorHandler, TdColorModes } from '../interfaces';
88
import { useBaseClassName } from '../hooks';
9+
import { useConfig } from '../../hooks';
910

1011
export default defineComponent({
1112
name: 'PanelHeader',
@@ -28,6 +29,7 @@ export default defineComponent({
2829
},
2930
},
3031
setup(props) {
32+
const { globalConfig } = useConfig('colorPicker');
3133
const baseClassName = useBaseClassName();
3234
const modeValue = ref(props.mode);
3335
watch(
@@ -37,8 +39,10 @@ export default defineComponent({
3739
},
3840
);
3941
return {
42+
globalConfig,
4043
baseClassName,
4144
modeValue,
45+
COLOR_MODES,
4246
};
4347
},
4448
render() {
@@ -49,23 +53,19 @@ export default defineComponent({
4953
return (
5054
<div class={`${baseClassName}__head`}>
5155
<div class={`${baseClassName}__mode`}>
52-
{this.colorModes?.length === 1 ? (
53-
COLOR_MODES[this.colorModes[0]]
54-
) : (
55-
<TRadioGroup
56-
variant="default-filled"
57-
size="small"
58-
disabled={this.disabled}
59-
v-model={this.modeValue}
60-
onChange={this.handleModeChange}
61-
>
62-
{Object.keys(COLOR_MODES).map((key) => (
63-
<TRadioButton key={key} value={key}>
64-
{COLOR_MODES[key]}
65-
</TRadioButton>
66-
))}
67-
</TRadioGroup>
68-
)}
56+
<TRadioGroup
57+
variant="default-filled"
58+
size="small"
59+
disabled={this.disabled}
60+
v-model={this.modeValue}
61+
onChange={this.handleModeChange}
62+
>
63+
{this.colorModes.map((key) => (
64+
<TRadioButton key={key} value={key}>
65+
{Reflect.get(this.globalConfig, COLOR_MODES[key as keyof typeof COLOR_MODES])}
66+
</TRadioButton>
67+
))}
68+
</TRadioGroup>
6969
</div>
7070
</div>
7171
);

src/color-picker/panel/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
DEFAULT_LINEAR_GRADIENT,
1010
TD_COLOR_USED_COLORS_MAX_SIZE,
1111
DEFAULT_SYSTEM_SWATCH_COLORS,
12-
} from '../const';
12+
} from '../../_common/js/color-picker/constants';
1313
import PanelHeader from './header';
1414
import LinearGradient from './linear-gradient';
1515
import SaturationPanel from './saturation';

src/color-picker/panel/linear-gradient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
computed, defineComponent, onBeforeUnmount, onMounted, reactive, ref, watch,
33
} from 'vue';
44
import cloneDeep from 'lodash/cloneDeep';
5-
import { GRADIENT_SLIDER_DEFAULT_WIDTH } from '../const';
5+
import { GRADIENT_SLIDER_DEFAULT_WIDTH } from '../../_common/js/color-picker/constants';
66
import { genGradientPoint, gradientColors2string, GradientColorPoint } from '../utils';
77
import { InputNumber as TInputNumber } from '../../input-number';
88
import { useBaseClassName } from '../hooks';

src/color-picker/panel/saturation.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import {
22
computed, defineComponent, nextTick, onBeforeUnmount, onMounted, reactive, ref,
33
} from 'vue';
4-
import { SATURATION_PANEL_DEFAULT_HEIGHT, SATURATION_PANEL_DEFAULT_WIDTH } from '../const';
4+
import {
5+
SATURATION_PANEL_DEFAULT_HEIGHT,
6+
SATURATION_PANEL_DEFAULT_WIDTH,
7+
} from '../../_common/js/color-picker/constants';
58
import { Select as TSelect, Option as TOption } from '../../select';
69
import { Draggable, Coordinate } from '../utils';
710
import { useBaseClassName } from '../hooks';

src/color-picker/panel/slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
computed, defineComponent, onBeforeUnmount, onMounted, PropType, reactive, ref,
33
} from 'vue';
4-
import { SLIDER_DEFAULT_WIDTH } from '../const';
4+
import { SLIDER_DEFAULT_WIDTH } from '../../_common/js/color-picker/constants';
55
import { Select as TSelect, Option as TOption } from '../../select';
66
import { Draggable, Coordinate } from '../utils';
77
import { useBaseClassName } from '../hooks';

0 commit comments

Comments
 (0)