From f364e6dded8bd106f32caa47ee29492a45e18878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=87=82=E4=B8=8D=E8=83=BD=E6=87=82?= <295047320@qq.com> Date: Thu, 17 Nov 2022 11:50:28 +0000 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9=E5=92=8C=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 懂不能懂 <295047320@qq.com> --- web/src/components/baInput/index.ts | 1 + web/src/components/baInput/index.vue | 11 +++++++++++ web/src/components/formItem/index.vue | 1 + web/src/components/table/fieldRender/index.vue | 9 ++++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/web/src/components/baInput/index.ts b/web/src/components/baInput/index.ts index d27e7d3e..ed9c6add 100644 --- a/web/src/components/baInput/index.ts +++ b/web/src/components/baInput/index.ts @@ -24,6 +24,7 @@ export const inputTypes = [ 'file', 'files', 'icon', + 'color' ] export type modelValueTypes = string | number | boolean | object diff --git a/web/src/components/baInput/index.vue b/web/src/components/baInput/index.vue index 95016724..eaa51db1 100644 --- a/web/src/components/baInput/index.vue +++ b/web/src/components/baInput/index.vue @@ -375,6 +375,17 @@ export default defineComponent({ }) }, ], + [ + 'color', + () => { + return () => + createVNode(resolveComponent('el-color-picker'), { + modelValue: props.modelValue, + 'onUpdate:modelValue': onValueUpdate, + ...props.attr, + }) + }, + ], [ 'editor', () => { diff --git a/web/src/components/formItem/index.vue b/web/src/components/formItem/index.vue index 40023334..7dd45db2 100644 --- a/web/src/components/formItem/index.vue +++ b/web/src/components/formItem/index.vue @@ -96,6 +96,7 @@ export default defineComponent({ 'remoteSelect', 'city', 'icon', + 'color' ] // 不带独立label输入框 let needLabelSlot = ['radio', 'checkbox', 'switch', 'array', 'image', 'images', 'file', 'files', 'editor'] // 需要独立label的输入框 if (noNeedLabelSlot.includes(props.type)) { diff --git a/web/src/components/table/fieldRender/index.vue b/web/src/components/table/fieldRender/index.vue index c654359c..d70ae086 100644 --- a/web/src/components/table/fieldRender/index.vue +++ b/web/src/components/table/fieldRender/index.vue @@ -90,7 +90,10 @@
{{ !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined) }}
- + +
+
+
{ .ml-6 + .el-button { margin-left: 6px; } +.el-color{ + height:25px; + width:100% +}