fix(测试跟踪): 功能用例自动保存问题

--bug=1022784 --user=宋昌昌 【测试跟踪】功能用例,编辑用例,只有编辑用例步骤后才会自动保存 https://www.tapd.cn/55049933/s/1337604
This commit is contained in:
song-cc-rock 2023-02-17 22:41:28 +08:00 committed by jianxing
parent 4f954a1f84
commit ac7428edc0
2 changed files with 20 additions and 2 deletions

View File

@ -48,7 +48,25 @@ export default {
Vue.directive('bottom-to-top-drag', Drag.bottom2TopDrag);
Vue.directive('top-bottom-to-drag', Drag.top2BottomDrag);
Vue.directive('vertical-drag', Drag.verticalDrag);
//
Vue.directive('my-click-outside', {
bind(el, binding, vnode) {
function clickHandler(e) {
if (el.contains(e.target)) {
return false;
}
if (binding.expression) {
binding.value(e);
}
}
el.__vueClickOutside__ = clickHandler;
document.addEventListener('click', clickHandler);
},
update() {},
unbind(el, binding) {
document.removeEventListener('click', el.__vueClickOutside__);
delete el.__vueClickOutside__;
},
});
Vue.use(directive);
Vue.prototype.$loading = service;
},

View File

@ -2,7 +2,7 @@
<div class="edit-container">
<div
class="content"
v-click-outside="preSave"
v-my-click-outside="preSave"
@mouseleave="mouseLeaveEvent"
>
<div class="edit" v-show="edit">