Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mocp-uniapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pangchong
mocp-uniapp
Commits
fbdb0587
You need to sign in or sign up before continuing.
Commit
fbdb0587
authored
Jul 24, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复onBeforeOpen
parent
2a406ef7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
src/mocp/components/global-picker/global-picker.vue
+7
-8
src/pages/modules/mocp/panel/support-application/add.vue
+2
-2
src/pages/modules/mocp/panel/support-application/constants/add.functionals.js
+1
-1
src/static/mocp/css/list.scss
+0
-1
No files found.
src/mocp/components/global-picker/global-picker.vue
View file @
fbdb0587
...
...
@@ -132,11 +132,9 @@ const ps = defineProps({
default
:
'#165dff'
},
//打开前判断
b
eforeOpen
:
{
onB
eforeOpen
:
{
type
:
Function
,
default
:
()
=>
{
return
true
}
default
:
null
}
})
//获取下拉框样式
...
...
@@ -172,11 +170,12 @@ const getPickerClass = computed(() => {
const
show
=
ref
(
false
)
//打开
const
open
=
async
()
=>
{
const
flag
=
await
ps
.
beforeOpen
()
if
(
flag
)
{
searchKey
.
value
=
''
show
.
value
=
true
if
(
ps
.
onBeforeOpen
)
{
const
flag
=
await
ps
.
onBeforeOpen
()
if
(
!
flag
)
return
}
searchKey
.
value
=
''
show
.
value
=
true
}
//设置下拉框打开的默认值
const
defaultIndex
=
ref
(
0
)
...
...
src/pages/modules/mocp/panel/support-application/add.vue
View file @
fbdb0587
...
...
@@ -118,7 +118,7 @@
:
options
=
"relatedSeatSet"
clearable
filter
:
beforeOpen
=
"b
eforeOpen"
:
onBeforeOpen
=
"onB
eforeOpen"
label
-
field
=
"seatName"
value
-
field
=
"id"
><
/global-picker
>
...
...
@@ -133,7 +133,7 @@ import useBaseStore from 'mocp/store/base'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
formData
,
formRef
,
relatedSeatSet
,
rules
}
from
'./constants/add.compositions'
import
{
b
eforeOpen
,
changeAc
,
handleSubmit
}
from
'./constants/add.functionals'
import
{
onB
eforeOpen
,
changeAc
,
handleSubmit
}
from
'./constants/add.functionals'
import
useUserStore
from
'mocp/store/user'
const
baseStore
=
useBaseStore
()
...
...
src/pages/modules/mocp/panel/support-application/constants/add.functionals.js
View file @
fbdb0587
...
...
@@ -13,7 +13,7 @@ export const changeAc = async () => {
}
}
//选择相关席位
export
const
b
eforeOpen
=
async
()
=>
{
export
const
onB
eforeOpen
=
async
()
=>
{
if
(
!
formData
.
machineNumber
)
{
uni
.
$mocpMessage
.
error
(
'请选择机号'
)
return
false
...
...
src/static/mocp/css/list.scss
View file @
fbdb0587
...
...
@@ -37,7 +37,6 @@
align-items
:
center
;
justify-content
:
space-between
;
.txt
{
color
:
$mocp-text-5
;
font-size
:
28rpx
;
margin-left
:
16rpx
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment