
Vue
CharlesJoker
这个作者很懒,什么都没留下…
展开
-
vue3类型推断有误,即props类型定义设置require:true,但使用时,仍然显示类型可为undefined
const propsType = { age: { type: Number, required: true }}export default deineComponent({ name: 'HelloWorld', props: PropsType, mounted() { this.age // 类型为number || undefined }})解决方法:在定义props类型后加上as constconst propsType = { age: { ty.原创 2020-11-09 15:59:15 · 5768 阅读 · 0 评论 -
Vue 2.0 生命周期
vue 2.0 说明 created 在实例创建完成后被立即调用。在这一步,实例已完成以下的配置:数据观测 (data observer),属性和方法的运算,watch/event 事件回调。然而,挂载阶段还没开始,$el 属性目前不可见。 beforeMount 在挂载开始之前被调用:相关的 render 函数首次被调用。 mounted ...原创 2018-04-03 20:52:54 · 313 阅读 · 0 评论 -
Vuejs 入门 - 1. Hello World
Hello World<!doctype html><html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content=&q原创 2018-04-11 16:20:49 · 169 阅读 · 0 评论 -
Vuejs 入门 - 2. TodoList
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>TodoList</title> <script src="https://cdn.jsdelivr.net/npm原创 2018-04-11 17:02:25 · 240 阅读 · 0 评论 -
webpack vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin
问题vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.原因. 参考官方文档 https://vue-loader.vuejs.org/migrating.html#a-plugin-is-now-require...原创 2018-06-22 15:36:48 · 1449 阅读 · 1 评论 -
Vue基础(手写总结版)
Vue手写学习笔记原创 2018-06-25 18:52:02 · 698 阅读 · 0 评论 -
Vue不同构建版本解释
描述 UMD CommonJS ES Module 完整版 vue.js vue.common.js vue.esm.js 只包含运行时版 vue.runtime.js vue.runtime.common.js vue.runtime.esm.js 完整版 (生产环境) vue.min.js - - 只包...转载 2018-06-26 15:08:38 · 1530 阅读 · 0 评论