![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/ts.corals.io/frontend/node_modules/vue-select/src/mixins/ |
export default { props: { /** * Toggles the adding of a 'loading' class to the main * .v-select wrapper. Useful to control UI state when * results are being processed through AJAX. */ loading: { type: Boolean, default: false, }, }, data() { return { mutableLoading: false, } }, watch: { /** * Anytime the search string changes, emit the * 'search' event. The event is passed with two * parameters: the search string, and a function * that accepts a boolean parameter to toggle the * loading state. * * @emits search */ search() { this.$emit('search', this.search, this.toggleLoading) }, /** * Sync the loading prop with the internal * mutable loading value. * @param val */ loading(val) { this.mutableLoading = val }, }, methods: { /** * Toggle this.loading. Optionally pass a boolean * value. If no value is provided, this.loading * will be set to the opposite of it's current value. * @param toggle Boolean * @returns {*} */ toggleLoading(toggle = null) { if (toggle == null) { return (this.mutableLoading = !this.mutableLoading) } return (this.mutableLoading = toggle) }, }, }