Skip to content

Commit

Permalink
fix(color-picker): format
Browse files Browse the repository at this point in the history
  • Loading branch information
superNos committed Nov 5, 2024
1 parent 894273f commit e8ada59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/color-picker/panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ export default defineComponent({
},
render() {
const {
baseClassName, statusClassNames, t, global, recentColors, swatchColors, previewColorStyle, isGradient,
baseClassName, statusClassNames, t, global, swatchColors, previewColorStyle, isGradient,
} = this;

const showUsedColors = recentColors !== null && recentColors !== false;
const showUsedColors = this.recentlyUsedColors !== null && this.recentlyUsedColors !== false;

let systemColors = swatchColors;
if (systemColors === undefined) {
Expand Down
4 changes: 2 additions & 2 deletions src/color-picker/panel/swatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export default defineComponent({
* 移除颜色
*/
const handleRemoveColor = () => {
const colors = props.colors;
const { colors } = props;
const selectedIndex = selectedColorIndex.value;
if (selectedIndex === -1) return
if (selectedIndex === -1) return;
colors.splice(selectedIndex, 1);
props.handleChange?.(colors);
setVisiblePopConfirm(false);
Expand Down

0 comments on commit e8ada59

Please sign in to comment.