摘要:https://github.com/StructureBuilder/react-keep-alive/blob/master/README.zh-CN.md 安装 npm install --save react-keep-alive 使用 import React from 'react';
阅读全文
摘要:yarn add react-app-polyfill core-js 在index.js import 'react-app-polyfill/ie9';//兼容ie9 import 'react-app-polyfill/stable'; import "core-js/es/map" impo
阅读全文
摘要:在next.config.js里写 const withCss = require('@zeit/next-css') if(typeof require !== 'undefined'){ require.extensions['.css']=file=>{} } module.exports =
阅读全文
摘要:yarn add @zeit/next-css 在blog根目录下,新建一个next.config.js文件。这个就是Next.js的总配置文件。写入下面的代码: const withCss = require('@zeit/next-css') if(typeof require !== 'und
阅读全文
摘要:1.在setup方法前添加async 2.新建延迟函数 3.在数据展示前添加延迟函数 4.在添加组件区域添加Suspense 有点像react中的Suspense 5.Progress.vue
阅读全文
摘要:<template> <div id="app"> <p>姓名:{{name}}</p> <p> <button @click="changeAge(-1)">-</button> 年龄:{{age}} <button @click="changeAge(1)">+</button> </p> <p
阅读全文
摘要:<template> <div id="app"> <p>姓名:{{name}}</p> <p> <button @click="changeAge(-1)">-</button> 年龄:{{age}} <button @click="changeAge(1)">+</button> </p> <p
阅读全文
摘要:<template> <div id="app"> <p>姓名:{{name}}</p> <p> <button @click="changeAge(-1)">-</button> 年龄:{{age}} <button @click="changeAge(1)">+</button> </p> <p
阅读全文
摘要:setUp函数 使用Composition API 的入口 在beforeCreate之前调用 在setup中没有this 返回对象中的属性刻在模板中使用 <template> <div id="app"> {{name}} <p>{{age}}</p> <button @click="plusOn
阅读全文