Fading Coder

One Final Commit for the Last Sprint

Practical Guide to Developing with Vue 3

To debug Vue applications, use the Developer Tools panel acccessible by right-clicking in Chrome and selecting "Inspect" or pressing F12. Run project scripts defined in package.json using npm or pnpm. For development, execute npm run serve (or pnpm dev) to start the server, and npm run bui...

Pinia: A Modern, Simpler State Manager for Vue 3

Download and install Pinia first: npm install pinia --save In Vue 3's main.js, initialize Pinia: import { createApp } from 'vue' import { createPinia } from 'pinia' import RootApp from './RootApp.vue' const storeInstance = createPinia() const vueApp = createApp(RootApp) vueApp.use(storeInstance) vue...

Vue 3: Building Applications with Persistent Layouts and Route-Driven Content

Modern web applications frequently require a persistent user interface layout where certain elements, such as a header, sidebar, or footer, remain constant while the main content area updates based on user interaction or routing. Vue Router in Vue 3 provides a straightforward mechanism to achieve th...

Understanding Vue 3 Component System

A Vue component is a self-contained, reusable Vue instance that encapsulates its own template, data, methods, and lifecycle hooks. This modular approach is one of the framework's most powerful features. Components extend HTML elements, allowing developers to encapsulate reusable code and decompose t...

Reactivity and Architectural Updates in Vue 3

Reactivity System Overhaul Vue 2's Approach Vue 2 implements two-way data binding using Object.defineProperty() to intercept property access combined with a publish-subscribe pattern. const vm = new Vue({ data: { counter: 0 }, // Internal transformation creates getters/setters // counter becomes rea...

Implementing Recursive Components in Vue 3

Introduction In daily Vue projects, component libraries are often used to assist development, so the exposure to recursive components might not be very high. However, this doesn't mean recursive components are unimportant. This article will help you master the usage of recursive components in about...

Implementing Custom Single and Multiple Selection for Tables with Vue 3 and Element Plus

Project Context: Developing a examination system using Vue 3 and Element Plus. Feature Scenario: In the question addition interface, question are categorized into objective and subjective types. Objective questions can be further divided into single-choice and multiple-choice types, which necesssit...

Vue 3 Guide: Importing External Dependencies, Custom Components, and Routing

Important Note: The source code used in this article builds upon basic Vue 3 framework concepts, template syntax, and directives. Please ensure you are familiar with these fundamentals before proceeding. 1 Importing External Dependencies Vue leverages Node.js to import external dependencies, allowi...

Implementing an App-like Phone Verification Code Input Component with Vue 3 and Element Plus

Implementing an App-like Phone Verification Code Input Component with Vue 3 and Element Plus
Template Section (<template>) <template> <div class="verification-code-container"> <div class="input-fields-wrapper" ref="inputWrapperRef"> <el-input v-for="(digit, idx) in verificationDigits" :key="idx" v-model="digit...

Implementing a Vue 3 Ellipsis Tooltip Custom Directive

import { h, render } from 'vue'; import { ElTooltip } from 'element-plus'; const processOverflow = (el, binding) => { el.style.overflow = 'hidden'; el.style.textOverflow = 'ellipsis'; el.style.whiteSpace = 'nowrap'; // Determine if the textual content exceeds the container's width if (el.scrollWi...