|
@@ -118,7 +118,15 @@
|
|
|
>
|
|
|
<el-input v-model="address"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item class="formItem" :label="`${$t(`pleaseChoose`)}${$t(`page.views.shops.enter.add.longitude`)}${$t(`page.views.shops.enter.add.latitude`)}`" prop="jwd">
|
|
|
+ <el-form-item
|
|
|
+ class="formItem"
|
|
|
+ :label="
|
|
|
+ `${$t(`pleaseChoose`)}${$t(
|
|
|
+ `page.views.shops.enter.add.longitude`
|
|
|
+ )}${$t(`page.views.shops.enter.add.latitude`)}`
|
|
|
+ "
|
|
|
+ prop="jwd"
|
|
|
+ >
|
|
|
<div class="longLatDiv">
|
|
|
<span>{{ $t("page.views.shops.enter.add.longitude") }}</span>
|
|
|
<el-input class="input" v-model="form.longitude"></el-input>
|
|
@@ -186,6 +194,7 @@
|
|
|
<el-upload
|
|
|
list-type="picture-card"
|
|
|
:action="`${$basePath}/common/upload`"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
:on-preview="preview"
|
|
|
:on-remove="remove"
|
|
|
:on-success="
|
|
@@ -209,6 +218,7 @@
|
|
|
:class="{ uploadHide: form.defaultImgUrl }"
|
|
|
list-type="picture-card"
|
|
|
:action="`${$basePath}/common/upload`"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
:on-preview="preview"
|
|
|
:on-remove="remove"
|
|
|
:on-success="
|
|
@@ -227,6 +237,7 @@
|
|
|
<el-upload
|
|
|
list-type="picture-card"
|
|
|
:action="`${$basePath}/common/upload`"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
:on-preview="preview"
|
|
|
:on-remove="remove"
|
|
|
:on-success="
|
|
@@ -590,6 +601,12 @@ export default class extends Vue {
|
|
|
this.showImgSrc = url;
|
|
|
this.showImg = true;
|
|
|
}
|
|
|
+
|
|
|
+ beforeUpload(file: any) {
|
|
|
+ if (/image\/(png|jpg)$/.test(file.type)) return true;
|
|
|
+ this.$message.error(`${this.$i18n.t("message.error.imgUpload")}`);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|