|
@@ -1,4 +1,4 @@
|
|
-import { defineComponent, onMounted, reactive } from 'vue'
|
|
|
|
|
|
+import { defineComponent, nextTick, onMounted, reactive } from 'vue'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
import headTitle from './images/header-title.png'
|
|
import headTitle from './images/header-title.png'
|
|
import headPhone from './images/header-phone.png'
|
|
import headPhone from './images/header-phone.png'
|
|
@@ -510,11 +510,20 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
<Form
|
|
<Form
|
|
validateFirst
|
|
validateFirst
|
|
- // showError
|
|
|
|
- // showErrorMessage={false}
|
|
|
|
errorMessageAlign="right"
|
|
errorMessageAlign="right"
|
|
- scrollToError
|
|
|
|
|
|
+ scrollToError={true}
|
|
onSubmit={onSubmit}
|
|
onSubmit={onSubmit}
|
|
|
|
+ onFailed={(e: any) => {
|
|
|
|
+ // 获取第一个校验错误的元素
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ const isError = document.getElementsByClassName('van-field__error-message')
|
|
|
|
+ // 滚动到错误元素对应位置
|
|
|
|
+ isError[0]?.scrollIntoView({
|
|
|
|
+ block: 'center',
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }}
|
|
ref="form"
|
|
ref="form"
|
|
class={styles.form}
|
|
class={styles.form}
|
|
>
|
|
>
|
|
@@ -851,27 +860,19 @@ export default defineComponent({
|
|
{forms.groupBuyType === 'SELF' && (
|
|
{forms.groupBuyType === 'SELF' && (
|
|
<>
|
|
<>
|
|
<CellGroup class={[styles.applyCellGroup, styles.self]} border={false}>
|
|
<CellGroup class={[styles.applyCellGroup, styles.self]} border={false}>
|
|
- <div class={styles.toolImg}>
|
|
|
|
- <Image
|
|
|
|
- src={state.registerInfo?.instrumentPriceImg}
|
|
|
|
- onClick={() => {
|
|
|
|
- showImagePreview([state.registerInfo?.instrumentPriceImg])
|
|
|
|
- localStorage.setItem('read-tool-image', '1')
|
|
|
|
- state.toolImgStatus = true
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
|
|
+ <div
|
|
|
|
+ class={styles.toolImg}
|
|
|
|
+ onClick={() => {
|
|
|
|
+ showImagePreview([state.registerInfo?.instrumentPriceImg])
|
|
|
|
+ localStorage.setItem('read-tool-image', '1')
|
|
|
|
+ state.toolImgStatus = true
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <Image src={state.registerInfo?.instrumentPriceImg} />
|
|
|
|
|
|
{!state.toolImgStatus && (
|
|
{!state.toolImgStatus && (
|
|
<div class={styles.toolImgOverflow}>
|
|
<div class={styles.toolImgOverflow}>
|
|
- <Button
|
|
|
|
- onClick={() => {
|
|
|
|
- showImagePreview([state.registerInfo?.instrumentPriceImg])
|
|
|
|
- localStorage.setItem('read-tool-image', '1')
|
|
|
|
- state.toolImgStatus = true
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 点击查看《乐团训练工具标准配置表》
|
|
|
|
- </Button>
|
|
|
|
|
|
+ <Button>点击查看《乐团训练工具标准配置表》</Button>
|
|
<img src={iconHead} class={styles.iconHead} />
|
|
<img src={iconHead} class={styles.iconHead} />
|
|
</div>
|
|
</div>
|
|
)}
|
|
)}
|