diff --git a/src/components/common/common-styles/index.vue b/src/components/common/common-styles/index.vue index a9788e4a..053c1421 100644 --- a/src/components/common/common-styles/index.vue +++ b/src/components/common/common-styles/index.vue @@ -83,9 +83,9 @@ const props = defineProps({ }); // 初始化表单数据 const init_form = reactive({ - direction: '0deg', + direction: '180deg', background_img_url: [] as uploadList[], - color_list: [''], + color_list: [{ color: '', color_percentage: '' }], background_img_style: 2, padding: 0, padding_top: 0, @@ -111,7 +111,11 @@ const init_form = reactive({ // value 和初始化数据合并数据 let form = reactive(Object.assign({}, init_form, props.value)); const emit = defineEmits(['update:value']); -const mult_color_picker_event = (arry: string[], type: number) => { +interface color_form { + color: string; + color_percentage: string; +} +const mult_color_picker_event = (arry: color_form[], type: number) => { form.color_list = arry; form.direction = type.toString(); emit('update:value', form); diff --git a/src/components/common/flex-gradients-create/index.vue b/src/components/common/flex-gradients-create/index.vue index 73ac073f..43d1d026 100644 --- a/src/components/common/flex-gradients-create/index.vue +++ b/src/components/common/flex-gradients-create/index.vue @@ -12,6 +12,7 @@ const predefine_colors = ref(['#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585', 'rgba(255, 69, 0, 0.68)', 'rgb(255, 120, 0)', 'hsv(51, 100, 98)', 'hsva(120, 40, 94, 0.5)', 'hsl(181, 100%, 37%)', 'hsla(209, 100%, 56%, 0.73)', '#c7158577']); interface list_page { color: string; + color_percentage: string; } interface Props { colorList: list_page[]; @@ -25,6 +26,7 @@ const list = ref(props.colorList); // 默认值 const reset_event = (index: number) => { list.value[index].color = props.defaultColor; + list.value[index].color_percentage = ''; }; diff --git a/src/components/common/magic-cube/index.vue b/src/components/common/magic-cube/index.vue index c5d94b19..48d90098 100644 --- a/src/components/common/magic-cube/index.vue +++ b/src/components/common/magic-cube/index.vue @@ -22,7 +22,7 @@ {{ Math.round((750 / densityNum) * (item.end.x - item.start.x + 1)) }} 像素 @@ -33,6 +33,11 @@