From 5c69a83e90e9eb37fd5630766a794a54a4bfd420 Mon Sep 17 00:00:00 2001 From: luoyp <2456821174@qq.com> Date: Tue, 11 Jul 2023 09:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Einput=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/informations/inputs_input.png | Bin 0 -> 3853 bytes .../Informations/Inputs/InputsInput/config.ts | 24 +++++++ .../Inputs/InputsInput/config.vue | 18 +++++ .../Informations/Inputs/InputsInput/index.ts | 14 ++++ .../Informations/Inputs/InputsInput/index.vue | 63 ++++++++++++++++++ .../Inputs/InputsInput/interact.ts | 27 ++++++++ .../components/Informations/Inputs/index.ts | 3 +- 7 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 src/assets/images/chart/informations/inputs_input.png create mode 100644 src/packages/components/Informations/Inputs/InputsInput/config.ts create mode 100644 src/packages/components/Informations/Inputs/InputsInput/config.vue create mode 100644 src/packages/components/Informations/Inputs/InputsInput/index.ts create mode 100644 src/packages/components/Informations/Inputs/InputsInput/index.vue create mode 100644 src/packages/components/Informations/Inputs/InputsInput/interact.ts diff --git a/src/assets/images/chart/informations/inputs_input.png b/src/assets/images/chart/informations/inputs_input.png new file mode 100644 index 0000000000000000000000000000000000000000..00bc41feb00623b43c2ee1c0ff69f533466746a0 GIT binary patch literal 3853 zcmcInXEpZ4kYMLG<1th#muE+11&~69y$sN3Pv4m4HIBo z1)3*_3h0aIgCW3h$y3|Hhk}Bs<8PzP6lVeh4_SO+k9*a-e_Y>fy^q6?zK)HJt&?b%YCe7X#6O_*cBoh4bZ~HH9sI!Rc(ta6_UPCVCqhvb zex?HKE1@rx@)24bl}p(z3K;iep%G;Mk3W~MFq}lkJAAP*8{eU)BZl$ayGk~9I^M7> zxU)(1{89C{fYX@dQgDx|>$~&0-HT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nhfNMMEif$>Y- zQYNyNCQ2n2P2iMxFoxy_@fDH(03HGfyuGbD!)ILf(_~4ON3%GIuPv|11Clyeui4&9 zwh-DW!Wdq+({RZ_aJ|Yvi0yQYZmh1Z?E=EmwcAoc5?(euqMvsKybH)%?S@4_03g#9 z-OV=huTodKCidcyx$aMq{*4W7v!11XY}Sb3)wxqzl~$n-C2e-Wq~__Fk~wi`Dh69y zYSCb8_o(vohu^~?PD(P*cPVk@#|B6X#VPuB?_*|E6(C4|48X60pkYN?E??{?2Sk_> zs2|jglK{OOqd!%h>`_J_cucSMewXviudHdVJzIz$x7kpBc)pxo(z3fr+@pgkRCQ)I;*jvS(#1*@H9%bNeGGS|zsE`-m6xiX89=EKA-+_C?W zq>Jo>AkB+V?e_tIL+P?#v4$SV-;7zT!#(jiz{{9$0yTL`Im5Hi ztXl(G~$FawQBsBOf* E0K4;$=>Px# literal 0 HcmV?d00001 diff --git a/src/packages/components/Informations/Inputs/InputsInput/config.ts b/src/packages/components/Informations/Inputs/InputsInput/config.ts new file mode 100644 index 00000000..f99c35d7 --- /dev/null +++ b/src/packages/components/Informations/Inputs/InputsInput/config.ts @@ -0,0 +1,24 @@ +import cloneDeep from 'lodash/cloneDeep' +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { chartInitConfig } from '@/settings/designSetting' +import { COMPONENT_INTERACT_EVENT_KET } from '@/enums/eventEnum' +import { interactActions, ComponentInteractEventEnum } from './interact' +import {InputsInputConfig} from "./index"; + +export const option = { + // 时间组件展示类型,必须和 interactActions 中定义的数据一致 + [COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATA, + // 默认值 + inputValue: "0", + // 暴露配置内容给用户 + dataset: "" +} + +export default class Config extends PublicConfigClass implements CreateComponentType { + public key = InputsInputConfig.key + public attr = { ...chartInitConfig, w: 260, h: 32, zIndex: -1 } + public chartConfig = cloneDeep(InputsInputConfig) + public interactActions = interactActions + public option = cloneDeep(option) +} \ No newline at end of file diff --git a/src/packages/components/Informations/Inputs/InputsInput/config.vue b/src/packages/components/Informations/Inputs/InputsInput/config.vue new file mode 100644 index 00000000..1c7900ee --- /dev/null +++ b/src/packages/components/Informations/Inputs/InputsInput/config.vue @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/src/packages/components/Informations/Inputs/InputsInput/index.ts b/src/packages/components/Informations/Inputs/InputsInput/index.ts new file mode 100644 index 00000000..ac3ab47e --- /dev/null +++ b/src/packages/components/Informations/Inputs/InputsInput/index.ts @@ -0,0 +1,14 @@ +import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d' +import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' + +export const InputsInputConfig: ConfigType = { + key: 'InputsInput', + chartKey: 'VInputsInput', + conKey: 'VCInputsInput', + title: '输入框', + category: ChatCategoryEnum.INPUTS, + categoryName: ChatCategoryEnumName.INPUTS, + package: PackagesCategoryEnum.INFORMATIONS, + chartFrame: ChartFrameEnum.STATIC, + image: 'inputs_input.png' +} \ No newline at end of file diff --git a/src/packages/components/Informations/Inputs/InputsInput/index.vue b/src/packages/components/Informations/Inputs/InputsInput/index.vue new file mode 100644 index 00000000..ec2dbd76 --- /dev/null +++ b/src/packages/components/Informations/Inputs/InputsInput/index.vue @@ -0,0 +1,63 @@ + + + + + + + + diff --git a/src/packages/components/Informations/Inputs/InputsInput/interact.ts b/src/packages/components/Informations/Inputs/InputsInput/interact.ts new file mode 100644 index 00000000..d6c070f4 --- /dev/null +++ b/src/packages/components/Informations/Inputs/InputsInput/interact.ts @@ -0,0 +1,27 @@ +import { InteractEventOn, InteractActionsType } from '@/enums/eventEnum' + +// 时间组件类型 +export enum ComponentInteractEventEnum { + DATA = 'data' +} + +// 联动参数 +export enum ComponentInteractParamsEnum { + DATA = 'data' +} + +// 定义组件触发回调事件 +export const interactActions: InteractActionsType[] = [ + { + interactType: InteractEventOn.CHANGE, + interactName: '选择完成', + componentEmitEvents: { + [ComponentInteractEventEnum.DATA]: [ + { + value: ComponentInteractParamsEnum.DATA, + label: '选择项' + } + ] + } + } +] diff --git a/src/packages/components/Informations/Inputs/index.ts b/src/packages/components/Informations/Inputs/index.ts index 1f4f22a7..ad5ceca6 100644 --- a/src/packages/components/Informations/Inputs/index.ts +++ b/src/packages/components/Informations/Inputs/index.ts @@ -1,5 +1,6 @@ import { InputsDateConfig } from './InputsDate/index' import { InputsSelectConfig } from './InputsSelect/index' import { InputsTabConfig } from './InputsTab/index' +import {InputsInputConfig} from './InputsInput/index' -export default [InputsDateConfig, InputsSelectConfig, InputsTabConfig] +export default [InputsDateConfig, InputsSelectConfig, InputsTabConfig,InputsInputConfig]