Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-back
Commits
cf2a3e20
Commit
cf2a3e20
authored
Mar 04, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
键盘内容超出优化
parent
3cf5c999
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
19 deletions
+37
-19
landkeybord.acss
pages/components/landkeybord/landkeybord.acss
+3
-3
landkeybord.axml
pages/components/landkeybord/landkeybord.axml
+1
-1
landkeybord.js
pages/components/landkeybord/landkeybord.js
+33
-15
No files found.
pages/components/landkeybord/landkeybord.acss
View file @
cf2a3e20
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
/* icon+结果 */
/* icon+结果 */
.result-container {
.result-container {
width: 8
0
%;
width: 8
5
%;
height: 60rpx;
height: 60rpx;
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
/* 结果展示 */
/* 结果展示 */
.result-display {
.result-display {
width: 8
0
%;
width: 8
5
%;
height: 100%;
height: 100%;
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
/* 中间空白的部分 */
/* 中间空白的部分 */
.result-blank {
.result-blank {
width:
10
%;
width:
5
%;
height: 100%;
height: 100%;
}
}
...
...
pages/components/landkeybord/landkeybord.axml
View file @
cf2a3e20
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<text class="result-display-text-empty" a:if="{{result == '' && scenes == 2}}">请输入会员号</text>
<text class="result-display-text-empty" a:if="{{result == '' && scenes == 2}}">请输入会员号</text>
<text class="result-display-text-empty" a:if="{{result == '' && scenes == 3 }}">请输入收款金额</text>
<text class="result-display-text-empty" a:if="{{result == '' && scenes == 3 }}">请输入收款金额</text>
<text class="result-display-text-empty" a:if="{{result == '' && scenes == 4}}">请输入退款金额</text>
<text class="result-display-text-empty" a:if="{{result == '' && scenes == 4}}">请输入退款金额</text>
<text class="result-display-text" a:if="{{result != ''}}">{{result}}</text>
<text class="result-display-text" a:if="{{result != ''}}">{{
show
result}}</text>
</view>
</view>
</view>
</view>
<view class="result-baseline">
<view class="result-baseline">
...
...
pages/components/landkeybord/landkeybord.js
View file @
cf2a3e20
Component
({
Component
({
mixins
:
[],
mixins
:
[],
data
:
{
data
:
{
showresult
:
""
,
result
:
""
,
result
:
""
,
scenes
:
2
,
scenes
:
2
,
errMsg
:
""
errMsg
:
""
...
@@ -23,6 +24,7 @@ Component({
...
@@ -23,6 +24,7 @@ Component({
this
.
setData
({
this
.
setData
({
result
:
''
,
result
:
''
,
errMsg
:
''
,
errMsg
:
''
,
showresult
:
''
});
});
}
}
...
@@ -35,36 +37,41 @@ Component({
...
@@ -35,36 +37,41 @@ Component({
add7
(
e
)
{
add7
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"7"
});
this
.
addInputContont
(
"7"
)
},
add8
(
e
)
{
},
add8
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"8"
});
this
.
addInputContont
(
"8"
)
},
add9
(
e
)
{
},
add9
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"9"
});
this
.
addInputContont
(
"9"
)
},
add4
(
e
)
{
},
add4
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"4"
});
this
.
addInputContont
(
"4"
)
},
add5
(
e
)
{
},
add5
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"5"
});
this
.
addInputContont
(
"5"
)
},
add6
(
e
)
{
},
add6
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"6"
});
this
.
addInputContont
(
"6"
)
},
add1
(
e
)
{
},
add1
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"1"
});
this
.
addInputContont
(
"1"
)
},
add2
(
e
)
{
},
add2
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"2"
});
this
.
addInputContont
(
"2"
)
},
add3
(
e
)
{
},
add3
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"3"
});
this
.
addInputContont
(
"3"
)
},
add0
(
e
)
{
},
add0
(
e
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"0"
});
this
.
addInputContont
(
"0"
)
},
addpoint
(
e
)
{
},
addpoint
(
e
)
{
if
(
this
.
data
.
scenes
==
3
||
this
.
data
.
scenes
==
4
)
{
if
(
this
.
data
.
scenes
==
3
||
this
.
data
.
scenes
==
4
)
{
this
.
setData
({
result
:
this
.
data
.
result
+
"."
});
this
.
addInputContont
(
"."
)
}
}
},
delete
(
e
)
{
},
delete
(
e
)
{
if
(
this
.
data
.
result
.
length
>
1
)
{
if
(
this
.
data
.
result
.
length
>
1
)
{
let
cur
=
this
.
data
.
result
;
let
cur
=
this
.
data
.
result
;
cur
=
cur
.
substring
(
0
,
cur
.
length
-
1
)
cur
=
cur
.
substring
(
0
,
cur
.
length
-
1
)
this
.
setData
({
result
:
cur
});
let
shownewresult
=
cur
if
(
cur
.
length
>
13
)
{
shownewresult
=
"..."
+
cur
.
substring
(
cur
.
length
-
11
,
cur
.
length
)
}
this
.
setData
({
result
:
cur
,
showresult
:
shownewresult
});
}
else
{
}
else
{
this
.
setData
({
result
:
''
});
this
.
setData
({
result
:
''
,
showresult
:
''
});
}
}
},
finish
(
e
)
{
},
finish
(
e
)
{
this
.
setData
({
errMsg
:
""
})
this
.
setData
({
errMsg
:
""
})
...
@@ -85,8 +92,19 @@ Component({
...
@@ -85,8 +92,19 @@ Component({
this
.
props
.
onKeyBordFinished
(
this
.
data
.
result
);
this
.
props
.
onKeyBordFinished
(
this
.
data
.
result
);
},
closeKeybord
(
e
)
{
},
closeKeybord
(
e
)
{
this
.
props
.
onKeyBordClose
();
this
.
props
.
onKeyBordClose
();
}
},
//处理输入的内容
addInputContont
(
content
){
let
newresult
=
this
.
data
.
result
+
content
;
let
shownewresult
=
newresult
if
(
newresult
.
length
>
13
){
shownewresult
=
"..."
+
newresult
.
substring
(
newresult
.
length
-
11
,
newresult
.
length
)
}
this
.
setData
({
result
:
newresult
,
showresult
:
shownewresult
});
}
},
},
});
});
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