From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/components/InputWithColor/index.vue |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/src/components/InputWithColor/index.vue b/src/components/InputWithColor/index.vue
new file mode 100644
index 0000000..1311a55
--- /dev/null
+++ b/src/components/InputWithColor/index.vue
@@ -0,0 +1,35 @@
+<template>
+  <el-input v-model="modelValue" v-bind="$attrs">
+    <template #append>
+      <el-color-picker v-model="color" :predefine="PREDEFINE_COLORS" />
+    </template>
+  </el-input>
+</template>
+
+<script lang="ts" setup>
+import { propTypes } from '@/utils/propTypes'
+import { PREDEFINE_COLORS } from '@/utils/color'
+import { useVModels } from '@vueuse/core'
+
+/**
+ * 甯﹂鑹查�夋嫨鍣ㄨ緭鍏ユ
+ */
+defineOptions({ name: 'InputWithColor' })
+
+const props = defineProps({
+  modelValue: propTypes.string.def('').isRequired,
+  color: propTypes.string.def('').isRequired
+})
+const emit = defineEmits(['update:modelValue', 'update:color'])
+const { modelValue, color } = useVModels(props, emit)
+</script>
+<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>

--
Gitblit v1.8.0