|
@@ -1,13 +1,10 @@
|
|
|
<template>
|
|
|
<div class="formitem">
|
|
|
+ <!-- 标题 -->
|
|
|
<div class="label" :style="{ width: labelWidth + 'px' }">
|
|
|
{{ label }}
|
|
|
- <Popover
|
|
|
- v-if="showPop"
|
|
|
- titleText="我是标题"
|
|
|
- type="base"
|
|
|
- placement="top-left"
|
|
|
- >
|
|
|
+ <!-- 提示 -->
|
|
|
+ <Popover v-if="showPop" type="base" placement="top-left">
|
|
|
<template #content>
|
|
|
<article>
|
|
|
{{ popText }}
|
|
@@ -17,11 +14,13 @@
|
|
|
</Popover>
|
|
|
:
|
|
|
</div>
|
|
|
+ <!-- 输出框 -->
|
|
|
<Input
|
|
|
v-if="formType === 'input'"
|
|
|
v-model="value"
|
|
|
:placeholder="placeholder"
|
|
|
></Input>
|
|
|
+ <!-- 输出框带单位 -->
|
|
|
<Input
|
|
|
v-if="formType === 'input-unit'"
|
|
|
v-model="value"
|
|
@@ -34,12 +33,31 @@
|
|
|
},
|
|
|
]"
|
|
|
/>
|
|
|
+ <!-- 选择框 -->
|
|
|
<MSelect
|
|
|
v-if="formType === 'select'"
|
|
|
width="180"
|
|
|
v-model="value"
|
|
|
:data="selectData"
|
|
|
/>
|
|
|
+ <!-- 上传图片 -->
|
|
|
+ <section class="list" v-if="formType === 'upload'">
|
|
|
+ <ImageUpload
|
|
|
+ hosts="http://47.95.122.141:8209/domita/backend"
|
|
|
+ action="/base/attachment/uploadX"
|
|
|
+ :defaultFileList="value"
|
|
|
+ :previewMode="false"
|
|
|
+ :multiple="true"
|
|
|
+ />
|
|
|
+ </section>
|
|
|
+ <Input
|
|
|
+ v-if="formType === 'textarea'"
|
|
|
+ v-model="value"
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ :autofocus="false"
|
|
|
+ :max-length="10"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -51,7 +69,7 @@ export default {
|
|
|
default: "input",
|
|
|
},
|
|
|
initValue: [String, Number, Array, Object],
|
|
|
- placeholder: String,
|
|
|
+ placeholder: "请输入",
|
|
|
labelWidth: {
|
|
|
type: Number,
|
|
|
default: 100,
|