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
0db3a639
Commit
0db3a639
authored
Sep 25, 2020
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo
parent
b81c157d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
229 additions
and
29 deletions
+229
-29
webpack.base.conf.js
build/webpack.base.conf.js
+1
-1
PingFang.ttc
packages/common/fonts/PingFang.ttc
+0
-0
Times.ttc
packages/common/fonts/Times.ttc
+0
-0
app.core.less
packages/common/styles/app.core.less
+1
-0
fonts.less
packages/common/styles/fonts.less
+13
-0
ionic.less
packages/common/styles/ionic.less
+4
-4
README.md
packages/components/NumberKeyboard/README.md
+1
-1
demo.vue
packages/components/NumberKeyboard/demo.vue
+69
-0
index.js
packages/components/NumberKeyboard/index.js
+2
-2
index.vue
packages/components/NumberKeyboard/index.vue
+22
-12
demo.vue
packages/components/Progress/demo.vue
+35
-0
demo.vue
packages/components/Range/demo.vue
+69
-0
index.vue
packages/components/Switch/index.vue
+3
-6
demoRoute.js
packages/components/demoRoute.js
+6
-0
demo.vue
src/pages/demo.vue
+3
-3
No files found.
build/webpack.base.conf.js
View file @
0db3a639
...
@@ -57,7 +57,7 @@ let webpackConfig = {
...
@@ -57,7 +57,7 @@ let webpackConfig = {
}
}
},
},
{
{
test
:
/
\.(
woff2
?
|eot|ttf|otf
)(\?
.*
)?
$/
,
test
:
/
\.(
woff2
?
|eot|ttf|otf
|ttc
)(\?
.*
)?
$/
,
loader
:
'url-loader'
,
loader
:
'url-loader'
,
options
:
{
options
:
{
limit
:
1000
,
limit
:
1000
,
...
...
packages/common/fonts/PingFang.ttc
0 → 100644
View file @
0db3a639
File added
packages/common/fonts/Times.ttc
0 → 100644
View file @
0db3a639
File added
packages/common/styles/app.core.less
View file @
0db3a639
...
@@ -6,3 +6,4 @@
...
@@ -6,3 +6,4 @@
@import "ionic-public-style";
@import "ionic-public-style";
@import "platform-ios";
@import "platform-ios";
@import "platform-iosx";
@import "platform-iosx";
@import "fonts";
packages/common/styles/fonts.less
0 → 100644
View file @
0db3a639
@font-face {
font-family: "PingFang SC";
src: url("../fonts/PingFang.ttc")format("truetype");
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: "Times";
src: url("../fonts/Times.ttc")format("truetype");
font-style: normal;
font-weight: normal;
}
packages/common/styles/ionic.less
View file @
0db3a639
...
@@ -3792,7 +3792,7 @@ html {
...
@@ -3792,7 +3792,7 @@ html {
-moz-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-ms-user-select: none;
user-select: none;
user-select: none;
font-family: sans-serif;
font-family: sans-serif
,"PingFang SC"
;
/* 1 */
/* 1 */
-webkit-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
...
@@ -3953,7 +3953,7 @@ textarea {
...
@@ -3953,7 +3953,7 @@ textarea {
/* 3 */
/* 3 */
font-size: 100%;
font-size: 100%;
/* 2 */
/* 2 */
font-family: inherit;
font-family: inherit
,"PingFang SC"
;
/* 1 */
/* 1 */
outline-offset: 0;
outline-offset: 0;
/* 4 */
/* 4 */
...
@@ -4094,7 +4094,7 @@ body{
...
@@ -4094,7 +4094,7 @@ body{
width: 100%;
width: 100%;
overflow: hidden;
overflow: hidden;
font-size: .32rem;
font-size: .32rem;
font-family: -apple-system-font,sans-serif;
font-family: -apple-system-font,
"PingFang SC",
sans-serif;
-webkit-tap-highlight-color: transparent;
-webkit-tap-highlight-color: transparent;
-webkit-font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
}
}
...
@@ -4167,7 +4167,7 @@ h1, h2, h3, h4, h5, h6,
...
@@ -4167,7 +4167,7 @@ h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
.h1, .h2, .h3, .h4, .h5, .h6 {
color: #000;
color: #000;
font-weight: 500;
font-weight: 500;
font-family: "-apple-system
", "Helvetica Neue", "Roboto", "Segoe UI
", sans-serif;
font-family: "-apple-system
-font", "PingFang SC
", sans-serif;
line-height: 1.2;
line-height: 1.2;
}
}
...
...
packages/components/NumberKeyboard/README.md
View file @
0db3a639
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</list-item>
</list-item>
<number-keyboard
<number-keyboard
:show
=
"true"
v-model
=
"true"
title=
"数字键盘"
title=
"数字键盘"
extra-key=
"."
extra-key=
"."
@
input=
"onInput"
@
input=
"onInput"
...
...
packages/components/NumberKeyboard/demo.vue
0 → 100644
View file @
0db3a639
/**
* @Author think
* @Date 2020-09-03 09:54
*/
<
template
>
<h-view
title=
"NumberKeyboard"
>
<h-header>
<h-return
slot=
"left"
@
click
.
native=
"$routeGo()"
/>
<div
slot=
"center"
>
NumberKeyboard
</div>
</h-header>
<h-content>
<list-item>
<h-field
v-model=
"number"
readonly
label=
"数字"
@
click
.
native=
"keyboradShow"
/>
<h-field
v-model=
"number"
readonly
label=
"数字"
@
click
.
native=
"show"
/>
</list-item>
<number-keyboard
v-model=
"keyboardShow"
title=
"数字键盘"
extra-key=
"."
@
keyDown=
"onInput"
@
delete=
"onDelete"
@
show=
"show"
/>
</h-content>
</h-view>
</
template
>
<
script
>
export
default
{
name
:
'Demo'
,
data
()
{
return
{
number
:
0
,
keyboardShow
:
false
,
}
},
methods
:
{
show
(
e
)
{
debugger
},
keyboradShow
()
{
let
vm
=
this
vm
.
hlsPopup
.
showNumberKeyborad
({
title
:
'数字键盘'
,
keyDown
:
(
text
)
=>
{
vm
.
onInput
(
text
)
},
keyDelete
:
()
=>
{
vm
.
onDelete
()
},
})
},
onInput
(
value
)
{
this
.
number
+=
(
''
+
value
)
console
.
log
(
value
)
},
onDelete
()
{
this
.
number
=
''
console
.
log
(
'delete'
)
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
packages/components/NumberKeyboard/index.js
View file @
0db3a639
...
@@ -9,9 +9,9 @@ class VueKeyboard {
...
@@ -9,9 +9,9 @@ class VueKeyboard {
this
.
_vm
=
undefined
this
.
_vm
=
undefined
}
}
show
(
option
)
{
show
(
option
)
{
elementUtil
.
createElement
(
'vum-show-keybo
ra
d'
)
elementUtil
.
createElement
(
'vum-show-keybo
ar
d'
)
this
.
_vm
=
new
Vue
(
numberKeyboard
)
this
.
_vm
=
new
Vue
(
numberKeyboard
)
this
.
_vm
.
$mount
(
'[vum-show-keybo
ra
d]'
)
this
.
_vm
.
$mount
(
'[vum-show-keybo
ar
d]'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
_vm
.
showNumberKeyboard
(
option
)
this
.
_vm
.
showNumberKeyboard
(
option
)
})
})
...
...
packages/components/NumberKeyboard/index.vue
View file @
0db3a639
<
template
>
<
template
>
<transition
:name=
"transition ? 'van-slide-bottom' : ''"
>
<transition
:name=
"transition ? 'van-slide-bottom' : ''"
>
<div
v-show=
"
show
"
:class=
"cusClass"
class=
"keyboard-backdrop"
@
click=
"closeKeyboard"
>
<div
v-show=
"
value
"
:class=
"cusClass"
class=
"keyboard-backdrop"
@
click=
"closeKeyboard"
>
<div
<div
v-show=
"
show
"
v-show=
"
value
"
:style=
"style"
:style=
"style"
class=
"number-keyboard"
class=
"number-keyboard"
@
touchstart
.
stop
@
touchstart
.
stop
...
@@ -229,9 +229,18 @@ export default {
...
@@ -229,9 +229,18 @@ export default {
name
:
'NumberKeyboard'
,
name
:
'NumberKeyboard'
,
components
:
{
Key
},
components
:
{
Key
},
props
:
{
props
:
{
show
:
Boolean
,
// eslint-disable-line
value
:
{
title
:
String
,
// eslint-disable-line
type
:
Boolean
,
closeButtonText
:
String
,
// eslint-disable-line
default
:
false
,
},
title
:
{
type
:
String
,
default
:
''
,
},
closeButtonText
:
{
type
:
String
,
default
:
''
,
},
theme
:
{
theme
:
{
type
:
String
,
type
:
String
,
default
:
'default'
,
default
:
'default'
,
...
@@ -298,7 +307,7 @@ export default {
...
@@ -298,7 +307,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
handler
(
true
)
this
.
handler
(
true
)
this
.
$el
.
setAttribute
(
'vum-show-keybo
ra
d'
,
''
)
this
.
$el
.
setAttribute
(
'vum-show-keybo
ar
d'
,
''
)
},
},
destroyed
()
{
destroyed
()
{
this
.
handler
(
false
)
this
.
handler
(
false
)
...
@@ -315,9 +324,9 @@ export default {
...
@@ -315,9 +324,9 @@ export default {
methods
:
{
methods
:
{
closeKeyboard
()
{
closeKeyboard
()
{
let
vm
=
this
let
vm
=
this
let
wrapper
=
document
.
querySelector
(
'[vum-show-keybo
ra
d]'
)
let
wrapper
=
document
.
querySelector
(
'[vum-show-keybo
ar
d]'
)
if
(
wrapper
&&
vm
.
keyBoardPlugin
)
{
if
(
wrapper
&&
vm
.
keyBoardPlugin
)
{
this
.
show
=
false
this
.
value
=
false
try
{
try
{
document
.
body
.
removeChild
(
wrapper
)
document
.
body
.
removeChild
(
wrapper
)
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -333,7 +342,7 @@ export default {
...
@@ -333,7 +342,7 @@ export default {
this
.
extraKey
=
options
.
extraKey
this
.
extraKey
=
options
.
extraKey
this
.
keyDown
=
options
.
keyDown
this
.
keyDown
=
options
.
keyDown
this
.
keyDelete
=
options
.
keyDelete
this
.
keyDelete
=
options
.
keyDelete
this
.
show
=
true
this
.
value
=
true
},
},
handler
(
action
)
{
handler
(
action
)
{
if
(
action
!==
this
.
handlerStatus
&&
this
.
hideOnClickOutside
)
{
if
(
action
!==
this
.
handlerStatus
&&
this
.
hideOnClickOutside
)
{
...
@@ -346,11 +355,12 @@ export default {
...
@@ -346,11 +355,12 @@ export default {
},
},
onClose
()
{
onClose
()
{
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
this
.
show
=
false
this
.
$emit
(
'input'
,
false
)
// this.show = false
this
.
onBlur
()
this
.
onBlur
()
},
},
onAnimationEnd
()
{
onAnimationEnd
()
{
this
.
$emit
(
this
.
show
?
'show'
:
'hide'
)
this
.
$emit
(
this
.
value
?
'show'
:
'hide'
)
},
},
onPressKey
(
text
)
{
onPressKey
(
text
)
{
let
vm
=
this
let
vm
=
this
...
@@ -365,7 +375,7 @@ export default {
...
@@ -365,7 +375,7 @@ export default {
}
else
if
(
text
===
this
.
closeButtonText
)
{
}
else
if
(
text
===
this
.
closeButtonText
)
{
this
.
onClose
()
this
.
onClose
()
}
else
{
}
else
{
this
.
$emit
(
'
input
'
,
text
)
this
.
$emit
(
'
keyDown
'
,
text
)
if
(
vm
.
keyDown
)
{
if
(
vm
.
keyDown
)
{
vm
.
keyDown
(
text
)
vm
.
keyDown
(
text
)
}
}
...
...
packages/components/Progress/demo.vue
0 → 100644
View file @
0db3a639
/**
* @Author think
* @Date 2020-09-07 10:51
*/
<
template
>
<h-view
title=
"Progress"
>
<h-header>
<h-return
slot=
"left"
@
click
.
native=
"$routeGo()"
/>
<div
slot=
"center"
>
Progress
</div>
</h-header>
<h-content>
<h4>
当前进度
</h4>
<h-progress
:percent=
"percent"
:progress-bg=
"progressBg"
:progress-act-bg=
"progressActBg"
/>
</h-content>
</h-view>
</
template
>
<
script
>
export
default
{
name
:
'ProGressDemo'
,
data
()
{
return
{
percent
:
40
,
progressBg
:
'rgba(0,0,0,.3)'
,
progressActBg
:
'#0041c4'
,
}
},
methods
:
{},
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
packages/components/Range/demo.vue
0 → 100644
View file @
0db3a639
/**
* @Author think
* @Date 2020-09-07 11:01
*/
<
template
>
<h-view
title=
"Range"
>
<h-header>
<h-return
slot=
"left"
@
click
.
native=
"$routeGo()"
/>
<div
slot=
"center"
>
Range
</div>
</h-header>
<h-content>
<list-item>
<h4>
基础用法
</h4>
<item>
<section
slot=
"name"
>
完成度
</section>
<h-range
slot=
"content"
v-model=
"process"
@
change=
"change"
/>
</item>
<h4>
最大值最小值
</h4>
<item>
<section
slot=
"name"
>
首付比例
</section>
<h-range
slot=
"content"
:decimal=
"decimal"
v-model=
"rangeValue"
:min=
"min"
:max=
"max"
:step=
"step"
:disabled=
"disabled"
:disabled-opacity=
"disabledOpacity"
:range-bar-height=
"rangeBarHeight"
:range-handle-height=
"rangeHandleHeight"
@
change=
"change"
@
touchstart=
"touchStart"
@
touchend=
"touchEnd"
/>
</item>
</list-item>
</h-content>
</h-view>
</
template
>
<
script
>
export
default
{
name
:
'RangeDemo'
,
data
()
{
return
{
process
:
0
,
decimal
:
false
,
rangeValue
:
40
,
min
:
20
,
max
:
80
,
step
:
10
,
disabled
:
false
,
disabledOpacity
:
0.5
,
rangeBarHeight
:
1
,
rangeHandleHeight
:
20
,
}
},
methods
:
{
change
(
val
)
{
// this.rangeValue = val
console
.
log
(
val
)
},
touchStart
(
e
)
{
console
.
log
(
e
)
},
touchEnd
(
e
)
{
console
.
log
(
e
)
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
packages/components/Switch/index.vue
View file @
0db3a639
<
template
>
<
template
>
<label
<label
:class=
"cusClass"
class=
"toggle toggle-positive toggle-check"
class=
"toggle toggle-positive toggle-check"
@
click
.
prevent=
"checked"
>
@
click
.
prevent=
"checked"
>
<input
:checked=
"value"
:disabled=
"disable"
type=
"checkbox"
>
<input
v-bind=
"$attrs"
:checked=
"value"
:disabled=
"disable"
type=
"checkbox"
>
<div
class=
"track"
>
<div
class=
"track"
>
<div
class=
"handle"
/>
<div
class=
"handle"
/>
</div>
</div>
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'HSwitch'
,
name
:
'HSwitch'
,
inheritAttrs
:
true
,
props
:
{
props
:
{
value
:
{
value
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -21,10 +22,6 @@ export default {
...
@@ -21,10 +22,6 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
cusClass
:
{
type
:
String
,
default
:
''
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
...
packages/components/demoRoute.js
View file @
0db3a639
...
@@ -17,6 +17,9 @@ const SelectField = resolve => require.ensure([], () => { resolve(require('./Sel
...
@@ -17,6 +17,9 @@ const SelectField = resolve => require.ensure([], () => { resolve(require('./Sel
const
Radio
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./Radio/demo'
))
},
'radio'
)
const
Radio
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./Radio/demo'
))
},
'radio'
)
const
ActionSheet
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./ActionSheet/demo'
))
},
'actionSheet'
)
const
ActionSheet
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./ActionSheet/demo'
))
},
'actionSheet'
)
const
Dialog
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./Dialog/demo'
))
},
'dialog'
)
const
Dialog
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./Dialog/demo'
))
},
'dialog'
)
const
Keyboard
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./NumberKeyboard/demo'
))
},
'keyboard'
)
const
Progress
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./Progress/demo'
))
},
'progress'
)
const
Range
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'./Range/demo'
))
},
'range'
)
export
default
[
export
default
[
{
path
:
'/header'
,
component
:
Header
,
name
:
'Header'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/header'
,
component
:
Header
,
name
:
'Header'
,
meta
:
{
keepAlive
:
false
}},
...
@@ -38,4 +41,7 @@ export default [
...
@@ -38,4 +41,7 @@ export default [
{
path
:
'/radio'
,
component
:
Radio
,
name
:
'Radio'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/radio'
,
component
:
Radio
,
name
:
'Radio'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/actionSheet'
,
component
:
ActionSheet
,
name
:
'ActionSheet'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/actionSheet'
,
component
:
ActionSheet
,
name
:
'ActionSheet'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/dialog'
,
component
:
Dialog
,
name
:
'Dialog'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/dialog'
,
component
:
Dialog
,
name
:
'Dialog'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/keyboard'
,
component
:
Keyboard
,
name
:
'Keyboard'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/progress'
,
component
:
Progress
,
name
:
'Progress'
,
meta
:
{
keepAlive
:
false
}},
{
path
:
'/range'
,
component
:
Range
,
name
:
'Range'
,
meta
:
{
keepAlive
:
false
}},
]
]
src/pages/demo.vue
View file @
0db3a639
...
@@ -65,10 +65,10 @@
...
@@ -65,10 +65,10 @@
<section
slot=
"name"
>
Switch
</section>
<section
slot=
"name"
>
Switch
</section>
</item>
</item>
<item>
<item>
<
section
slot=
"name"
>
Range
</section
>
<
router-link
slot=
"name"
to=
"/range"
>
Range
</router-link
>
</item>
</item>
<item>
<item>
<
section
slot=
"name"
>
Progress
</section
>
<
router-link
slot=
"name"
to=
"/progress"
>
Progress
</router-link
>
</item>
</item>
<item>
<item>
<section
slot=
"name"
>
Spin
</section>
<section
slot=
"name"
>
Spin
</section>
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<router-link
slot=
"name"
to=
"/actionSheet"
>
ActionSheet
</router-link>
<router-link
slot=
"name"
to=
"/actionSheet"
>
ActionSheet
</router-link>
</item>
</item>
<item>
<item>
<
section
slot=
"name"
>
NumberKeyboard
</section
>
<
router-link
slot=
"name"
to=
"/keyboard"
>
NumberKeyboard
</router-link
>
</item>
</item>
<item>
<item>
<section
slot=
"name"
>
Select
</section>
<section
slot=
"name"
>
Select
</section>
...
...
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