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

✨ [Feature]: ColorPicker支持点击触发和选择分离 #2585

Open
STofone opened this issue Dec 2, 2024 · 8 comments
Open

✨ [Feature]: ColorPicker支持点击触发和选择分离 #2585

STofone opened this issue Dec 2, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request (功能增强)

Comments

@STofone
Copy link

STofone commented Dec 2, 2024

What problem does this feature solve

触发不改变颜色的事件也需要点开panel

What does the proposed API look like

image

What is your project name

record tool

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: ✨ [Feature]: ColorPicker supports click triggering and selection separation

@kagol
Copy link
Member

kagol commented Dec 5, 2024

@STofone 没看懂你的意思,能否描述清晰一些?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@STofone I don’t understand what you mean. Can you describe it more clearly?

@kagol kagol added the enhancement New feature or request (功能增强) label Dec 5, 2024
@STofone
Copy link
Author

STofone commented Dec 5, 2024

Bot detected the issue body's language is not English, translate it automatically.

@STofone I don’t understand what you mean. Can you describe it more clearly?

image
当前的ColorPicker,如果要不想改颜色,而是想直接应用已选中的颜色,必须要点击打开选色的界面,再点击选择,要两步。
通常的选色都是一个应用按钮加一个下拉选择的组合,自己实现也很快,但集成一下更方便

@GaoNeng-wWw
Copy link
Collaborator

您是想通过通过调用组件方法来获取颜色对吗,例如

<template>
  <color-picker ref="picker"/>
</template>
<script lang="ts" setup>
const picker = ref();
onMounted(()=>{
  console.log(picker.value.getColor()) // 返回颜色值
})
</script>

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Do you want to get the color pair by calling a component method, e.g.

<template>
  <color-picker ref="picker"/>
</template>
<script lang="ts" setup>
const picker = ref();
onMounted(()=>{
  console.log(picker.value.getColor()) // Return color value
})
</script>

@STofone
Copy link
Author

STofone commented Dec 28, 2024

您是想通过通过调用组件方法来获取颜色对吗,例如

<template>
  <color-picker ref="picker"/>
</template>
<script lang="ts" setup>
const picker = ref();
onMounted(()=>{
  console.log(picker.value.getColor()) // 返回颜色值
})
</script>

我想要有 图标应用按钮(支持slot)+点击选色下拉按钮 两者分开组合的组件

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Do you want to get the color pair by calling the component method, e.g.

<template>
<color-picker ref="picker"/>
</template>
<script lang="ts" setup>
const picker = ref();
onMounted(()=>{
console.log(picker.value.getColor()) // Return color value
})
</script>

I want to have the icon application button (supports slot) + click the color selection drop-down button to combine the two components separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request (功能增强)
Projects
None yet
Development

No branches or pull requests

4 participants