Browse Source

适配低代码组件css控制器

yjf_v3
超级管理员 2 years ago
parent
commit
0a3dfd8453
  1. 10
      src/api/DesignForm/types.ts
  2. 7
      src/components/DesignForm/layoutPage/index.vue
  3. 5
      src/components/DesignForm/public/form/form.vue
  4. 15
      src/components/DesignForm/public/form/formGroup.vue
  5. 2
      src/types/components.d.ts
  6. 35
      src/views/sysworkflow/codepage/createform.vue
  7. 3
      src/widget/videoupload/videoUploadPlay.vue

10
src/api/DesignForm/types.ts

@ -8,6 +8,11 @@ export interface FormList {
columns?: any // 布局字段
tableData?: any // 子表时
options?: Options[] // radio;checkbox;select选项
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
export interface Options {
label: string
@ -46,6 +51,11 @@ export interface FormData {
afterSubmit?: Function
change?: Function
}
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
export interface TableData {

7
src/components/DesignForm/layoutPage/index.vue

@ -54,13 +54,13 @@ const inputUnitTitle = (val:string) => {
case "rate":
unitIsShow.value = false;
break;
case "slider":
case "slider","upload","tinymce":
unitIsShow.value = false;
break;
case "treeSelect":
case "treeSelect","colorPicker","signaturemap":
unitIsShow.value = false;
break;
case "txt":
case "txt","table":
unitIsShow.value = false;
labelIsShow.value = false;
break;
@ -72,6 +72,7 @@ const inputUnitTitle = (val:string) => {
unitIsShow.value = false;
labelIsShow.value = false;
break;
default:
return "Input布局"
break;

5
src/components/DesignForm/public/form/form.vue

@ -59,6 +59,11 @@ const props = withDefaults(
form: {},
config: {
style:''
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
},

15
src/components/DesignForm/public/form/formGroup.vue

@ -164,6 +164,13 @@ const getGroupName = (item: any) => {
}
}
//
/**
* styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
*/
const groupClick = (item: any, ele?: string) => {
//
if (type.value !== 5) {
@ -172,6 +179,14 @@ const groupClick = (item: any, ele?: string) => {
if (ele) {
item.type = ele
}
if(!item.styles){
item.styles={
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
// console.log("--->",item)
store.setActiveKey(getGroupName(item))
store.setControlAttr(item)
// grid

2
src/types/components.d.ts

@ -59,7 +59,6 @@ declare module '@vue/runtime-core' {
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
@ -109,7 +108,6 @@ declare module '@vue/runtime-core' {
IEpRefresh: typeof import('~icons/ep/refresh')['default']
IEpSearch: typeof import('~icons/ep/search')['default']
IEpSetting: typeof import('~icons/ep/setting')['default']
IEpView: typeof import('~icons/ep/view')['default']
LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
LayoutPage: typeof import('./../components/DesignForm/layoutPage/index.vue')['default']
List: typeof import('./../components/DesignForm/public/form/components/list.vue')['default']

35
src/views/sysworkflow/codepage/createform.vue

@ -60,7 +60,12 @@ const submitButton = {
config:
{
textAlign: "center"
}
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}]
}
const cancelButton = {
@ -84,7 +89,12 @@ const cancelButton = {
config:
{
textAlign: "center"
}
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}]
}
const submitAndCancelButton = {
@ -108,7 +118,12 @@ const submitAndCancelButton = {
config:
{
span: 0
}
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: "button",
@ -121,7 +136,12 @@ const submitAndCancelButton = {
config:
{
span: 0
}
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}]
};
@ -168,7 +188,12 @@ const state = reactive<formStruct>({
name:'',
formName: props.formconfigcont.formName
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
editor: {},
loading: false,

3
src/widget/videoupload/videoUploadPlay.vue

@ -1,11 +1,12 @@
<template>
<!-- <p>{{ videoHeight }}</p>
<p>{{ videoWidth }}</p> -->
{{data}}
<video
:src="data?.control.videoMsg[0].url"
:loop="data?.control.videoMsg[0].loop"
:autoplay="data?.control.videoMsg[0].videoAutoPlay"
:style="{height:videoHeight,width:videoWidth}"
:style="{height:videoHeight,width:'100%'}"
controls
>
</video>

Loading…
Cancel
Save