Browse Source

链接缩进异常修复,链接电脑端查看详情时无法访问bug修复

lwx_v27
liwenxuan 2 months ago
parent
commit
f501ab1969
  1. 5
      src/components/DesignForm/assembly/index.ts
  2. 4
      src/components/DesignForm/public/form/formItem.vue
  3. 27
      src/widget/number/index.vue
  4. 31
      src/widget/urllink/index.vue

5
src/components/DesignForm/assembly/index.ts

@ -1027,10 +1027,7 @@ export default [
}, },
styles: { styles: {
divStyle: { divStyle: {
marginBot: "15", marginBot: "15"
divbox: "all",
transparency: 100,
paddingLeft: "7"
}, },
labelStyle: { labelStyle: {
paddingLeft: "7", paddingLeft: "7",

4
src/components/DesignForm/public/form/formItem.vue

@ -1059,7 +1059,7 @@ const diGuiJilian = (val: any, options: any[]) => {
:tablekey="props.tablekey" :tablekey="props.tablekey"
:numrun="props.numrun" :numrun="props.numrun"
/> />
<!-- 编码 -->
<SerialNumber <SerialNumber
v-else-if="judgeIsShow(data.name) && data.type === 'serialNumber'" v-else-if="judgeIsShow(data.name) && data.type === 'serialNumber'"
:data="data" :data="data"
@ -1118,7 +1118,7 @@ const diGuiJilian = (val: any, options: any[]) => {
/> />
<UrlLink <UrlLink
v-else-if="judgeIsShow(data.name) && data.type === 'urllink' && type != 4" v-else-if="judgeIsShow(data.name) && data.type === 'urllink'"
:data="data" :data="data"
/> />

27
src/widget/number/index.vue

@ -10,6 +10,7 @@ import {
constGetControlByName, constGetControlByName,
} from "@/api/DesignForm/utils"; } from "@/api/DesignForm/utils";
import validate from "@/api/DesignForm/validate"; import validate from "@/api/DesignForm/validate";
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo'
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { FormItem, FormList } from "@/api/DesignForm/types"; import { FormItem, FormList } from "@/api/DesignForm/types";
import { gainNumber } from "@/api/DesignForm/requestapi"; import { gainNumber } from "@/api/DesignForm/requestapi";
@ -186,6 +187,17 @@ const formatCustomRules = () => {
}); });
return temp; return temp;
}; };
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> </script>
<template> <template>
<el-form-item <el-form-item
@ -196,15 +208,20 @@ const formatCustomRules = () => {
:label="getLabel(data.item as FormItem)" :label="getLabel(data.item as FormItem)"
> >
<template v-if="config.help" #label> <template v-if="config.help" #label>
{{ getLabel(data.item) }} <span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span>
<!-- {{ getLabel(data.item) }} -->
<Tooltips :content="config.help" /> <Tooltips :content="config.help" />
</template> </template>
<div v-if="type === 4" class="form-value" v-html="value"></div>
<template v-else> <template v-else #label>
<el-input v-model="value" :disabled="editDisabled" placeholder="请输入编码" clearable > <span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span>
</template>
<div v-if="type === 4" class="form-value" v-html="value" />
<el-input v-else v-model="value" :disabled="editDisabled" placeholder="请输入编码" clearable >
<template #prefix>NO.</template> <template #prefix>NO.</template>
</el-input> </el-input>
</template>
</el-form-item> </el-form-item>
</template> </template>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

31
src/widget/urllink/index.vue

@ -11,6 +11,7 @@ import {
import validate from '@/api/DesignForm/validate' import validate from '@/api/DesignForm/validate'
import { FormItem, FormList } from '@/api/DesignForm/types' import { FormItem, FormList } from '@/api/DesignForm/types'
import Tooltips from '@/components/DesignForm/tooltip.vue' import Tooltips from '@/components/DesignForm/tooltip.vue'
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
data: FormList data: FormList
@ -156,6 +157,17 @@ const openUrl = () => {
onMounted(() => { onMounted(() => {
// console.log("-url--",props.data) // 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> </script>
<template> <template>
<el-form-item <el-form-item
@ -166,11 +178,18 @@ onMounted(() => {
:label="getLabel(data.item as FormItem)" :label="getLabel(data.item as FormItem)"
> >
<template v-if="config.help" #label > <template v-if="config.help" #label >
{{ getLabel(data.item) }} <span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span>
<Tooltips :content="config.help" /> <Tooltips :content="config.help" />
</template> </template>
<div v-if="type === 4" class="form-value" v-html="value"></div> <template v-else #label>
<template v-else> <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"> <el-input v-model="value">
<template #prepend> <template #prepend>
<el-select v-model="urlVal" style="width: 115px"> <el-select v-model="urlVal" style="width: 115px">
@ -180,8 +199,12 @@ onMounted(() => {
</template> </template>
<template #append><el-button type="warning" @click="openUrl">访问</el-button></template> <template #append><el-button type="warning" @click="openUrl">访问</el-button></template>
</el-input> </el-input>
</template> </div>
</el-form-item> </el-form-item>
</template> </template>
<style lang='scss' scoped> <style lang='scss' scoped>

Loading…
Cancel
Save