|
@@ -18,6 +18,7 @@
|
|
|
<div
|
|
|
class='parent'
|
|
|
id='parent'
|
|
|
+ @click="parentClick($event)"
|
|
|
>
|
|
|
</div>
|
|
|
|
|
@@ -419,7 +420,8 @@ export default {
|
|
|
},
|
|
|
getInformation (a, b, c) {
|
|
|
_that.getInformation2(a, b, c)
|
|
|
- }
|
|
|
+ },
|
|
|
+ getRegularExpression(){}
|
|
|
}
|
|
|
})
|
|
|
var component = new MyComponent().$mount()
|
|
@@ -443,7 +445,8 @@ export default {
|
|
|
},
|
|
|
getInformation (a, b, c) {
|
|
|
_that.getInformation2(a, b, c)
|
|
|
- }
|
|
|
+ },
|
|
|
+ getRegularExpression(){}
|
|
|
}
|
|
|
})
|
|
|
var component = new MyComponent().$mount()
|
|
@@ -618,7 +621,38 @@ export default {
|
|
|
this.eleData = [last];
|
|
|
this.eleData[0].tdEle.classList.add('select-td');
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ //excel父节点点击检测
|
|
|
+ parentClick(e){
|
|
|
+ let target = e.target;
|
|
|
+
|
|
|
+ let bgs = document.querySelectorAll("#parent .oldlace-bg")
|
|
|
+ //console.log(bgs)
|
|
|
+ for (let i = 0; i < bgs.length; i++) {
|
|
|
+ bgs[i].classList.remove("oldlace-bg");
|
|
|
+ }
|
|
|
+ //console.log(target.getAttribute('trindex'))
|
|
|
+ if(target.getAttribute('trindex') !== null && target.getAttribute('tdindex')){
|
|
|
+ let tdEle = this.getParentTD(target);
|
|
|
+ if(tdEle){
|
|
|
+ target.classList.add("oldlace-bg");
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ getParentTD(ele){
|
|
|
+ let targetParent = ele.parentNode;
|
|
|
+ while (targetParent.nodeName !== "TD") {
|
|
|
+ if(targetParent.id == 'parent'){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ targetParent = targetParent.parentNode;
|
|
|
+ }
|
|
|
+ return targetParent;
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
watch: {
|
|
|
'options' () {
|
|
@@ -696,5 +730,10 @@ export default {
|
|
|
border-color: #E6A23C;
|
|
|
border-style: solid;
|
|
|
}
|
|
|
+
|
|
|
+ /deep/ .oldlace-bg{
|
|
|
+ background-color: oldlace;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
</style>
|