(null);
-const { isSupported, open, sRGBHex } = useEyeDropper()
+const { isSupported, open, sRGBHex } = useEyeDropper();
let pointStyle = ref("top: 25%;left: 80%;");
let hueSliderStyle = ref("left: 0;");
@@ -42,13 +42,13 @@ let green = ref(0);
let blue = ref(0);
let alpha = ref(1);
-const openEyeDropper = function(){
- if(isSupported){
+const openEyeDropper = function () {
+ if (isSupported) {
open();
- }else{
+ } else {
console.warn("LayColorPicker: Eye dropper not supported by your browser!");
}
-}
+};
onMounted(() => {
let { r, g, b, a } = parseColor(props.modelValue);
@@ -64,7 +64,7 @@ watch(sRGBHex, (sRGBHex) => {
green.value = g;
blue.value = b;
alpha.value = a;
-})
+});
watch([red, green, blue], (newValue) => {
emit(
@@ -450,10 +450,11 @@ function hex2rgba(s: any) {
>
-
+ @click="openEyeDropper"
+ style="margin-left: 5px"
+ >
diff --git a/package/component/src/component/scroll/index.vue b/package/component/src/component/scroll/index.vue
index dc51e75a..f322db4b 100644
--- a/package/component/src/component/scroll/index.vue
+++ b/package/component/src/component/scroll/index.vue
@@ -24,7 +24,8 @@
height: data.barHeight + 'px',
width: scrollWidth + 'px',
transform: 'translateY(' + data.translateY + 'px)',
- backgroundColor: data.heightPre == 1 ? 'rgba(0,0,0,0)' : scrollColor,
+ backgroundColor:
+ data.heightPre == 1 ? 'rgba(0,0,0,0)' : scrollColor,
}"
class="layui-scroll-thumb"
@mousedown.stop.prevent="moveStart"
@@ -36,8 +37,8 @@
+