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
03b94183
Commit
03b94183
authored
May 08, 2019
by
Nature
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s-tab
parent
9d77b282
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
18 deletions
+23
-18
app.core.less
packages/common/styles/app.core.less
+1
-1
index.vue
packages/components/HView/index.vue
+3
-2
index.vue
packages/components/STab/index.vue
+13
-9
tab-item.vue
packages/components/STab/tab-item.vue
+1
-1
vuePlatform.js
src/scripts/vuePlatform.js
+5
-5
No files found.
packages/common/styles/app.core.less
View file @
03b94183
...
@@ -4,5 +4,5 @@
...
@@ -4,5 +4,5 @@
@import "ionic";
@import "ionic";
@import 'publicStyle';
@import 'publicStyle';
@import "ionic-public-style";
@import "ionic-public-style";
@import "platform-iosx";
@import "platform-ios";
@import "platform-ios";
@import "platform-iosx";
packages/components/HView/index.vue
View file @
03b94183
...
@@ -36,19 +36,20 @@ export default {
...
@@ -36,19 +36,20 @@ export default {
.h-view {
.h-view {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
overflow: hidden;
// background-color: $bgColor;
// background-color: $bgColor;
}
}
// iPhoneX适配
// iPhoneX适配
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
.h-
view
{
.h-
ios
{
padding-bottom: 42px;
padding-bottom: 42px;
}
}
}
}
// iPhoneX Max适配
// iPhoneX Max适配
@media only screen and (device-width: 414px) and (device-height: 896px) {
@media only screen and (device-width: 414px) and (device-height: 896px) {
.h-
view
{
.h-
ios
{
padding-bottom: 42px;
padding-bottom: 42px;
}
}
}
}
...
...
packages/components/STab/index.vue
View file @
03b94183
<
template
>
<
template
>
<section
:class=
"[c(),tabCss, cusClass,overFlow]"
>
<section
:class=
"[c(),tabCss, cusClass,overFlow]"
>
<section
:style=
"transform"
class=
"tab-content"
>
<section
:style=
"transform"
class=
"tab-content"
>
<slot/>
<slot/>
</section>
</section>
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
},
},
overflowX
:
{
overflowX
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
fals
e
,
default
:
tru
e
,
},
},
},
},
data
()
{
data
()
{
...
@@ -40,7 +40,6 @@ export default {
...
@@ -40,7 +40,6 @@ export default {
items
:
[],
items
:
[],
length
:
''
,
length
:
''
,
activedIndex
:
''
,
activedIndex
:
''
,
deviceWidth
:
window
.
innerWidth
,
translate
:
0
,
translate
:
0
,
}
}
},
},
...
@@ -69,6 +68,7 @@ export default {
...
@@ -69,6 +68,7 @@ export default {
transform
()
{
transform
()
{
return
{
return
{
transform
:
'translateX('
+
this
.
translate
+
'px'
+
')'
,
transform
:
'translateX('
+
this
.
translate
+
'px'
+
')'
,
// transition: 'right 0.3s cubic-bezier(0.35, 0, 0.25, 1), left 0.3s cubic-bezier(0.35, 0, 0.25, 1) 0.09s;',
}
}
},
},
},
},
...
@@ -86,18 +86,22 @@ export default {
...
@@ -86,18 +86,22 @@ export default {
},
},
scrollToActiveTab
(
index
,
width
)
{
scrollToActiveTab
(
index
,
width
)
{
let
clientWidth
=
this
.
$el
.
clientWidth
index
+=
1
index
+=
1
let
vm
=
this
let
vm
=
this
let
count
=
Math
.
floor
(
vm
.
device
Width
/
width
)
let
count
=
Math
.
floor
(
client
Width
/
width
)
let
overFlowWidth
=
vm
.
device
Width
-
count
*
width
let
overFlowWidth
=
client
Width
-
count
*
width
let
num
let
num
if
(
index
>
count
)
{
if
(
index
>
count
)
{
num
=
index
-
count
num
=
index
-
count
if
((
vm
.
count
-
index
)
>=
1
)
{
num
+=
1
}
}
else
{
}
else
{
num
=
0
num
=
0
}
}
if
(
num
===
0
)
{
if
(
num
===
0
)
{
vm
.
translate
=
-
num
*
width
vm
.
translate
=
0
}
else
{
}
else
{
vm
.
translate
=
-
num
*
width
+
overFlowWidth
vm
.
translate
=
-
num
*
width
+
overFlowWidth
}
}
...
@@ -113,7 +117,7 @@ export default {
...
@@ -113,7 +117,7 @@ export default {
.hls-switch-tab {
.hls-switch-tab {
width: 100%;
width: 100%;
position: absolute;
//
position: absolute;
z-index: 1;
z-index: 1;
display: flex;
display: flex;
// justify-content: space-around;
// justify-content: space-around;
...
@@ -121,7 +125,7 @@ export default {
...
@@ -121,7 +125,7 @@ export default {
background-color: #fff;
background-color: #fff;
&-top {
&-top {
top: 0;
//
top: 0;
&:after {
&:after {
.setBottomLine();
.setBottomLine();
...
@@ -129,7 +133,7 @@ export default {
...
@@ -129,7 +133,7 @@ export default {
}
}
&-bottom {
&-bottom {
bottom: 0;
//
bottom: 0;
&:before {
&:before {
.setTopLine();
.setTopLine();
...
...
packages/components/STab/tab-item.vue
View file @
03b94183
...
@@ -69,7 +69,7 @@ export default {
...
@@ -69,7 +69,7 @@ export default {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
padding: 0 3px;
//
padding: 0 3px;
border-bottom: 1px solid rgba(255, 255, 255, .0); /*no*/
border-bottom: 1px solid rgba(255, 255, 255, .0); /*no*/
}
}
...
...
src/scripts/vuePlatform.js
View file @
03b94183
...
@@ -215,7 +215,7 @@
...
@@ -215,7 +215,7 @@
self
.
platforms
=
[]
self
.
platforms
=
[]
var
grade
=
'a'
var
grade
=
'a'
if
(
self
.
isWebView
())
{
/*
if (self.isWebView()) {
self.platforms.push('webview')
self.platforms.push('webview')
if (!(!window.cordova && !window.PhoneGap && !window.phonegap)) {
if (!(!window.cordova && !window.PhoneGap && !window.phonegap)) {
self.platforms.push('cordova')
self.platforms.push('cordova')
...
@@ -225,13 +225,13 @@
...
@@ -225,13 +225,13 @@
} else {
} else {
self.platforms.push('browser')
self.platforms.push('browser')
}
}
if
(
self
.
isIPad
())
self
.
platforms
.
push
(
'ipad'
)
if (self.isIPad()) self.platforms.push('ipad')
*/
var
platform
=
self
.
platform
()
var
platform
=
self
.
platform
()
if
(
platform
)
{
if
(
platform
)
{
self
.
platforms
.
push
(
platform
)
self
.
platforms
.
push
(
platform
)
var
version
=
self
.
version
()
/*
var version = self.version()
if (version) {
if (version) {
var v = version.toString()
var v = version.toString()
if (v.indexOf('.') > 0) {
if (v.indexOf('.') > 0) {
...
@@ -247,10 +247,10 @@
...
@@ -247,10 +247,10 @@
} else if (self.isWindowsPhone()) {
} else if (self.isWindowsPhone()) {
grade = 'b'
grade = 'b'
}
}
}
}
*/
}
}
self
.
setGrade
(
grade
)
//
self.setGrade(grade)
},
},
/**
/**
...
...
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