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
658e001d
Commit
658e001d
authored
Sep 08, 2021
by
nature
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹框修改
parent
d7a8a4ef
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
16034 additions
and
84 deletions
+16034
-84
package-lock.json
package-lock.json
+14997
-0
hlsPopup.js
packages/common/scripts/hlsPopup.js
+18
-0
app.core.less
packages/common/styles/app.core.less
+1
-1
public-style.less
packages/common/styles/public-style.less
+11
-6
confirm.vue
packages/components/Confirm/confirm.vue
+130
-0
index.js
packages/components/Confirm/index.js
+66
-0
index.vue
packages/components/HContent/index.vue
+36
-31
index.vue
packages/components/Scroll/index.vue
+43
-40
index.vue.bak
packages/components/Scroll/index.vue.bak
+578
-0
index.js
packages/index.js
+2
-1
App.vue
src/App.vue
+0
-1
hlsPopup.vue
src/pages/hlsPopup.vue
+12
-2
home.vue
src/pages/home.vue
+2
-2
test.html
src/test.html
+138
-0
No files found.
package-lock.json
0 → 100644
View file @
658e001d
This diff is collapsed.
Click to expand it.
packages/common/scripts/hlsPopup.js
View file @
658e001d
...
...
@@ -16,6 +16,8 @@ Vue.use(LoadingPlugin)
Vue
.
use
(
DatetimePlugin
)
Vue
.
use
(
NumberKeyboard
)
import
confirm
from
'../../components/Confirm/index'
// Vue.prototype.HlsModal = window.HlsModal = HlsModal
/**
...
...
@@ -130,6 +132,22 @@ export function showError (content = '', time = 2000) {
* @param confirmObject.onConfirm 确定函数
*/
export
function
showConfirm
(
confirmObject
)
{
let
def
=
{
title
:
confirmObject
.
title
||
'提示'
,
content
:
confirmObject
.
content
||
''
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
confirmObject
.
onConfirm
(
1
)
},
onCancel
:
()
=>
{
confirmObject
.
onConfirm
(
0
)
},
}
confirm
.
confirmShow
(
def
)
}
export
function
showConfirmVux
(
confirmObject
)
{
let
def
=
{
title
:
confirmObject
.
title
||
'提示'
,
content
:
confirmObject
.
content
||
''
,
...
...
packages/common/styles/app.core.less
View file @
658e001d
...
...
@@ -2,7 +2,7 @@
@import "animate";
@import "variables";
@import "ionic";
@import 'public
S
tyle';
@import 'public
-s
tyle';
@import "ionic-public-style";
@import "platform-ios";
@import "platform-iosx";
packages/common/styles/public
S
tyle.less
→
packages/common/styles/public
-s
tyle.less
View file @
658e001d
...
...
@@ -34,7 +34,9 @@
background: rgba(0, 0, 0, 0.3) !important;
}
.weui-toast .weui-loading{
animation: vue-loading 1s steps(12, end) infinite !important;
animation: vue-loading 1s steps(8, end) infinite !important;
background: transparent url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTZweCIgaGVpZ2h0PSI1NnB4IiB2aWV3Qm94PSIwIDAgNTYgNTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+bG9hZGluZ0AyeDwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8ZmlsdGVyIGlkPSJmaWx0ZXItMSI+CiAgICAgICAgICAgIDxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VHcmFwaGljIiB0eXBlPSJtYXRyaXg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M5MDYyNSA4LjMyMTg3NSw4LjA1MzkwNjI1IEM1LjM5ODIxNzYxLDguMDUzOTA2MjUgMy4wMjgxMjUsMTAuNDIzOTk4OSAzLjAyODEyNSwxMy4zNDc2NTYyIFoiIGlkPSLot6/lvoQiIGZpbGw9IiNBQUFBQUEiIGZpbGwtcnVsZT0ibm9uemVybyIgb3BhY2l0eT0iMC45MDE2NzczOSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTcuNDIxODc1LDYuMjg3NSBDMTcuNDIxODc1LDkuMzQ3MDcxMjIgMTkuOTAyMTQ3NSwxMS44MjczNDM4IDIyLjk2MTcxODcsMTEuODI3MzQzOCBDMjYuMDIxMjksMTEuODI3MzQzOCAyOC41MDE1NjI1LDkuMzQ3MDcxMjIgMjguNTAxNTYyNSw2LjI4NzUgQzI4LjUwMTU2MjUsMy4yMjc5Mjg3OCAyNi4wMjEyOSwwLjc0NzY1NjI1IDIyLjk2MTcxODcsMC43NDc2NTYyNSBDMTkuOTAyMTQ3NSwwLjc0NzY1NjI1IDE3LjQyMTg3NSwzLjIyNzkyODc4IDE3LjQyMTg3NSw2LjI4NzUgWiIgaWQ9Iui3r+W+hCIgZmlsbD0iI0FBQUFBQSIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K) no-repeat;
background-size: 100%;
}
.weui-loading_toast .weui-toast__content {
...
...
@@ -43,7 +45,8 @@
.weui-toast {
//width: 6em !important;
min-width: 6em;
min-width: 60px;
width: 65px !important;
max-width: 14em;
min-height: 3em !important;
top: 38% !important;
...
...
@@ -65,13 +68,14 @@
}
.weui-icon_toast.weui-loading {
width: 3
2
px !important;
height: 3
2
px !important;
width: 3
4
px !important;
height: 3
4
px !important;
}
.weui-toast__content {
//margin: 0 0 30px !important;
font-size: 14px !important;
font-size: 12px !important;
font-weight: 500;
margin: 10px 0 !important;
}
.weui-toast_text .weui-toast__content {
...
...
@@ -121,6 +125,7 @@
}
.weui-dialog {
height: fit-content;
width: 70% !important;
max-width: 260px !important;
border-radius: 10px !important;
...
...
packages/components/Confirm/confirm.vue
0 → 100644
View file @
658e001d
/**
* @Author think
* @Date 9/2/21 5:19 PM
*/
<
template
>
<div
v-show=
"showValue"
class=
"modal-backdrop"
>
<section
class=
"h-confirm"
>
<div
v-if=
"!!title"
class=
"confirm_hd"
>
<strong
class=
"confirm__title"
>
{{
title
}}
</strong>
</div>
<template
v-if=
"showContent"
>
<div
class=
"confirm__bd"
>
<slot><div
v-html=
"content"
/></slot>
</div>
</
template
>
<div
class=
"confirm__ft vue-1px-t"
>
<a
v-if=
"showCancelButton"
href=
"javascript:;"
class=
"confirm__btn confirm__btn_default"
@
click=
"_onCancel"
>
{{ cancelText }}
</a>
<a
v-if=
"showConfirmButton"
href=
"javascript:;"
class=
"confirm__btn"
@
click=
"_onConfirm"
>
{{ confirmText }}
</a>
</div>
</section>
</div>
</template>
<
script
>
export
default
{
name
:
'Confirm'
,
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
,
},
title
:
{
type
:
String
,
default
:
null
,
},
content
:
{
type
:
String
,
default
:
null
,
},
showContent
:
{
type
:
Boolean
,
default
:
true
,
},
confirmText
:
{
type
:
String
,
default
:
'确定'
,
},
cancelText
:
{
type
:
String
,
default
:
'取消'
,
},
showCancelButton
:
{
type
:
Boolean
,
default
:
true
,
},
showConfirmButton
:
{
type
:
Boolean
,
default
:
true
,
},
},
data
()
{
return
{
showValue
:
false
,
}
},
watch
:
{
value
(
val
)
{
this
.
showValue
=
val
},
showValue
(
val
)
{
this
.
$emit
(
'input'
,
val
)
this
.
$emit
(
'on-show'
)
// emit just after msg is cleared
},
},
created
()
{
if
(
this
.
value
)
{
this
.
showValue
=
this
.
value
}
},
methods
:
{
_onConfirm
()
{
let
vm
=
this
vm
.
$emit
(
'on-confirm'
)
this
.
showValue
=
false
},
_onCancel
()
{
let
vm
=
this
vm
.
$emit
(
'on-cancel'
)
vm
.
showValue
=
false
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
.modal-backdrop{
z-index: 9999;
}
.h-confirm{
max-width: 80vw;
width: 75vw;
height: auto;
margin: auto;
background-color: #fff;
text-align: center;
border-radius: 8px;
.confirm_hd{
padding: 1.5em 1.6em .5em;
.confirm__title{
font-size: 16px;
}
}
.confirm__bd{
padding: 0 1.6em .8em;
min-height: 10.667vw;
font-size: 14px;
line-height: 1.3;
word-wrap: break-word;
word-break: break-all;
color: #999;
}
.confirm__ft{
display: flex;
position: relative;
line-height: 44px;
font-size: 16px
}
}
</
style
>
packages/components/Confirm/index.js
0 → 100644
View file @
658e001d
import
ConfirmComponent
from
'./confirm'
import
Vue
from
'vue'
import
elementUtil
from
'../../common/scripts/elementUtil'
let
$vm
const
mergeOptions
=
function
(
$vm
,
options
)
{
const
defaults
=
{}
for
(
let
i
in
$vm
.
$options
.
props
)
{
if
(
i
!==
'value'
)
{
defaults
[
i
]
=
$vm
.
$options
.
props
[
i
].
default
}
}
const
_options
=
Object
.
assign
({},
defaults
,
options
)
for
(
let
i
in
_options
)
{
$vm
[
i
]
=
_options
[
i
]
}
}
const
confirm
=
{
install
()
{
elementUtil
.
createElement
(
'hls-confirm'
)
$vm
=
new
Vue
(
ConfirmComponent
)
$vm
.
$mount
(
'[hls-confirm]'
)
},
confirmShow
(
options
)
{
this
.
install
()
setTimeout
(()
=>
{
if
(
typeof
options
===
'object'
)
{
mergeOptions
(
$vm
,
options
)
}
if
(
typeof
options
===
'object'
&&
(
options
.
onShow
||
options
.
onHide
))
{
options
.
onShow
&&
options
.
onShow
()
}
this
.
$watcher
&&
this
.
$watcher
()
this
.
$watcher
=
$vm
.
$watch
(
'showValue'
,
(
val
)
=>
{
if
(
!
val
&&
options
&&
options
.
onHide
)
{
options
.
onHide
()
}
if
(
val
===
false
)
{
document
.
body
.
removeChild
(
$vm
.
$el
)
}
})
$vm
.
$off
(
'on-cancel'
)
$vm
.
$off
(
'on-confirm'
)
$vm
.
$on
(
'on-cancel'
,
()
=>
{
options
&&
options
.
onCancel
&&
options
.
onCancel
()
})
$vm
.
$on
(
'on-confirm'
,
msg
=>
{
options
&&
options
.
onConfirm
&&
options
.
onConfirm
(
msg
)
})
$vm
.
showValue
=
true
},
100
)
},
confirmHide
()
{
$vm
.
showValue
=
false
document
.
body
.
removeChild
(
$vm
.
$el
)
},
}
export
default
confirm
packages/components/HContent/index.vue
View file @
658e001d
...
...
@@ -29,9 +29,9 @@ export default {
}
},
update
()
{
if
(
this
.
calContent
)
{
this
.
resizeHeight
()
}
//
if (this.calContent) {
//
this.resizeHeight()
//
}
},
methods
:
{
getHeaderHeight
()
{
...
...
@@ -40,19 +40,22 @@ export default {
let
headerHeight
=
0
do
{
if
(
$el
)
{
let
elHeight
=
window
.
getComputedStyle
(
$el
).
height
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
// let elHeight = window.getComputedStyle($el).offsetHeight
headerHeight
+=
$el
.
offsetHeight
/* let part = /^\d+(\.\d+)?px$/
if (elHeight && part.test(elHeight)) {
headerHeight += Number(elHeight.replace('px', ''))
}
let
paddingTopHeight
=
window
.
getComputedStyle
(
$el
).
paddingTop
} else {
headerHeight = elHeight
} */
/* let paddingTopHeight = window.getComputedStyle($el).paddingTop
let paddingBottomHeight = window.getComputedStyle($el).paddingBottom
if (paddingTopHeight && part.test(paddingTopHeight)) {
headerHeight += Number(paddingTopHeight.replace('px', ''))
}
if (paddingBottomHeight && part.test(paddingBottomHeight)) {
headerHeight += Number(paddingBottomHeight.replace('px', ''))
}
}
*/
$el
=
$el
.
previousElementSibling
}
}
while
(
$el
)
...
...
@@ -67,41 +70,43 @@ export default {
if
(
nextElement
)
{
let
position
=
window
.
getComputedStyle
(
nextElement
).
position
if
(
position
!==
'fixed'
)
{
let
elHeight
=
window
.
getComputedStyle
(
nextElement
).
height
let
part
=
/^
\d
+
(\.\d
+
)?
px$/
// let elHeight = window.getComputedStyle(nextElement).offsetHeight
nextHeight
+=
nextElement
.
offsetHeight
/* let part = /^\d+(\.\d+)?px$/
if (elHeight && part.test(elHeight)) {
nextHeight += Number(elHeight.replace('px', ''))
}
//let paddingTopHeight = window.getComputedStyle(nextElement).paddingTop
//let paddingBottomHeight = window.getComputedStyle(nextElement).paddingBottom
//if (paddingTopHeight && part.test(paddingTopHeight)) {
} else {
nextHeight = elHeight
} */
// let paddingTopHeight = window.getComputedStyle(nextElement).paddingTop
// let paddingBottomHeight = window.getComputedStyle(nextElement).paddingBottom
// if (paddingTopHeight && part.test(paddingTopHeight)) {
// nextHeight += Number(paddingTopHeight.replace('px', ''))
//}
//if (paddingBottomHeight && part.test(paddingBottomHeight)) {
//
}
//
if (paddingBottomHeight && part.test(paddingBottomHeight)) {
// nextHeight += Number(paddingBottomHeight.replace('px', ''))
//}
//
}
}
nextElement
=
nextElement
.
nextElementSibling
}
}
while
(
nextElement
)
return
nextHeight
},
resizeHeight
()
{
async
resizeHeight
()
{
let
vm
=
this
this
.
$nextTick
(()
=>
{
const
headerHeight
=
vm
.
getHeaderHeight
()
const
nextHeight
=
vm
.
getNextElementHeight
()
let
windowHeight
=
window
.
innerHeight
||
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
let
windowWidth
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
await
this
.
$nextTick
()
const
headerHeight
=
vm
.
getHeaderHeight
()
const
nextHeight
=
vm
.
getNextElementHeight
()
let
windowHeight
=
window
.
innerHeight
||
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
let
windowWidth
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
if
(
windowWidth
>
windowHeight
)
{
this
.
orientation
=
'landscape'
}
else
{
this
.
orientation
=
'portrait'
}
let
content
=
vm
.
$el
content
.
style
.
height
=
windowHeight
-
headerHeight
-
nextHeight
+
'px'
})
if
(
windowWidth
>
windowHeight
)
{
this
.
orientation
=
'landscape'
}
else
{
this
.
orientation
=
'portrait'
}
let
content
=
vm
.
$el
content
.
style
.
height
=
windowHeight
-
headerHeight
-
nextHeight
+
'px'
},
},
}
...
...
packages/components/Scroll/index.vue
View file @
658e001d
...
...
@@ -5,8 +5,7 @@
*/
<
template
>
<div
ref=
"scroll"
:class=
"[c(),
{'h-ios': isIos}]" class="content scroll-content">
<div
ref=
"scroll"
:class=
"[c(),
{'h-ios': isIos}]">
<div
:class=
"c('__wrapper')"
>
<div
ref=
"scrollContent"
class=
"scrollContent"
>
<slot/>
...
...
@@ -224,7 +223,7 @@ export default {
this
.
fullScreen
&&
detectOS
()
===
'ios'
&&
(
this
.
isIos
=
true
)
},
async
mounted
()
{
this
.
pullDownInitTop
=
parseInt
(
this
.
$refs
.
pulldown
&&
getComputedStyle
(
this
.
$refs
.
pulldown
).
top
)
||
-
6
0
this
.
pullDownInitTop
=
parseInt
(
this
.
$refs
.
pulldown
&&
getComputedStyle
(
this
.
$refs
.
pulldown
).
top
)
||
-
1
0
await
this
.
$nextTick
()
this
.
initScroll
()
...
...
@@ -242,19 +241,20 @@ export default {
let
headerHeight
=
0
do
{
if
(
$el
)
{
let
elHeight
=
window
.
getComputedStyle
(
$el
).
height
headerHeight
+=
vm
.
$el
.
offsetHeight
/* let elHeight = window.getComputedStyle($el).height
let part = /^\d+(\.\d+)?px$/
if (elHeight && part.test(elHeight)) {
headerHeight += Number(elHeight.replace('px', ''))
}
let
paddingTopHeight
=
window
.
getComputedStyle
(
$el
).
paddingTop
let
paddingBottomHeight
=
window
.
getComputedStyle
(
$el
).
paddingBottom
if
(
paddingTopHeight
&&
part
.
test
(
paddingTopHeight
))
{
headerHeight
+=
Number
(
paddingTopHeight
.
replace
(
'px'
,
''
))
}
if
(
paddingBottomHeight
&&
part
.
test
(
paddingBottomHeight
))
{
headerHeight
+=
Number
(
paddingBottomHeight
.
replace
(
'px'
,
''
))
let marginTopHeight = window.getComputedStyle($el).marginTop
let marginBottomHeight = window.getComputedStyle($el).marginBottom
if (marginTopHeight && part.test(marginTopHeight)) {
headerHeight += Number(marginTopHeight.replace('px', ''))
}
if (marginBottomHeight && part.test(marginBottomHeight)) {
headerHeight += Number(marginBottomHeight.replace('px', ''))
} */
$el
=
$el
.
previousElementSibling
}
}
while
(
$el
)
...
...
@@ -268,20 +268,21 @@ export default {
do
{
if
(
nextElement
)
{
let
position
=
window
.
getComputedStyle
(
nextElement
).
position
if
(
position
===
'fixed'
)
{
let
elHeight
=
window
.
getComputedStyle
(
nextElement
).
height
if
(
position
!==
'fixed'
)
{
nextHeight
+=
vm
.
$el
.
offsetHeight
/* let elHeight = window.getComputedStyle(nextElement).height
let part = /^\d+(\.\d+)?px$/
if (elHeight && part.test(elHeight)) {
nextHeight += Number(elHeight.replace('px', ''))
}
let
paddingTopHeight
=
window
.
getComputedStyle
(
nextElement
).
paddingTop
let
paddingBottomHeight
=
window
.
getComputedStyle
(
nextElement
).
paddingBottom
if
(
paddingTopHeight
&&
part
.
test
(
paddingTopHeight
))
{
nextHeight
+=
Number
(
paddingTopHeight
.
replace
(
'px'
,
''
))
}
if
(
paddingBottomHeight
&&
part
.
test
(
paddingBottomHeight
))
{
nextHeight
+=
Number
(
paddingBottomHeight
.
replace
(
'px'
,
''
))
let marginTopHeight = window.getComputedStyle(nextElement).marginTop
let marginBottomHeight = window.getComputedStyle(nextElement).marginBottom
if (marginTopHeight && part.test(marginTopHeight)) {
nextHeight += Number(marginTopHeight.replace('px', ''))
}
if (marginBottomHeight && part.test(marginBottomHeight)) {
nextHeight += Number(marginBottomHeight.replace('px', ''))
} */
}
nextElement
=
nextElement
.
nextElementSibling
}
...
...
@@ -292,13 +293,14 @@ export default {
initScroll
()
{
let
vm
=
this
if
(
!
this
.
$refs
.
scroll
)
return
const
headerHeight
=
vm
.
getHeaderHeight
()
const
nextHeight
=
vm
.
getNextElementHeight
()
this
.
$refs
.
scroll
.
style
.
height
=
`
${
this
.
$refs
.
scroll
.
getBoundingClientRect
().
height
-
headerHeight
-
nextHeight
}
px`
// 设置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
.
paddingTop
=
`
${
headerHeight
}
px`
this
.
$refs
.
scrollContent
.
style
.
minHeight
=
`
${
this
.
$refs
.
scroll
.
getBoundingClientRect
().
height
}
px`
//
this.$refs.scrollContent.style.paddingTop = `${headerHeight}px`
if
(
vm
.
hasFoot
.
footFlag
)
{
let
height
=
vm
.
hasFoot
.
height
||
88
// this.$refs.scrollContent.style.minHeight = `${this.$refs.scroll.getBoundingClientRect().height - height}px`
...
...
@@ -473,8 +475,8 @@ export default {
width 100%
overflow hidden !important
box-sizing border-box
position
absolut
e
top 0
position
relativ
e
//
top 0
height 100%
&__wrapper {
...
...
@@ -505,6 +507,7 @@ export default {
position absolute
left 0
top 0; /*no*/
z-index -5
width 100%
display flex
justify-content center
...
...
@@ -532,24 +535,24 @@ export default {
padding-bottom: 50px;
}
}
.platform-ios{
.vue-better-scroll{
&__pulldown {
padding-top:4px
}
}
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 50px;
}
}
}
.platform-ios{
.vue-better-scroll{
&__pulldown {
//
padding-top:4px
}
}
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 50px;
}
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
.vue-better-scroll{
&__pulldown {
padding-top:24px
//
padding-top:24px
}
}
.has-footer {
...
...
@@ -565,7 +568,7 @@ export default {
.platform-ios {
.vue-better-scroll{
&__pulldown {
padding-top:24px
//
padding-top:24px
}
}
.has-footer {
...
...
packages/components/Scroll/index.vue.bak
0 → 100755
View file @
658e001d
This diff is collapsed.
Click to expand it.
packages/index.js
View file @
658e001d
...
...
@@ -42,7 +42,7 @@ import NumberKeyboardPlugin from './components/NumberKeyboard/index'
// styles
import
appStyle
from
'./common/styles/app.core.less'
import
{
showLoading
,
hideLoading
,
showLongTop
,
showLongCenter
,
showLongBottom
,
showSuccess
,
showError
,
showConfirm
,
showPopup
,
showActionSheet
,
showTime
,
showBigPicture
,
selectList
,
showNumberKeyboard
,
showNotify
}
from
'./common/scripts/hlsPopup'
import
{
showLoading
,
hideLoading
,
showLongTop
,
showLongCenter
,
showLongBottom
,
showSuccess
,
showError
,
showConfirm
,
show
ConfirmVux
,
show
Popup
,
showActionSheet
,
showTime
,
showBigPicture
,
selectList
,
showNumberKeyboard
,
showNotify
}
from
'./common/scripts/hlsPopup'
import
elementUtil
from
'./common/scripts/elementUtil'
import
filter
from
'./common/scripts/filter'
import
directives
from
'./common/scripts/directives'
...
...
@@ -59,6 +59,7 @@ const hlsPopup = {
showSuccess
,
showError
,
showConfirm
,
showConfirmVux
,
showPopup
,
showActionSheet
,
showTime
,
...
...
src/App.vue
View file @
658e001d
...
...
@@ -68,7 +68,6 @@ export default {
</
script
>
<
style
lang=
"less"
>
@import "../packages/common/styles/publicStyle";
html, body, #app {
height: 100%;
width: 100%;
...
...
src/pages/hlsPopup.vue
View file @
658e001d
...
...
@@ -35,6 +35,7 @@
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showSuccess"
>
showSuccess
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showError"
>
showError
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showConfirm"
>
showConfirm
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showConfirmVux"
>
showConfirmVux
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showPopup"
>
showPopup
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showActionSheet"
>
showActionSheet
</h-button>
<h-button
class=
"button-class"
type=
"primary"
@
click
.
native=
"showActionSheetButton"
>
showActionSheet 区分按钮颜色
...
...
@@ -348,7 +349,7 @@ export default {
}).then((modal) => {
this.modal = modal;
}) */
this
.
$refs
.
scrollList
.
update
(
true
)
//
this.$refs.scrollList.update(true)
},
methods
:
{
scrollListen
(
e
)
{
...
...
@@ -391,7 +392,7 @@ export default {
// console.log(`change: ${i}`)
},
showLoading
()
{
this
.
hlsPopup
.
showLoading
(
'请稍等!'
)
this
.
hlsPopup
.
showLoading
(
'请稍等!'
,
3000000
)
},
hideLoading
()
{
this
.
hlsPopup
.
hideLoading
()
...
...
@@ -420,6 +421,15 @@ export default {
},
})
},
showConfirmVux
()
{
this
.
hlsPopup
.
showConfirmVux
({
title
:
'确定退出'
,
content
:
'退出后需从新登录'
,
onConfirm
:
function
(
index
)
{
alert
(
index
)
},
})
},
showPopup
()
{
this
.
hlsPopup
.
showPopup
({
title
:
'确定退出'
,
...
...
src/pages/home.vue
View file @
658e001d
...
...
@@ -113,8 +113,8 @@ export default {
height
:
''
,
decimal
:
false
,
rangeValue
:
40
,
min
:
2
0
,
max
:
8
0
,
min
:
0
,
max
:
10
0
,
step
:
10
,
disabled
:
false
,
disabledOpacity
:
0.5
,
...
...
src/test.html
0 → 100644
View file @
658e001d
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
</head>
<script
src=
"https://common.cnblogs.com/scripts/jquery-2.2.0.min.js?callback=callbask"
>
function
queryInfo
(){
let
obj
=
{
name
:
'zhangsan'
,
age
:
'14'
}
callbask
(
obj
)
}
</script>
<body
style=
"height: 3000px"
>
<input>
</body>
<script>
function
callbask
(
res
){
console
.
log
(
res
)
}
let
input
=
document
.
querySelector
(
'input'
)
let
timeid
=
null
/*input.oninput=function(){
console.log(this.value)
}*/
/*input.oninput=function(){
//todo
if(timeid){
clearTimeout(timeid)
}
timeid = setTimeout(()=>{
//todo
/!*search();
submit()*!/
console.log(this.value)
},500)
}*/
input
.
oninput
=
debounce
(
function
(){
console
.
log
(
this
.
value
)
},
500
)
function
debounce
(
fun
,
await
){
let
timeid
=
null
return
function
()
{
if
(
timeid
)
{
clearTimeout
(
timeid
)
}
timeid
=
setTimeout
(()
=>
{
fun
.
apply
(
this
)
},
await
)
}
}
function
throttle
(
fun
,
await
)
{
let
timeid
=
null
return
function
()
{
if
(
!
timeid
)
{
timeid
=
setTimeout
(()
=>
{
fun
.
apply
(
this
)
timeid
=
null
},
await
)
}
}
}
/*window.onscroll=function(){
console.log('页面滚动')
}*/
let
timeOutId
=
null
/*window.onscroll=function(){
if(!timeOutId){
timeOutId = setTimeout(()=>{
console.log('页面滚动')
timeOutId=null
},500)
}
}*/
window
.
onscroll
=
throttle
(
function
(){
console
.
log
(
'页面滚动'
)
},
500
)
let
age
=
Object
.
freeze
()
/* function debounce(func, wait=0) {
let timeid = null;
return function() {
let args = arguments;
if (timeid) {
clearTimeout(timeid);
}
timeid = setTimeout(()=> {
func.apply(this, args);
}, wait);
}
}
function throttle(func, delay) {
let timer = null;
return function() {
var args = arguments;
if (!timer) {
timer = setTimeout(()=> {
func.apply(this, args);
timer = null;
}, delay);
}
}
}*/
</script>
</html>
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