自定义APP自定义App数据通讯
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.4 KiB

<!--
@ 作者: 秦东
@ 时间: 2025-06-10 14:20:12
@ 备注: 多行文本
-->
<script lang='ts' setup>
import {
constFormProps
} from '@/api/lowCode/utils';
const props = withDefaults(
defineProps<{
data: FormList
tablekey: any
numrun?: number
modelValue?: any // 子表和弹性布局时时有传
tProp?: string // 子表时的form-item的prop值,用于子表校验用
types?:number
control:any
}>(),
{}
)
const emits = defineEmits(['update:modelValue','pageIdAry'])
const formProps = inject(constFormProps, {}) as any
const config = computed(() => {
return props.data.config || {}
})
const type = computed(() => {
return formProps.value.type
})
const value = computed({
get: () => {
return props.modelValue
},
set: (newVal: any) => {
emits('update:modelValue', newVal)
},
});
/**
@ 作者: 秦东
@ 时间: 2025-06-10 14:25:01
@ 功能: 获取组件名称
*/
const getLabel = (val:any) => {
if(val.label){
return val.label;
}else{
return "";
}
}
</script>
<template>
<el-input
v-if="props.types!=3"
v-bind="props.control"
v-model="value"
type="textarea"
:autosize="{ minRows: 2, maxRows: 20 }"
:placeholder="data.control.placeholder?data.control.placeholder:'请输入'+getLabel(data.item)"
/>
<el-text v-else class="wordColor">{{value}}</el-text>
</template>
<style lang='scss' scoped>
.wordColor{
color:#000000;
}
</style>