Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
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
刘文虎
account-book
Commits
ffbd4520
Commit
ffbd4520
authored
Aug 22, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收支设置
parent
cda4a970
Pipeline
#3310
canceled with stages
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
76 deletions
+83
-76
manifest.json
manifest.json
+6
-1
input.vue
pages/mine/input/input.vue
+2
-7
drap-view - 副本.vue
pages/mine/payments-setting/components/drap-view - 副本.vue
+0
-0
drap-view.vue
pages/mine/payments-setting/components/drap-view.vue
+75
-67
payments-setting.vue
pages/mine/payments-setting/payments-setting.vue
+0
-1
No files found.
manifest.json
View file @
ffbd4520
...
...
@@ -96,7 +96,12 @@
"UniversalLinks"
:
""
}
},
"maps"
:
{},
"maps"
:
{
"baidu"
:
{
"appkey_ios"
:
"dFMUnxGBq8mB8CSotGMELp4EGUq9qlwo"
,
"appkey_android"
:
"32HwrFwjGUFno8GddnqSZtP72sDFucG1"
}
},
"geolocation"
:
{
"baidu"
:
{
"__platform__"
:
[
"android"
],
...
...
pages/mine/input/input.vue
View file @
ffbd4520
<
template
>
<view
class=
"input-view"
>
<NavbarNormal
:title=
"info.title"
background=
"transparent"
titleColor=
"#191C27"
:border-bottom=
"false"
title-bold
></NavbarNormal>
<NavbarNormal
:title=
"info.title"
titleColor=
"#191C27"
:border-bottom=
"false"
title-bold
></NavbarNormal>
<view
class=
"content-view"
>
<u-input
v-model=
"value"
...
...
@@ -49,11 +49,7 @@ export default {
};
},
placeholderStyle
()
{
return
{
color
:
'#cccccc'
,
'font-size'
:
'28rpx'
,
'font-weight'
:
'bold'
};
return
'color: #cccccc;font-size: 28rpx;font-weight: bold;'
},
inputStyle
()
{
return
{
...
...
@@ -163,7 +159,6 @@ export default {
if
(
options
&&
options
.
disabled
)
{
this
.
disabled
=
options
.
disabled
;
}
uni
.
hideShareMenu
();
},
onUnload
()
{
let
notification
=
`input-sure-
${
this
.
type
}
`
;
...
...
pages/mine/payments-setting/components/drap-view - 副本.vue
0 → 100644
View file @
ffbd4520
This diff is collapsed.
Click to expand it.
pages/mine/payments-setting/components/drap-view.vue
View file @
ffbd4520
...
...
@@ -3,29 +3,31 @@
<view
class=
"edit-box"
:style=
"
{ top: 0 }">
<view
class=
"zhuti"
>
<scroll-view
:scroll-y=
"pageInfo.scrollY"
class=
"product-section"
>
<view
class=
"list"
@
click=
"closeAll"
>
<view
class=
"swipe-action-outside"
v-for=
"(item, index) in optionLists"
:key=
"item.guid"
>
<u-swipe-action
:show=
"item.show"
bg-color=
"#f6f7fa"
:index=
"item.guid"
@
click=
"handleClick"
@
open=
"open"
:options=
"options"
>
<view
class=
"row list-row"
:data-index=
"index"
@
longpress=
"longpress($event, item, index)"
@
touchmove=
"dragMove"
@
touchend=
"dragEnd($enent, item)"
:class=
"
{ 'ready-place': pageInfo.readyPlaceIndex === index }"
:id="`item-view-${item.guid}`"
:style="'height: ' + pageInfo.rowHeight + 'px;'"
@click.stop="closeAll"
>
<view
class=
"item-view"
>
<view
class=
"left-view"
>
<view
class=
"image-view"
><image
:src=
"billStaticBaseUrl + item.icon"
v-if=
"item.icon"
></image></view>
<view
class=
"name-view"
>
{{
item
.
label
}}
</view>
<view
class=
"list"
>
<uni-swipe-action>
<view
class=
"swipe-action-outside"
v-for=
"(item, index) in optionLists"
:key=
"item.guid"
>
<uni-swipe-action-item
:right-options=
"options"
bg-color=
"#f6f7fa"
:index=
"item.guid"
@
click=
"onClick($event,item,index)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"row list-row"
:data-index=
"index"
@
longpress=
"longpress($event, item, index)"
@
touchmove=
"dragMove"
@
touchend=
"dragEnd($event, item)"
:class=
"
{ 'ready-place': pageInfo.readyPlaceIndex === index }"
:id="`item-view-${item.guid}`"
:style="'height: ' + pageInfo.rowHeight + 'px;'"
@click.stop="closeAll"
>
<view
class=
"item-view"
@
click
.
stop=
"clickCell(item,index)"
>
<view
class=
"left-view"
>
<view
class=
"image-view"
><image
:src=
"billStaticBaseUrl + item.icon"
v-if=
"item.icon"
></image></view>
<view
class=
"name-view"
>
{{
item
.
label
}}
</view>
</view>
</view>
</view>
</
view
>
</
u-swipe-action
>
</
view
>
</
uni-swipe-action-item
>
</
view
>
</
uni-swipe-action
>
</view>
</scroll-view>
<movable-area
class=
"movable-area"
:style=
"'display:' + movableViewInfo.showClass + '; height:' + pageInfo.scrollHeight + '%'"
>
...
...
@@ -51,19 +53,23 @@
</
template
>
<
script
>
import
UniSwipeAction
from
'@/components/uni-swipe-action/uni-swipe-action.vue'
;
import
UniSwipeActionItem
from
'@/components/uni-swipe-action-item/uni-swipe-action-item.vue'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
{
billStaticBaseUrl
}
from
'@/utils/config.js'
;
export
default
{
name
:
'dragEdit'
,
props
:
[
'list'
],
components
:
{
PopInput
UniSwipeAction
,
UniSwipeActionItem
,
PopInput
,
},
data
()
{
return
{
billStaticBaseUrl
,
showConfirm
:
false
,
readyDeleteI
ndex
:
null
,
readyDeleteI
tem
:
null
,
options
:
[
{
text
:
'删除'
,
...
...
@@ -114,45 +120,35 @@ export default {
this
.
optionLists
=
[...
this
.
list
];
},
methods
:
{
contentClick
(
e
)
{
console
.
log
(
'contentClick'
,
e
);
setTimeout
(()
=>
{
this
.
closeAll
();
},
300
);
},
handleClick
(
index
,
index1
)
{
let
current
=
this
.
optionLists
.
findIndex
(
item
=>
item
.
guid
===
index
);
if
(
index1
==
1
)
{
this
.
toEdit
(
current
);
setTimeout
(()
=>
{
this
.
closeAll
();
},
500
);
}
else
{
this
.
beforeDelete
(
current
);
clickCell
(
item
)
{
let
flag
=
true
;
this
.
optionLists
.
map
(
el
=>
{
if
(
el
.
show
)
{
flag
=
false
;
}
});
if
(
flag
)
{
this
.
toEdit
(
item
);
}
},
// 如果打开一个的时候,不需要关闭其他,则无需实现本方法
open
(
index
)
{
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
// 原本为'false',再次设置为'false'会无效
if
(
index
===
null
)
{
this
.
optionLists
.
map
((
val
,
idx
)
=>
{
this
.
optionLists
[
idx
].
show
=
false
;
});
}
else
{
let
current
=
this
.
optionLists
.
findIndex
(
item
=>
item
.
guid
===
index
);
this
.
optionLists
[
current
].
show
=
true
;
this
.
optionLists
.
map
((
val
,
idx
)
=>
{
if
(
current
!==
idx
)
{
this
.
optionLists
[
idx
].
show
=
false
;
}
});
onClick
(
e
,
item
)
{
console
.
log
(
e
);
console
.
log
(
'点击了'
+
(
e
.
position
===
'left'
?
'左侧'
:
'右侧'
)
+
e
.
content
.
text
+
'按钮'
);
if
(
e
.
position
===
'right'
){
if
(
e
.
content
.
text
===
'删除'
){
this
.
beforeDelete
(
item
)
}
else
if
(
e
.
content
.
text
===
'编辑'
){
this
.
toEdit
(
item
);
}
}
console
.
log
(
'open'
,
this
.
optionLists
);
},
swipeChange
(
e
,
index
)
{
console
.
log
(
'当前状态:'
+
e
+
',下标:'
+
index
);
this
.
list
[
index
].
show
=
e
===
'right'
?
true
:
false
;
},
toEdit
(
i
ndex
)
{
let
value
=
this
.
optionLists
[
index
]
.
label
;
toEdit
(
i
tem
)
{
let
value
=
item
.
label
;
this
.
$u
.
route
({
url
:
'/pages/mine/input/input'
,
params
:
{
...
...
@@ -161,22 +157,32 @@ export default {
}
});
uni
.
$once
(
`input-sure-payments-setting`
,
res
=>
{
this
.
optionLists
[
index
].
label
=
res
.
content
;
this
.
$emit
(
'onEdit'
,
this
.
optionLists
[
index
]);
this
.
optionLists
.
map
(
el
=>
{
if
(
el
.
id
===
item
.
id
){
el
.
label
=
res
.
content
}
})
this
.
$emit
(
'onEdit'
,
item
);
});
},
handleConfirm
()
{
let
row
=
this
.
optionLists
[
this
.
readyDeleteIndex
];
// this.optionLists.splice(this.readyDeleteIndex, 1);
this
.
optionLists
[
this
.
readyDeleteIndex
].
show
=
false
;
this
.
$emit
(
'onDelete'
,
row
);
this
.
optionLists
.
map
(
item
=>
{
if
(
item
.
id
===
this
.
readyDeleteItem
.
id
){
item
.
show
=
false
}
})
this
.
$emit
(
'onDelete'
,
this
.
readyDeleteItem
);
},
handleCancel
()
{
this
.
optionLists
[
this
.
readyDeleteIndex
].
show
=
false
;
this
.
optionLists
.
map
(
item
=>
{
if
(
item
.
id
===
this
.
readyDeleteItem
.
id
){
item
.
show
=
false
}
})
},
beforeDelete
(
i
ndex
)
{
this
.
readyDeleteI
ndex
=
index
;
beforeDelete
(
i
tem
)
{
this
.
readyDeleteI
tem
=
item
;
this
.
showConfirm
=
true
;
},
// 通知父组件修改排序
...
...
@@ -188,7 +194,9 @@ export default {
},
closeAll
()
{
if
(
this
.
optionLists
.
length
)
{
this
.
open
(
null
);
this
.
optionLists
.
map
(
item
=>
{
item
.
show
=
false
})
}
},
async
longpress
(
event
,
item
)
{
...
...
pages/mine/payments-setting/payments-setting.vue
View file @
ffbd4520
...
...
@@ -196,7 +196,6 @@ export default {
try
{
let
{
label
,
id
,
icon
}
=
row
let
params
=
{
name
:
row
.
label
,
useType
:
this
.
form
.
type
}
...
...
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