Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b1eda4b7
authored
Mar 23, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
自测修改
1 parent
6323ac5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.js
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.wxml
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.js
View file @
b1eda4b
...
@@ -4,24 +4,26 @@ Component({
...
@@ -4,24 +4,26 @@ Component({
* 组件的属性列表
* 组件的属性列表
*/
*/
properties
:
{
properties
:
{
show
:
Boolean
,
show
:
{
connectionList
:
Array
,
type
:
Boolean
,
tabBarStyle
:
String
,
selectedConnectionList
:
{
type
:
Array
,
observer
:
function
(
n
)
{
observer
:
function
(
n
)
{
let
{
connectionList
}
=
this
.
data
if
(
n
)
{
if
(
n
?.
length
)
{
let
{
connectionList
,
selectedConnectionList
}
=
this
.
data
connectionList
.
map
(
val
=>
{
connectionList
.
map
(
val
=>
{
val
.
show
=
true
val
.
show
=
true
if
(
n
.
findIndex
(
item
=>
item
.
merchantId
==
val
.
merchantId
)
>
-
1
)
val
.
checked
=
true
if
(
selectedConnectionList
?.
length
&&
selectedConnectionList
?
.
findIndex
(
item
=>
item
.
merchantId
==
val
.
merchantId
)
>
-
1
)
val
.
checked
=
true
return
val
return
val
})
})
}
this
.
setData
({
connectionList
})
this
.
setData
({
connectionList
})
}
}
}
}
},
},
connectionList
:
Array
,
tabBarStyle
:
String
,
selectedConnectionList
:
{
type
:
Array
}
},
/**
/**
* 组件的初始数据
* 组件的初始数据
...
@@ -36,11 +38,12 @@ Component({
...
@@ -36,11 +38,12 @@ Component({
methods
:
{
methods
:
{
select
(
e
)
{
select
(
e
)
{
let
{
item
}
=
e
.
currentTarget
.
dataset
let
{
item
}
=
e
.
currentTarget
.
dataset
console
.
log
(
item
)
let
{
connectionList
}
=
this
.
data
let
{
connectionList
}
=
this
.
data
// 不可操作选项
// 不可操作选项
if
(
item
.
disabled
)
return
if
(
item
?
.
disabled
)
return
connectionList
.
forEach
(
v
=>
{
connectionList
.
forEach
(
v
=>
{
if
(
v
.
merchantId
==
item
.
merchantId
)
v
.
checked
=
!
v
.
checked
if
(
v
.
merchantId
==
item
?
.
merchantId
)
v
.
checked
=
!
v
.
checked
})
})
this
.
setData
({
this
.
setData
({
connectionList
connectionList
...
...
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.wxml
View file @
b1eda4b
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<view
<view
class="service-items text-hide"
class="service-items text-hide"
data-index="{{index}}"
data-index="{{index}}"
hidden="{{!item.show
}}"
data-item="{{item
}}"
bindtap="select">
bindtap="select">
<view class="item-radio">
<view class="item-radio">
<view wx:if="{{!item.checked}}" class="radio_class radio {{item.disabled?'disabled': ''}}"></view>
<view wx:if="{{!item.checked}}" class="radio_class radio {{item.disabled?'disabled': ''}}"></view>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment