Configuring Axios Base URL and Request Headers in Vue.js
Creating an HTTP Configuration Module
First, create an http.js file to store the server configuration and request interceptors.
import axios from "axios";
const apiInstance = axios.create({
baseURL: 'https://your-api-domain.com',
timeout: 15000
});
apiInstance.interceptors.request.use((config) => {
const storedToken = ...
Posted on Thu, 04 Jun 2026 18:35:14 +0000 by henryhund
Building a GVA-Based Admin System with Gin, Vue, and JWT
Login Handling with Sestion and JWT
Session-based authentication is required to restrict page access to logged-in users only. The Gin framework provides session middleware via github.com/gin-contrib/sessions.
import "github.com/gin-contrib/sessions"
rootRouter.GET("/login", func(c *gin.Context) {
session := sessions.Def ...
Posted on Tue, 02 Jun 2026 18:38:17 +0000 by jexx
Programmatic and Declarative Navigation in Vue with Element UI
Installing Vue Router
First, add Vue Router to your project using npm or yarn:
npm install vue-router
# or
yarn add vue-router
Router Configuration
Create a router directory under src and define your routes in index.js:
// src/router/index.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import Dashboard from '@/components/Dashboar ...
Posted on Fri, 29 May 2026 22:23:55 +0000 by everlifefree
A Lightweight Code Generation Tool for SpringBoot and Vue Applications
Overview
A versatile scaffolding solution built with SpringBoot and Vue3 designed for rapid application development.
This project serves as a foundational template for both front end and backend systems, offering automated code generation capabilities for SpringBoot and Vue applications. It's an evolving open-source initiative crafted by develo ...
Posted on Wed, 27 May 2026 18:03:56 +0000 by like_php
Vue Directive Modifiers for Input Handling and Event Control
Lazy Synchronization with .lazy
By default, v-model synchronizes the input value on every input event. To defer synchronization until the element loses focus or the change event fires, use the .lazy modifier:
<input v-model.lazy="message">
Numeric Type Conversion with .number
To automatically coerce user input in to a number ( ...
Posted on Sat, 23 May 2026 21:36:47 +0000 by syamswaroop
Integrating Django, Vue, Axios, CORS, and Global Settings in a Full-Stack Project
Backend Setup with Django
Internationalization & Timezone
# d_prj/settings.py
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_TZ = False
Frontend HTTP Client: Axios
Installation & Global Registration
# v-proj/src/main.js
import axios from 'axios'
Vue.prototype.$http = axios
Sample GET Request inapting to Vue Lifecycle
// v-p ...
Posted on Fri, 22 May 2026 22:54:09 +0000 by andycastle
Vue Auto Focus Directive: Managing Automatic Input Focusing
Upon page load, focus shifts to the order number input field
After scanning a order number, focus moves to the product barcode input
Following barcode scanning, focus remains on the barcode input
Once all barocdes are scanned, focus returns to the order number input
To address such scenarios, I developed a Vue directive named vue-auto-focus. ...
Posted on Mon, 18 May 2026 04:00:36 +0000 by Cynix
How to Use el-icon in Element Plus?
Introduction
In the Vue ecosystem, Element UI is one of the top component libraries. When Vue 3.0 was released, Element also released its corresponding library, Element Plus. Consequently, some usage patterns changed, including how el-icon works.
While the official documentation covers usage, it may not be sufficiently detailed, potentially cau ...
Posted on Sun, 17 May 2026 20:30:50 +0000 by moomsdad
Developing Custom Plugins for Vue 3
Plugins extend Vue applications by attaching reusable features across the entire instance tree. Standard integration patterns involve registering global components or directives, exposing shared instances through app.provide(), and attaching methods or configuration values to app.config.globalProperties. Comprehensive libraries typically combin ...
Posted on Sun, 17 May 2026 09:26:27 +0000 by karq
Frontend Development Technical Guide
When using the map component in Taro, rendering failures occurred during frequent page transitions. The issue appeared to be that variables weren't properly bound to the map component's properties. Initially tried setState, local variables, and caching without success. Finally resolved by changing the lifecycle method from componentDidMount to ...
Posted on Sat, 16 May 2026 08:57:41 +0000 by Foser