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/ColorInput/index.vue | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/src/components/ColorInput/index.vue b/src/components/ColorInput/index.vue
new file mode 100644
index 0000000..63ff73c
--- /dev/null
+++ b/src/components/ColorInput/index.vue
@@ -0,0 +1,34 @@
+<template>
+ <el-input v-model="color">
+ <template #prepend>
+ <el-color-picker v-model="color" :predefine="PREDEFINE_COLORS" />
+ </template>
+ </el-input>
+</template>
+
+<script setup lang="ts">
+import { propTypes } from '@/utils/propTypes'
+import { PREDEFINE_COLORS } from '@/utils/color'
+
+// 棰滆壊杈撳叆妗�
+defineOptions({ name: 'ColorInput' })
+
+const props = defineProps({
+ modelValue: propTypes.string.def('')
+})
+const emit = defineEmits(['update:modelValue'])
+const color = computed({
+ get: () => {
+ return props.modelValue
+ },
+ set: (val: string) => {
+ emit('update:modelValue', val)
+ }
+})
+</script>
+
+<style scoped lang="scss">
+:deep(.el-input-group__prepend) {
+ padding: 0;
+}
+</style>
--
Gitblit v1.8.0