|
|
|
@ -11,6 +11,7 @@ import { |
|
|
|
import validate from '@/api/DesignForm/validate' |
|
|
|
import { FormItem, FormList } from '@/api/DesignForm/types' |
|
|
|
import Tooltips from '@/components/DesignForm/tooltip.vue' |
|
|
|
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo' |
|
|
|
const props = withDefaults( |
|
|
|
defineProps<{ |
|
|
|
data: FormList |
|
|
|
@ -156,6 +157,17 @@ const openUrl = () => { |
|
|
|
onMounted(() => { |
|
|
|
// console.log("编码组件-url--》",props.data) |
|
|
|
}) |
|
|
|
|
|
|
|
const getFormItemLableStyle = (ele: any) => { |
|
|
|
if(ele?.labelStyle){ |
|
|
|
// console.log("返回栅格宽度3",AnalysisCss(ele?.labelStyle)) |
|
|
|
return AnalysisCss(ele?.labelStyle) |
|
|
|
} |
|
|
|
} |
|
|
|
//组件css部分 |
|
|
|
const configStyle = computed(() => { |
|
|
|
return props.data.styles || {} |
|
|
|
}) |
|
|
|
</script> |
|
|
|
<template> |
|
|
|
<el-form-item |
|
|
|
@ -166,11 +178,18 @@ onMounted(() => { |
|
|
|
:label="getLabel(data.item as FormItem)" |
|
|
|
> |
|
|
|
<template v-if="config.help" #label > |
|
|
|
{{ getLabel(data.item) }} |
|
|
|
<span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span> |
|
|
|
|
|
|
|
<Tooltips :content="config.help" /> |
|
|
|
</template> |
|
|
|
<div v-if="type === 4" class="form-value" v-html="value"></div> |
|
|
|
<template v-else> |
|
|
|
<template v-else #label> |
|
|
|
<span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
<!-- <div v-if="type === 4" class="form-value" v-html="value"></div> --> |
|
|
|
|
|
|
|
<div > |
|
|
|
|
|
|
|
<el-input v-model="value"> |
|
|
|
<template #prepend> |
|
|
|
<el-select v-model="urlVal" style="width: 115px"> |
|
|
|
@ -180,8 +199,12 @@ onMounted(() => { |
|
|
|
</template> |
|
|
|
<template #append><el-button type="warning" @click="openUrl">访问</el-button></template> |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</template> |
|
|
|
<style lang='scss' scoped> |
|
|
|
|
|
|
|
|