-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(color-picker): component optimization v2 (#5148)
* refactor(color-picker): components * refactor(color-picker): format switch render to setup return * refactor(color-picker): inputs switch render to setup return * refactor(color-picker): alpha switch render to setup return * refactor(color-picker): hue switch render to setup return * refactor(color-picker): panel switch render to setup return * refactor(color-picker): linear-gradient switch render to setup return * refactor(color-picker): saturation switch render to setup return * refactor(color-picker): slider switch render to setup return * refactor(color-picker): swatches switch render to setup return * fix(color-picker): panel style path * fix(color-picker): trigger vmodel value.value
- Loading branch information
1 parent
4ceaf0a
commit a0ce2c4
Showing
28 changed files
with
479 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mponents/color-picker/panel/base-props.ts → ...lor-picker/components/panel/base-props.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
.../components/color-picker/panel/header.tsx → .../color-picker/components/panel/header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { defineComponent } from 'vue'; | ||
import ColorSlider from './slider'; | ||
import { useBaseClassName } from '../../hooks'; | ||
import baseProps from './base-props'; | ||
|
||
export default defineComponent({ | ||
name: 'HueSlider', | ||
|
||
inheritAttrs: false, | ||
props: baseProps, | ||
setup(props) { | ||
const baseClassName = useBaseClassName(); | ||
|
||
return () => { | ||
return ( | ||
<ColorSlider | ||
class={`${baseClassName.value}__hue`} | ||
color={props.color} | ||
value={props.color.hue} | ||
onChange={props.onChange} | ||
disabled={props.disabled} | ||
type="hue" | ||
/> | ||
); | ||
}; | ||
}, | ||
}); |
Oops, something went wrong.