wanxe / vue-button-spinner Goto Github PK
View Code? Open in Web Editor NEWSimple VUE 2 component to create a button spinner. The perfect solution for your submit buttons!
Simple VUE 2 component to create a button spinner. The perfect solution for your submit buttons!
may be you can add some dynamic css because currently it is showing very small button
The example shows the use of an isLoading
prop. In fact, I had to change to is-loading
to get it to work (camelCase required in JavaScript, kebab-case in the HTML).
The correct component name is vue-button-spinner, instead of button-spinner.
Just leaving it here if someone needs.
Hi. Thanks for nice library. I'm using this library to show progress with calling web apis. I followed your guide line in Readme.md, but I noticed that 'isLoading' property works incorrectly. How can I solve this problem? The below is my code which uses your library.
Template side
<template>
<vue-button-spinner :isLoading="isLoading" :disabled="isLoading" :status="status" @click.native="trainChatbot"><span>Train a chatbot</span></vue-button-spinner>
</template>
Script side
import VueButtonSpinner from 'vue-button-spinner';
export default {
components : {
VueButtonSpinner
},
@A method is called.
axios.post(train_url, payload, config).then(res => {
if(res.data["result"]) {
// alert("챗봇 훈련 성공!");
this.$vs.notify({
title : "챗봇 훈련 성공",
text: "챗봇의 훈련이 성공하였습니다. 대화를 시작해보세요!",
color:'success',
position : 'bottom-right'
})
this.isLoading = false;
localStorage.setItem("isLoading", false);
this.status = true;
} else {
this.$vs.notify({
title : "챗봇 훈련 실패",
text: "챗봇 훈련 실패! - 네트워크 연결을 확인하세요!",
color:'danger',
position : 'bottom-right'
})
this.isLoading = false;
localStorage.setItem("isLoading", false);
this.status = false;
// alert("");
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.