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
Commit
fbdb0587
authored
Jul 24, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复onBeforeOpen
parent
2a406ef7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
src/mocp/components/global-picker/global-picker.vue
+6
-7
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({
...
@@ -132,11 +132,9 @@ const ps = defineProps({
default
:
'#165dff'
default
:
'#165dff'
},
},
//打开前判断
//打开前判断
b
eforeOpen
:
{
onB
eforeOpen
:
{
type
:
Function
,
type
:
Function
,
default
:
()
=>
{
default
:
null
return
true
}
}
}
})
})
//获取下拉框样式
//获取下拉框样式
...
@@ -172,11 +170,12 @@ const getPickerClass = computed(() => {
...
@@ -172,11 +170,12 @@ const getPickerClass = computed(() => {
const
show
=
ref
(
false
)
const
show
=
ref
(
false
)
//打开
//打开
const
open
=
async
()
=>
{
const
open
=
async
()
=>
{
const
flag
=
await
ps
.
beforeOpen
()
if
(
ps
.
onBeforeOpen
)
{
if
(
flag
)
{
const
flag
=
await
ps
.
onBeforeOpen
()
if
(
!
flag
)
return
}
searchKey
.
value
=
''
searchKey
.
value
=
''
show
.
value
=
true
show
.
value
=
true
}
}
}
//设置下拉框打开的默认值
//设置下拉框打开的默认值
const
defaultIndex
=
ref
(
0
)
const
defaultIndex
=
ref
(
0
)
...
...
src/pages/modules/mocp/panel/support-application/add.vue
View file @
fbdb0587
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
:
options
=
"relatedSeatSet"
:
options
=
"relatedSeatSet"
clearable
clearable
filter
filter
:
beforeOpen
=
"b
eforeOpen"
:
onBeforeOpen
=
"onB
eforeOpen"
label
-
field
=
"seatName"
label
-
field
=
"seatName"
value
-
field
=
"id"
value
-
field
=
"id"
><
/global-picker
>
><
/global-picker
>
...
@@ -133,7 +133,7 @@ import useBaseStore from 'mocp/store/base'
...
@@ -133,7 +133,7 @@ import useBaseStore from 'mocp/store/base'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
formData
,
formRef
,
relatedSeatSet
,
rules
}
from
'./constants/add.compositions'
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'
import
useUserStore
from
'mocp/store/user'
const
baseStore
=
useBaseStore
()
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 () => {
...
@@ -13,7 +13,7 @@ export const changeAc = async () => {
}
}
}
}
//选择相关席位
//选择相关席位
export
const
b
eforeOpen
=
async
()
=>
{
export
const
onB
eforeOpen
=
async
()
=>
{
if
(
!
formData
.
machineNumber
)
{
if
(
!
formData
.
machineNumber
)
{
uni
.
$mocpMessage
.
error
(
'请选择机号'
)
uni
.
$mocpMessage
.
error
(
'请选择机号'
)
return
false
return
false
...
...
src/static/mocp/css/list.scss
View file @
fbdb0587
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.txt
{
.txt
{
color
:
$mocp-text-5
;
font-size
:
28rpx
;
font-size
:
28rpx
;
margin-left
:
16rpx
;
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