feat:【ele】【mall】将 input-with-colour 迁移到 mall/promotion/components 中,聚焦一点
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
ElTooltip,
|
||||
} from 'element-plus';
|
||||
|
||||
import ColorInput from '#/components/input-with-color/index.vue';
|
||||
import { InputWithColor as ColorInput } from '#/views/mall/promotion/components';
|
||||
|
||||
// 导航栏属性面板
|
||||
defineOptions({ name: 'DividerProperty' });
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
import { AppLinkInput } from '#/views/mall/promotion/components';
|
||||
import Draggable from '#/components/draggable/index.vue';
|
||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||
import { InputWithColor } from '#/views/mall/promotion/components';
|
||||
import UploadImg from '#/components/upload/image-upload.vue';
|
||||
|
||||
// 悬浮按钮属性面板
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ElForm, ElFormItem, ElText } from 'element-plus';
|
||||
import { AppLinkInput } from '#/views/mall/promotion/components';
|
||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||
import Draggable from '#/components/draggable/index.vue';
|
||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||
import { InputWithColor } from '#/views/mall/promotion/components';
|
||||
import UploadImg from '#/components/upload/image-upload.vue';
|
||||
|
||||
import { EMPTY_MENU_LIST_ITEM_PROPERTY } from './config';
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import { AppLinkInput, ColorInput } from '#/views/mall/promotion/components';
|
||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||
import Draggable from '#/components/draggable/index.vue';
|
||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||
import { InputWithColor } from '#/views/mall/promotion/components';
|
||||
import UploadImg from '#/components/upload/image-upload.vue';
|
||||
|
||||
import { EMPTY_MENU_SWIPER_ITEM_PROPERTY } from './config';
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
} from 'element-plus';
|
||||
|
||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||
import ColorInput from '#/components/input-with-color/index.vue';
|
||||
import { InputWithColor as ColorInput } from '#/views/mall/promotion/components';
|
||||
import UploadImg from '#/components/upload/image-upload.vue';
|
||||
// TODO: 添加组件
|
||||
// import SpuShowcase from '#/views/mall/product/spu/components/spu-showcase.vue';
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
|
||||
import { AppLinkInput } from '#/views/mall/promotion/components';
|
||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||
import { InputWithColor } from '#/views/mall/promotion/components';
|
||||
import UploadImg from '#/components/upload/image-upload.vue';
|
||||
|
||||
// 导航栏属性面板
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { PREDEFINE_COLORS } from '@vben/constants';
|
||||
|
||||
// TODO @芋艿:后续合并到 diy-editor 里,并不是通用的;
|
||||
import { useVModels } from '@vueuse/core';
|
||||
import { ElColorPicker, ElInput } from 'element-plus';
|
||||
|
||||
/**
|
||||
* 带颜色选择器输入框
|
||||
*/
|
||||
defineOptions({ name: 'InputWithColor' });
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['update:modelValue', 'update:color']);
|
||||
const { modelValue, color } = useVModels(props, emit);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElInput v-model="modelValue" v-bind="$attrs">
|
||||
<template #append>
|
||||
<ElColorPicker v-model="color" :predefine="PREDEFINE_COLORS" />
|
||||
</template>
|
||||
</ElInput>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-input-group__append) {
|
||||
padding: 0;
|
||||
|
||||
.el-color-picker__trigger {
|
||||
padding: 0;
|
||||
border-left: none;
|
||||
border-radius: 0 var(--el-input-border-radius) var(--el-input-border-radius)
|
||||
0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user