From c9f87486592ffeedf218928456d72ab7511ae1bf Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 04 Jun 2021 11:41:11 +0800
Subject: [PATCH] 左侧导航
---
widgets/visualAngle/Widget.js | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/widgets/visualAngle/Widget.js b/widgets/visualAngle/Widget.js
index 8e8b418..204fdf3 100644
--- a/widgets/visualAngle/Widget.js
+++ b/widgets/visualAngle/Widget.js
@@ -31,18 +31,18 @@
// 暴露在外的接口
var that = this;
$(".v-a-One").click(function () {
- that.clearColor();
+ that.clearColor('one');
$(".v-a-One").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' });
$(this).find('.v-a-o-img').attr("src", "../../../images/addL/wtiyan.png");
// .attr("src", src_value);
})
$(".v-a-Two").click(function () {
- that.clearColor();
+ that.clearColor('two');
$(".v-a-Two").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' });
$(this).find('.v-a-o-img').attr("src", "../../../images/addL/wquanqiu.png");
})
$(".v-a-Three").click(function () {
- that.clearColor();
+ that.clearColor('three');
$(".v-a-Three").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' });
$(this).find('.v-a-o-img').attr("src", "../../../images/addL/wshijiao.png");
})
@@ -84,11 +84,17 @@
resize: function () {
},
- clearColor: function () {
+ clearColor: function (val) {
$(".visualAngleOnce").css({ 'backgroundColor': '#fff', 'color': '#000' });
- $('.v-a-One').find('.v-a-o-img').attr("src", "../../../images/addL/btiyan.png")
- $('.v-a-Two').find('.v-a-o-img').attr("src", "../../../images/addL/bquanqiu.png")
- $('.v-a-Three').find('.v-a-o-img').attr("src", "../../../images/addL/bshijiao.png")
+ if (val != 'one') {
+ $('.v-a-One').find('.v-a-o-img').attr("src", "../../../images/addL/btiyan.png")
+ }
+ if (val != 'two') {
+ $('.v-a-Two').find('.v-a-o-img').attr("src", "../../../images/addL/bquanqiu.png")
+ }
+ if (val != 'three') {
+ $('.v-a-Three').find('.v-a-o-img').attr("src", "../../../images/addL/bshijiao.png")
+ }
},
destroy: function () {
--
Gitblit v1.9.3