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

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

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

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

@ -59,6 +59,11 @@ const props = withDefaults(
form: {}, form: {},
config: { config: {
style:'' 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) => { const groupClick = (item: any, ele?: string) => {
// //
if (type.value !== 5) { if (type.value !== 5) {
@ -172,6 +179,14 @@ const groupClick = (item: any, ele?: string) => {
if (ele) { if (ele) {
item.type = ele item.type = ele
} }
if(!item.styles){
item.styles={
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
// console.log("--->",item)
store.setActiveKey(getGroupName(item)) store.setActiveKey(getGroupName(item))
store.setControlAttr(item) store.setControlAttr(item)
// grid // grid

2
src/types/components.d.ts

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

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

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

3
src/widget/videoupload/videoUploadPlay.vue

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

Loading…
Cancel
Save