Commit a66d28edb8d81c860b8ef5213d355e3f8ae2c24a
Merge branch 'fix/import-style' into 'main_dev'
fix: 修改物模型导入样式问题 See merge request yunteng/thingskit-front!1070
Showing
1 changed file
with
11 additions
and
5 deletions
| @@ -5,8 +5,7 @@ | @@ -5,8 +5,7 @@ | ||
| 5 | destroyOnClose | 5 | destroyOnClose |
| 6 | v-bind="$attrs" | 6 | v-bind="$attrs" |
| 7 | width="25rem" | 7 | width="25rem" |
| 8 | - :height="160" | ||
| 9 | - :min-height="160" | 8 | + :min-height="150" |
| 10 | @register="register" | 9 | @register="register" |
| 11 | @cancel="handleCancel" | 10 | @cancel="handleCancel" |
| 12 | :showOkBtn="false" | 11 | :showOkBtn="false" |
| @@ -17,7 +16,7 @@ | @@ -17,7 +16,7 @@ | ||
| 17 | <Radio value="2">JSON导入</Radio> | 16 | <Radio value="2">JSON导入</Radio> |
| 18 | <Radio value="1">Excel导入</Radio> | 17 | <Radio value="1">Excel导入</Radio> |
| 19 | </RadioGroup> | 18 | </RadioGroup> |
| 20 | - <div v-if="model.importType == 1" class="absolute -left-28 mb-1"> | 19 | + <div v-if="model.importType === '1'" class="absolute -left-28"> |
| 21 | <Button @click="handleTemplateDownload" type="link">excel模板下载</Button> | 20 | <Button @click="handleTemplateDownload" type="link">excel模板下载</Button> |
| 22 | </div> | 21 | </div> |
| 23 | </template> | 22 | </template> |
| @@ -83,7 +82,6 @@ | @@ -83,7 +82,6 @@ | ||
| 83 | component: 'ApiUpload', | 82 | component: 'ApiUpload', |
| 84 | componentProps: ({ formModel }) => { | 83 | componentProps: ({ formModel }) => { |
| 85 | return { | 84 | return { |
| 86 | - // listType: 'picture-card', | ||
| 87 | maxFileLimit: 1, | 85 | maxFileLimit: 1, |
| 88 | accept: formModel.importType == 2 ? '.json,' : '.csv,.xls,.xlsx', | 86 | accept: formModel.importType == 2 ? '.json,' : '.csv,.xls,.xlsx', |
| 89 | api: async (file: File) => { | 87 | api: async (file: File) => { |
| @@ -93,6 +91,10 @@ | @@ -93,6 +91,10 @@ | ||
| 93 | } else { | 91 | } else { |
| 94 | handleCSVImport(file); | 92 | handleCSVImport(file); |
| 95 | } | 93 | } |
| 94 | + return { | ||
| 95 | + uid: '', | ||
| 96 | + name: '', | ||
| 97 | + }; | ||
| 96 | } catch {} | 98 | } catch {} |
| 97 | }, | 99 | }, |
| 98 | }; | 100 | }; |
| @@ -218,4 +220,8 @@ | @@ -218,4 +220,8 @@ | ||
| 218 | }; | 220 | }; |
| 219 | </script> | 221 | </script> |
| 220 | 222 | ||
| 221 | -<style lang="less" scope></style> | 223 | +<style lang="less" scoped> |
| 224 | + :deep(.ant-form-item) { | ||
| 225 | + margin-bottom: 28px !important; | ||
| 226 | + } | ||
| 227 | +</style> |