Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
da5ff8fc
Commit
da5ff8fc
authored
Mar 29, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义水印优化
parent
69f776e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
60 deletions
+63
-60
setting.vue
take-order/pages/photo/setting.vue
+63
-60
No files found.
take-order/pages/photo/setting.vue
View file @
da5ff8fc
...
@@ -12,16 +12,16 @@
...
@@ -12,16 +12,16 @@
<text
class=
"itemTitle"
>
水印标题
</text>
<text
class=
"itemTitle"
>
水印标题
</text>
<text
class=
"itemNotice"
>
{{
result
[
'lower_right'
][
'title_text'
]
||
'点击可编辑更改'
}}
</text>
<text
class=
"itemNotice"
>
{{
result
[
'lower_right'
][
'title_text'
]
||
'点击可编辑更改'
}}
</text>
</view>
</view>
<switch
class=
"itemSwitch"
disabled
:checked=
"result['lower_right']['title_text']"
<switch
class=
"itemSwitch"
disabled
:checked=
"result['lower_right']['title_text']
!= ''
"
@
c
hange=
"itemChange(
{},-1)
" color="#007AFF" />
@
c
lick=
"handleClickTitleSwitch
"
color=
"#007AFF"
/>
</view>
</view>
<view
class=
"itemView"
v-for=
"(item,ikey) in itemList"
:key=
"ikey"
>
<view
class=
"itemView"
v-for=
"(item,ikey) in itemList"
:key=
"ikey"
>
<view
class=
"itemTitleView"
@
click=
"itemClick(item,ikey)"
>
<view
class=
"itemTitleView"
@
click=
"itemClick(item,ikey)"
>
<text
class=
"itemTitle"
>
{{
item
[
'watemark_text'
]
||
'自定义'
+
(
ikey
+
1
)
}}
</text>
<text
class=
"itemTitle"
>
{{
item
[
'watemark_text'
]
||
'自定义'
+
(
ikey
+
1
)
}}
</text>
<text
class=
"itemNotice"
>
{{
item
[
'watemark_value'
]
||
'点击可编辑更改'
}}
</text>
<text
class=
"itemNotice"
>
{{
item
[
'watemark_value'
]
||
'点击可编辑更改'
}}
</text>
</view>
</view>
<switch
class=
"itemSwitch"
:
disabled=
"!item['enable']"
:checked=
"item['enable']
"
<switch
class=
"itemSwitch"
:
checked=
"item['enable']"
@
change=
"itemChange(item, ikey)
"
@
change=
"itemChange(item, ikey)"
color=
"#007AFF"
/>
color=
"#007AFF"
/>
</view>
</view>
<view
class=
"shadowBackView"
v-if=
"isPopShow"
>
<view
class=
"shadowBackView"
v-if=
"isPopShow"
>
<view
class=
"popCenterView"
>
<view
class=
"popCenterView"
>
...
@@ -29,16 +29,17 @@
...
@@ -29,16 +29,17 @@
<view
class=
"inputBackView"
>
<view
class=
"inputBackView"
>
<view
class=
"ph-pop-left-view"
>
<view
class=
"ph-pop-left-view"
>
<view
class=
"leftInputView"
>
<view
class=
"leftInputView"
>
<input
class=
"leftInput"
type=
"text"
v-model=
"currenItem['watemark_text']"
@
input=
"leftInput()"
<input
class=
"leftInput"
type=
"text"
v-model=
"currenItem['watemark_text']"
:disabled=
"currenItem.type === 'title_text'"
placeholder=
"请输入"
maxlength=
"10"
/>
@
input=
"leftInput()"
:disabled=
"currenItem.type === 'title_text'"
placeholder=
"请输入"
maxlength=
"10"
/>
</view>
</view>
<view
class=
"ph-pop-tip-view"
v-if=
"showTipLeft"
>
*必填项
</view>
<view
class=
"ph-pop-tip-view"
v-if=
"showTipLeft"
>
*必填项
</view>
</view>
</view>
<view
class=
"ph-pop-mid-view"
>
:
</view>
<view
class=
"ph-pop-mid-view"
>
:
</view>
<view>
<view>
<view
class=
"rightInputView"
>
<view
class=
"rightInputView"
>
<input
class=
"rightInput"
type=
"text"
v-model=
"currenItem['watemark_value']"
@
input=
"rightInput()"
<input
class=
"rightInput"
type=
"text"
v-model=
"currenItem['watemark_value']"
placeholder=
"请输入内容"
maxlength=
"30"
/>
@
input=
"rightInput()"
placeholder=
"请输入内容"
maxlength=
"30"
/>
</view>
</view>
<view
class=
"ph-pop-tip-view"
v-if=
"showTipRight"
>
*必填项
</view>
<view
class=
"ph-pop-tip-view"
v-if=
"showTipRight"
>
*必填项
</view>
</view>
</view>
...
@@ -117,6 +118,7 @@
...
@@ -117,6 +118,7 @@
if
(
res
&&
res
.
result
)
{
if
(
res
&&
res
.
result
)
{
this
.
result
=
res
.
result
this
.
result
=
res
.
result
this
.
result
[
'lower_right'
][
'title_text'
]
=
''
}
}
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
...
@@ -149,25 +151,25 @@
...
@@ -149,25 +151,25 @@
this
.
saveUserWatermark
()
this
.
saveUserWatermark
()
},
},
handleClickTitleSwitch
:
function
(
e
)
{
var
string
=
this
.
result
[
'lower_right'
][
'title_text'
]
?
'水印标题不可关闭'
:
'请先编辑该自定义项'
uni
.
showToast
({
icon
:
'none'
,
title
:
string
})
},
//自定义 开关
//自定义 开关
itemChange
:
function
(
item
,
ikey
)
{
itemChange
:
function
(
item
,
ikey
)
{
if
(
ikey
===
-
1
)
{
// 水印标题
if
(
item
[
'watemark_value'
])
{
// if (this.result['lower_right']['title_text']) {
// 修改
this
.
saveUserWatermark
()
// } else {
// // 弹出修改框
// this.itemClick(item, ikey)
// }
}
else
{
// 其他自定义
// if (item['watemark_value']) {
// 修改
// 修改
item
[
'enable'
]
=
!
item
[
'enable'
]
this
.
saveUserWatermark
()
this
.
saveUserWatermark
()
//
} else {
}
else
{
// // 弹出修改框
uni
.
showToast
({
// this.itemClick(item, ikey)
icon
:
'none'
,
// }
title
:
'请先编辑该自定义项'
})
}
}
},
},
...
@@ -365,12 +367,13 @@
...
@@ -365,12 +367,13 @@
width
:
180
rpx
;
width
:
180
rpx
;
height
:
32
rpx
;
height
:
32
rpx
;
}
}
.ph-pop-left-view
{
.ph-pop-left-view
{
margin-left
:
30
rpx
;
margin-left
:
30
rpx
;
}
}
.ph-pop-tip-view
{
.ph-pop-tip-view
{
color
:
#F56C6C
;
color
:
#F56C6C
;
}
}
.ph-pop-mid-view
{
.ph-pop-mid-view
{
...
...
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