摘要: 1、if,else: <body> <div id ="app"> <!-- 复杂判断还是推荐使用computed计算 --> <h2 v-if="score >= 90"> <div>优秀</div> </h2> <h2 v-else-if="score >= 60"> <div>良好</div> 阅读全文
posted @ 2020-06-25 21:13 北冥雪 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 1、v-on 事件监听: <body> <div id ="app"> <p> <h2>counter: {{counter}}</h2> <button @click="increment">+</button> <button @click="decrement">-</button> </p> 阅读全文
posted @ 2020-06-24 20:34 北冥雪 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1、var/let/const 相当于全局变量和局部变量 var 没有块级作用域且可以重复定义 let 有块级作用域 (if/for),可以不初始化const 有块级作用域 (if/for),必须初始化 2、const:建议优先使用const,需要改变使用let 不可改变 必须赋值 const指向的 阅读全文
posted @ 2020-06-24 15:48 北冥雪 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 一、生命周期 参考:https://www.cnblogs.com/qidh/p/11431998.html 二、实例属性 1、methods View Code 2、computed: 多次调用的时候使用 computed ,会缓存。而使用函数则会用一次调用一次 View Code 3、filte 阅读全文
posted @ 2020-06-21 16:35 北冥雪 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 一、CDN引入: <!-开发环境版本,包含了有帮助的命令行警告--> scriptsrc=https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <!-生产环境版本,优化了尺寸和速度-- scriptsrc=https://cdn.jsdeli 阅读全文
posted @ 2020-06-21 15:35 北冥雪 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 一、几种 join 的用法 1、inner join 和 join 一样的 中间交集 2、left join 以左边为主,右侧匹配不到全赋为 null 3、right join 以右边为主,左侧匹配不到全赋为 null 4、full outer join 两侧全匹配,任一元组中匹配不到的值全赋为 n 阅读全文
posted @ 2020-06-10 18:09 北冥雪 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 1、CustomScrollView(滚动组件) 1 Widget mainWidget(){ 2 return MaterialApp( 3 home: Scaffold( 4 // appBar: topBar(), 5 // AppBar( 6 // title: Text( 7 // thi 阅读全文
posted @ 2020-05-21 00:16 北冥雪 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 1、网络请求 1 Dio _dio = new Dio(); 2 3 Future getInformationJson(User user) async { 4 5 var url = 'http://xxx/xxx/xxx?username=' + user._username + 6 '&pa 阅读全文
posted @ 2020-05-20 23:38 北冥雪 阅读(572) 评论(0) 推荐(1) 编辑
摘要: 1、在引入一个第3方依赖后执行package get后长时间提示该语句: Waiting for another flutter command to release the startup lock 删除flutter SDK 下的/bin/cache/lockfile文件 重启Android S 阅读全文
posted @ 2020-05-18 21:22 北冥雪 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 1、Text 组件基本属性 1 import 'package:flutter/material.dart'; 2 3 void main() => runApp(MyApp()); 4 5 class MyApp extends StatelessWidget{ 6 @override 7 Wid 阅读全文
posted @ 2020-05-17 16:30 北冥雪 阅读(329) 评论(0) 推荐(0) 编辑