Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-27 20:46:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4dcf00d4194c7c06013015b572ce076da27980eb
4dcf00d4
1 parent
b0f5ee67
✨ feat(组件): 捐赠模块捐赠前提示是否有儿童
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
src/components/DonateBook/index.vue
src/router/routes/modules/client/index.js
src/components/DonateBook/index.vue
View file @
4dcf00d
...
...
@@ -59,7 +59,7 @@ import { ref, reactive, onMounted, watch, nextTick } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import axios from '@/utils/axios';
import $ from 'jquery'
import { Toast } from 'vant';
import { Toast
, Dialog
} from 'vant';
const $route = useRoute();
const $router = useRouter();
...
...
@@ -109,12 +109,27 @@ const show = ref(false);
let popupHeight = ref('60%');
watch(() => props.showPopup, (v) => {
show.value = v
// DOM调整后,把弹出框高度设定到适合高度,配合不同分辨率效果
nextTick(() => {
let height = $('.donate-wrapper').height();
popupHeight.value = height + 10 + 'px';
})
// 如果没有默认儿童需要用户确认一次
if (v && !props.item.perf_id) {
Dialog.confirm({
title: '温馨提示',
message: '默认儿童为空, 是否继续捐书!',
confirmButtonColor: '#713610'
})
.then(() => {
show.value = v;
// DOM调整后,把弹出框高度设定到适合高度,配合不同分辨率效果
nextTick(() => {
let height = $('.donate-wrapper').height();
popupHeight.value = height + 10 + 'px';
})
})
.catch(() => {
// 取消按钮回调
closeBtn();
});
return false;
}
})
const closeBtn = () => {
...
...
src/router/routes/modules/client/index.js
View file @
4dcf00d
...
...
@@ -4,7 +4,7 @@ const index = [{
component
:
()
=>
import
(
'@/views/client/index.vue'
),
meta
:
{
title
:
'童声无界'
,
name
:
'index'
name
:
'index
Page
'
},
children
:
[]
},
{
...
...
@@ -13,7 +13,7 @@ const index = [{
component
:
()
=>
import
(
'@/views/client/index.vue'
),
meta
:
{
title
:
'童声无界'
,
name
:
'index'
name
:
'index
Page
'
},
children
:
[]
},
{
...
...
Please
register
or
login
to post a comment