Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gic-header
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vue-plugins
vue-gic-header
Commits
ea4daffd
Commit
ea4daffd
authored
Feb 15, 2019
by
zhu_yu_dan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:风险模式开发环境可用生产环境不可用;
parent
b4dea7d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
14 deletions
+25
-14
vue-gic-header.js
dist/vue-gic-header.js
+0
-0
package.json
package.json
+1
-1
vue-gic-header.vue
src/lib/vue-gic-header.vue
+24
-13
No files found.
dist/vue-gic-header.js
View file @
ea4daffd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
package.json
View file @
ea4daffd
...
...
@@ -66,5 +66,5 @@
"build"
:
"cross-env NODE_ENV=production webpack --progress --hide-modules"
,
"dev"
:
"cross-env NODE_ENV=development webpack-dev-server --open --hot"
},
"version"
:
"1.4.
2
"
"version"
:
"1.4.
3
"
}
src/lib/vue-gic-header.vue
View file @
ea4daffd
...
...
@@ -64,9 +64,9 @@
<span
class=
"el-radio__inner"
></span>
</span><span
class=
"el-radio__label"
>
安全模式
</span>
</span>
<!--
@click="changeDataType('1')"
-->
<span
class=
"danger-type"
>
<span
class=
"el-radio__input
is-disabled"
:class=
"dataType == '1' ? 'is-checked' : ''
"
>
<!-- -->
<span
class=
"danger-type"
@
click=
"changeDataType('1')"
>
<span
class=
"el-radio__input
"
:class=
"[{'is-disabled':!deveStatusBool},dataType == '1' ? 'is-checked' : '']
"
>
<span
class=
"el-radio__inner"
></span>
</span><span
class=
"el-radio__label"
>
风险模式
<span
v-show=
"total>0"
style=
"margin-left:4px"
>
{{ timeValue }}
</span></span>
</span>
...
...
@@ -228,6 +228,7 @@
dataType
:
'0'
,
timeValue
:
''
,
total
:
0
,
deveStatusBool
:
true
,
// 开发模式下风险模式可用,生产不可用
}
},
beforeMount
()
{
...
...
@@ -259,10 +260,7 @@
});
})
.
catch
(
err
=>
{
this
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
console
.
log
(
err
)
});
},
...
...
@@ -660,17 +658,28 @@
},
// 切换数据模式
changeDataType
(
type
){
this
.
dataType
=
type
;
this
.
$nextTick
(
_
=>
{
if
(
this
.
dataType
==
"1"
){
this
.
$refs
.
dataTypeWrap
.
init
();
}
});
if
(
this
.
deveStatusBool
){
// 不是生产环境
this
.
dataType
=
type
;
this
.
$nextTick
(
_
=>
{
if
(
this
.
dataType
==
"1"
){
this
.
$refs
.
dataTypeWrap
.
init
();
}
});
}
},
// 获取子组件的数据模式
getDataType
(
val
){
// console.log(val);
this
.
dataType
=
val
;
},
// 判断环境 开发还是生产
getDeveStatus
(){
var
host
=
window
.
location
.
host
;
if
(
host
==
'hope.demogic.com'
){
this
.
deveStatusBool
=
false
}
else
{
this
.
deveStatusBool
=
true
}
}
},
watch
:
{
...
...
@@ -734,6 +743,8 @@
// 获取初始数据模式
this
.
initDataType
();
// 判断环境 开发or生产
this
.
getDeveStatus
()
},
components
:{
dataType
...
...
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