Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
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
easyUI
hls-easy-ui
Commits
b976c23a
Commit
b976c23a
authored
Feb 21, 2020
by
JingChao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hmap' of
https://hel.hand-china.com/easyUI/hls-easy-ui
into hmap
parents
7600fa2d
ba715349
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
33 deletions
+118
-33
filter.js
packages/common/scripts/filter.js
+1
-1
index.vue
packages/components/HContent/index.vue
+11
-5
Modal.vue
packages/components/Modal/Modal.vue
+27
-13
index.vue
packages/components/Scroll/index.vue
+78
-13
filter.js
src/scripts/filter.js
+1
-1
No files found.
packages/common/scripts/filter.js
View file @
b976c23a
...
@@ -2,7 +2,7 @@ export default (Vue) => {
...
@@ -2,7 +2,7 @@ export default (Vue) => {
Vue
.
filter
(
'currency'
,
function
(
val
)
{
Vue
.
filter
(
'currency'
,
function
(
val
)
{
if
(
!
val
)
return
'0.00'
if
(
!
val
)
return
'0.00'
var
intPart
=
Number
(
val
).
toFixed
(
0
)
// 获取整数部分
var
intPart
=
parseInt
(
Number
(
val
)
)
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
floatPart
=
'.00'
// 预定义小数部分
...
...
packages/components/HContent/index.vue
View file @
b976c23a
...
@@ -163,16 +163,22 @@ export default {
...
@@ -163,16 +163,22 @@ export default {
do
{
do
{
if
(
nextElement
)
{
if
(
nextElement
)
{
let
elHeight
=
window
.
getComputedStyle
(
nextElement
).
height
let
elHeight
=
window
.
getComputedStyle
(
nextElement
).
height
if
(
elHeight
)
{
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
nextHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
nextHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
}
if
(
nextElement
.
_prevClass
&&
nextElement
.
_prevClass
.
indexOf
(
'h-bottom-tab'
)
===
0
)
{
if
(
nextElement
.
_prevClass
&&
nextElement
.
_prevClass
.
indexOf
(
'h-bottom-tab'
)
===
0
)
{
let
height
=
nextElement
.
clientHeight
if
(
detectOS
()
===
'ios'
&&
height
>
Math
.
ceil
(
vm
.
fontSize
*
0.88
))
{
nextHeight
+=
0
}
else
{
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
nextHeight
+=
vm
.
fontSize
*
0.68
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
nextHeight
+=
vm
.
fontSize
*
0.68
}
}
}
}
}
nextElement
=
nextElement
.
nextElementSibling
nextElement
=
nextElement
.
nextElementSibling
}
}
}
while
(
nextElement
)
}
while
(
nextElement
)
...
...
packages/components/Modal/Modal.vue
View file @
b976c23a
<
template
>
<
template
>
<!--
<transition
:name=
"transition"
>
-->
<!--
<transition
:name=
"transition"
>
-->
<div
v-show=
"showModal"
:class=
"active"
class=
"modal-backdrop"
@
touchstart
=
"hideModal"
>
<div
v-show=
"showModal"
:class=
"active"
class=
"modal-backdrop"
@
click
.
capture
=
"hideModal"
>
<div
class=
"modal-backdrop-bg"
/>
<div
class=
"modal-backdrop-bg"
/>
<div
<div
:class=
"[modalClass,
cusClass
]"
:class=
"[modalClass,
transition
]"
class=
"modal
slide-in-up
"
class=
"modal"
@
touchstart=
"start"
@
touchstart=
"start"
@
mousedown=
"start"
>
@
mousedown=
"start"
>
<slot/>
<slot/>
...
@@ -19,7 +19,7 @@ export default {
...
@@ -19,7 +19,7 @@ export default {
value
:
Boolean
,
// eslint-disable-line
value
:
Boolean
,
// eslint-disable-line
position
:
{
position
:
{
type
:
String
,
type
:
String
,
default
:
'
bottom
'
,
default
:
'
top
'
,
},
},
cusClass
:
{
cusClass
:
{
type
:
String
,
type
:
String
,
...
@@ -34,7 +34,12 @@ export default {
...
@@ -34,7 +34,12 @@ export default {
},
},
computed
:
{
computed
:
{
transition
()
{
transition
()
{
return
this
.
position
===
'bottom'
?
'slide-in-up'
:
'slide-in-down'
return
{
'slide-in-up'
:
this
.
position
===
'top'
,
'slide-in-down'
:
this
.
position
===
'bottom'
,
'slide-in-left'
:
this
.
position
===
'left'
,
'slide-in-right'
:
this
.
position
===
'right'
,
}
},
},
active
()
{
active
()
{
return
this
.
showModal
?
'active'
:
'hide'
return
this
.
showModal
?
'active'
:
'hide'
...
@@ -59,7 +64,7 @@ export default {
...
@@ -59,7 +64,7 @@ export default {
this
.
state
=
2
this
.
state
=
2
setTimeout
(()
=>
{
setTimeout
(()
=>
{
},
400
)
},
400
)
},
5
0
)
},
10
0
)
},
},
showModal
(
val
)
{
showModal
(
val
)
{
// 标签用法时需要发射一个input事件,修改v-model绑定的属性值
// 标签用法时需要发射一个input事件,修改v-model绑定的属性值
...
@@ -72,14 +77,23 @@ export default {
...
@@ -72,14 +77,23 @@ export default {
},
},
start
(
e
)
{
start
(
e
)
{
e
.
stopPropagation
()
//
e.stopPropagation()
},
},
hideModal
()
{
hideModal
(
e
)
{
if
(
!
e
){
this
.
state
=
3
this
.
state
=
3
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
state
=
0
this
.
state
=
0
this
.
showModal
=
false
this
.
showModal
=
false
},
250
)
},
250
)
}
if
(
e
&&
e
.
target
&&
e
.
target
.
className
.
indexOf
(
'modal-backdrop'
)
===
0
){
this
.
state
=
3
setTimeout
(()
=>
{
this
.
state
=
0
this
.
showModal
=
false
},
250
)
}
},
},
},
},
}
}
...
...
packages/components/Scroll/index.vue
View file @
b976c23a
...
@@ -188,6 +188,9 @@ export default {
...
@@ -188,6 +188,9 @@ export default {
bubbleY
:
0
,
// 气泡y坐标,
bubbleY
:
0
,
// 气泡y坐标,
isIos
:
false
,
isIos
:
false
,
fullScreen
:
true
,
fullScreen
:
true
,
fontSize
:
Number
(
window
.
document
.
documentElement
.
style
.
fontSize
.
replace
(
'px'
,
''
)),
winHeight
:
window
.
innerHeight
,
winWidth
:
window
.
innerWidth
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -232,6 +235,60 @@ export default {
...
@@ -232,6 +235,60 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
getHeaderHeight
()
{
let
vm
=
this
let
$el
=
vm
.
$el
.
previousElementSibling
let
headerHeight
=
0
do
{
if
(
$el
)
{
let
elHeight
=
window
.
getComputedStyle
(
$el
).
height
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
headerHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
if
(
$el
.
_prevClass
&&
$el
.
_prevClass
.
indexOf
(
'h-header'
)
===
0
)
{
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
headerHeight
+=
0.8
*
vm
.
fontSize
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
headerHeight
+=
0.8
*
vm
.
fontSize
}
else
if
(
detectOS
()
===
'ios'
)
{
headerHeight
+=
0.4
*
vm
.
fontSize
}
}
$el
=
$el
.
previousElementSibling
}
}
while
(
$el
)
return
headerHeight
},
getNextElementHeight
()
{
let
vm
=
this
let
nextElement
=
this
.
$el
.
nextElementSibling
let
nextHeight
=
0
do
{
if
(
nextElement
)
{
let
elHeight
=
window
.
getComputedStyle
(
nextElement
).
height
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
if
(
elHeight
&&
part
.
test
(
elHeight
))
{
nextHeight
+=
Number
(
elHeight
.
replace
(
'px'
,
''
))
}
if
(
nextElement
.
_prevClass
&&
nextElement
.
_prevClass
.
indexOf
(
'h-bottom-tab'
)
===
0
)
{
let
height
=
nextElement
.
clientHeight
if
(
detectOS
()
===
'ios'
&&
height
>
Math
.
ceil
(
vm
.
fontSize
*
0.88
))
{
nextHeight
+=
0
}
else
{
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
375
&&
vm
.
winHeight
===
812
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
}
else
if
(
detectOS
()
===
'ios'
&&
vm
.
winWidth
===
414
&&
vm
.
winHeight
===
896
)
{
nextHeight
+=
vm
.
fontSize
*
0.68
}
}
}
nextElement
=
nextElement
.
nextElementSibling
}
}
while
(
nextElement
)
return
nextHeight
},
// 初始化scroll
// 初始化scroll
initScroll
()
{
initScroll
()
{
let
vm
=
this
let
vm
=
this
...
@@ -239,7 +296,10 @@ export default {
...
@@ -239,7 +296,10 @@ export default {
// 设置scrollContent的最小高,实现高度不足时也有回弹效果
// 设置scrollContent的最小高,实现高度不足时也有回弹效果
if
(
this
.
$refs
.
scrollContent
)
{
if
(
this
.
$refs
.
scrollContent
)
{
const
headerHeight
=
vm
.
getHeaderHeight
()
// const nextHeight = vm.getNextElementHeight()
this
.
$refs
.
scrollContent
.
style
.
minHeight
=
`
${
this
.
$refs
.
scroll
.
getBoundingClientRect
().
height
+
1
}
px`
this
.
$refs
.
scrollContent
.
style
.
minHeight
=
`
${
this
.
$refs
.
scroll
.
getBoundingClientRect
().
height
+
1
}
px`
this
.
$refs
.
scrollContent
.
style
.
paddingTop
=
`
${
headerHeight
}
px`
if
(
vm
.
hasFoot
.
footFlag
)
{
if
(
vm
.
hasFoot
.
footFlag
)
{
let
height
=
vm
.
hasFoot
.
height
||
88
let
height
=
vm
.
hasFoot
.
height
||
88
// this.$refs.scrollContent.style.minHeight = `${this.$refs.scroll.getBoundingClientRect().height - height}px`
// this.$refs.scrollContent.style.minHeight = `${this.$refs.scroll.getBoundingClientRect().height - height}px`
...
@@ -406,9 +466,10 @@ export default {
...
@@ -406,9 +466,10 @@ export default {
//$ = vue-better-scroll
//$ = vue-better-scroll
.vue-better-scroll {
.vue-better-scroll {
width 100%
width 100%
overflow hidden
overflow hidden
!important
box-sizing border-box
box-sizing border-box
position relative
position absolute !important
top 0
height 100%
height 100%
&__wrapper {
&__wrapper {
...
@@ -422,7 +483,7 @@ export default {
...
@@ -422,7 +483,7 @@ export default {
text-size-adjust: none;
text-size-adjust: none;
-webkit-transform-origin: left top;
-webkit-transform-origin: left top;
transform-origin: left top;
transform-origin: left top;
padding-bottom: 0.
9
rem;
padding-bottom: 0.
4
rem;
}
}
&__pullup {
&__pullup {
...
@@ -461,20 +522,24 @@ export default {
...
@@ -461,20 +522,24 @@ export default {
}
}
}
}
}
}
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 1rem;
}
}
.platform-ios{
.platform-ios{
.
vue-better-scroll
{
.
has-footer
{
&
__wrapper {
.vue-better-scroll
__wrapper {
// padding-bottom: 2.16
rem;
padding-bottom: 1
rem;
}
}
}
}
}
}
// iPhoneX适配
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
.platform-ios {
.
vue-better-scroll
{
.
has-footer
{
&
__wrapper {
.vue-better-scroll
__wrapper {
// padding-bottom: 2.84
rem;
padding-bottom: 1.8
rem;
}
}
}
}
}
}
...
@@ -483,9 +548,9 @@ export default {
...
@@ -483,9 +548,9 @@ export default {
// iPhoneX Max适配
// iPhoneX Max适配
@media (device-width: 414px) and (device-height: 896px) {
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
.platform-ios {
.
vue-better-scroll
{
.
has-footer
{
&
__wrapper {
.vue-better-scroll
__wrapper {
// padding-bottom: 2.84
rem;
padding-bottom: 1.8
rem;
}
}
}
}
}
}
...
...
src/scripts/filter.js
View file @
b976c23a
...
@@ -2,7 +2,7 @@ export default (Vue) => {
...
@@ -2,7 +2,7 @@ export default (Vue) => {
Vue
.
filter
(
'currency'
,
function
(
val
)
{
Vue
.
filter
(
'currency'
,
function
(
val
)
{
if
(
!
val
)
return
'0.00'
if
(
!
val
)
return
'0.00'
var
intPart
=
Number
(
val
).
toFixed
(
0
)
// 获取整数部分
var
intPart
=
parseInt
(
Number
(
val
)
)
// 获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
)
// 将整数部分逢三一断
var
floatPart
=
'.00'
// 预定义小数部分
var
floatPart
=
'.00'
// 预定义小数部分
...
...
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