提交 8752b99f 编写于 作者: F Filipa Lacerda

Only destroy the component's tooltip

上级 4038d50d
......@@ -35,7 +35,7 @@ export default {
onClickAction(endpoint) {
this.isLoading = true;
$('.has-tooltip').tooltip('destroy');
$(this.$el.querySelector('.has-tooltip')).tooltip('destroy');
this.service.postAction(endpoint)
.then(() => {
......
......@@ -36,7 +36,7 @@ export default {
onClick() {
this.isLoading = true;
$('.has-tooltip').tooltip('destroy');
$(this.$el).tooltip('destroy');
this.service.postAction(this.retryUrl)
.then(() => {
......
......@@ -36,7 +36,7 @@ export default {
if (confirm('Are you sure you want to stop this environment?')) {
this.isLoading = true;
$('.has-tooltip').tooltip('destroy');
$(this.$el).tooltip('destroy');
this.service.postAction(this.retryUrl)
.then(() => {
......
......@@ -54,7 +54,7 @@ export default {
},
methods: {
onClick() {
onClick(e) {
if (this.confirmActionMessage && confirm(this.confirmActionMessage)) {
this.makeRequest();
} else if (!this.confirmActionMessage) {
......@@ -65,7 +65,7 @@ export default {
makeRequest() {
this.isLoading = true;
$('.has-tooltip').tooltip('destroy');
$(this.$el).tooltip('destroy');
this.service.postAction(this.endpoint)
.then(() => {
......@@ -90,9 +90,13 @@ export default {
:aria-label="title"
data-container="body"
data-placement="top"
:disabled="isLoading"
>
<i :class="iconClass" aria-hidden="true"></i>
<i class="fa fa-spinner fa-spin" aria-hidden="true" v-if="isLoading"></i>
:disabled="isLoading">
<i
:class="iconClass"
aria-hidden="true" />
<i
class="fa fa-spinner fa-spin"
aria-hidden="true"
v-if="isLoading" />
</button>
</template>
......@@ -28,7 +28,7 @@ export default {
onClickAction(endpoint) {
this.isLoading = true;
$('.has-tooltip').tooltip('destroy');
$(this.$el.querySelector('.has-tooltip')).tooltip('destroy');
this.service.postAction(endpoint)
.then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册