diff --git a/package/component/src/component/cascader/index.vue b/package/component/src/component/cascader/index.vue index 8227c56b..aad1575d 100644 --- a/package/component/src/component/cascader/index.vue +++ b/package/component/src/component/cascader/index.vue @@ -8,19 +8,21 @@ :trigger="trigger" :autoFitMinWidth="false" :updateAtScroll="true" + :contentClass="contentClass" + :contentStyle="contentStyle" :disabled="dropDownDisabled" @show="openState = true" @hide="openState = false" > @@ -73,7 +75,7 @@ import "./index.less"; import LayInput from "../input/index.vue"; import LayScroll from "../scroll/index.vue"; import LayDropdown from "../dropdown/index.vue"; -import { ref, onMounted, watch, useSlots } from "vue"; +import { ref, onMounted, watch, useSlots, StyleValue } from "vue"; import { CascaderSize } from "./interface"; export type DropdownTrigger = "click" | "hover" | "focus" | "contextMenu"; @@ -88,6 +90,8 @@ export interface CascaderProps { allowClear?: boolean; size?: CascaderSize; trigger?: DropdownTrigger | DropdownTrigger[]; + contentClass?: string | Array | object; + contentStyle?: StyleValue; } const props = withDefaults(defineProps(), { @@ -107,6 +111,7 @@ const props = withDefaults(defineProps(), { }; }, }); + const emit = defineEmits(["update:modelValue", "change", "clear"]); onMounted(() => { diff --git a/package/component/src/component/colorPicker/index.vue b/package/component/src/component/colorPicker/index.vue index 7de6e39b..df528fa8 100644 --- a/package/component/src/component/colorPicker/index.vue +++ b/package/component/src/component/colorPicker/index.vue @@ -8,13 +8,16 @@ export default { import "./index.less"; import LayDropdown from "../dropdown/index.vue"; import EyeDropper from "./EyeDropper.vue"; -import { ref, computed, watch, onMounted } from "vue"; +import { ref, computed, watch, onMounted, StyleValue } from "vue"; import { useEyeDropper } from "@vueuse/core"; export interface ColorPicker { modelValue?: any; preset?: any; + disabled?: boolean; eyeDropper?: boolean; + contentClass?: string | Array | object; + contentStyle?: StyleValue; } const emit = defineEmits(["update:modelValue"]); @@ -22,6 +25,7 @@ const emit = defineEmits(["update:modelValue"]); const props = withDefaults(defineProps(), { modelValue: { r: 255, g: 255, b: 255, a: 1 }, preset: ["#009688", "#1e9fff", "#ffb800", "#ff5722", "#5fb878"], + disabled: false }); const saturationValue = ref(null); @@ -401,7 +405,11 @@ function hex2rgba(s: any) {