通过计算该对象身上有多少个子对象来判断该对象是否有子对象,但需要主意的是,gameObj本身也会被记录到Length之中,所以在判断gameObj对象是否有子对象时,应做如下书写(而不是写成==0);void Start () {if (GetComponentsInChildren<Transfo ...
分类:
编程语言 时间:
2020-06-24 15:41:50
阅读次数:
101
1 def _parse_known_args(self, arg_strings, namespace): 2 # replace arg strings that are file references 3 if self.fromfile_prefix_chars is not None: 4 ...
分类:
其他好文 时间:
2020-06-24 14:04:54
阅读次数:
54
关于 JJWT 的使用,可以参考之前的文章:JJWT 使用示例 一、鉴权过滤器 @Component public class JwtAuthenticationTokenFilter extends OncePerRequestFilter { @Override protected void d ...
分类:
编程语言 时间:
2020-06-24 13:56:00
阅读次数:
170
1. 通过官方提供的一个全局api Vue.extend( options ) import Vue from 'vue' export default (component, props) => { const conCtor = Vue.extend(component) const el = ...
分类:
其他好文 时间:
2020-06-24 13:47:32
阅读次数:
54
1.在util目录下先新建一个js文件 2.写函数: function 函数名1 ( 可传参 ) { } function 函数名2 ( 可传参 ) { this.函数名1 } 3.通过 module.exports 或者 exports 对外暴露接口。 module.exports = { '对外 ...
分类:
微信 时间:
2020-06-24 12:21:08
阅读次数:
169
##url.parse() 用于将url转换为对象形式: const url = require('url'); var str = "https://www.tmooc.cn:3000/course/web.html?cname=js&price=5000"; var obj = url.pars ...
分类:
Web程序 时间:
2020-06-24 11:58:27
阅读次数:
63
const express = require('express') const app = express() app.use(express.static('./dist')) app.listen(8081, () => { console.log('server running... at ...
分类:
其他好文 时间:
2020-06-24 11:55:17
阅读次数:
50
一、CommonJS node.js的模块系统,就是参照CommonJS规范实现的。在CommonJS中,有一个全局性方法require(),用于加载模块。假定有一个数学模块math.js,就可以像下面这样加载。 var math = require('math'); 然后,就可以调用模块提供的方法 ...
分类:
Web程序 时间:
2020-06-24 09:16:35
阅读次数:
68
gulp基本命令 npm i gulp -g //仅在首次执行需要 npm init -y //生成package.json文件 npm i gulp@3 --save-dev //在当前项目中安装gulp npm i gulp-concat --save-dev //合并文件 npm i gulp ...
分类:
其他好文 时间:
2020-06-23 21:05:33
阅读次数:
82
1. node.js的安装 2. 服务端与客户端 意思就是js文件是在客户端环境运行(在浏览器中打开)还是在服务端环境(直接终端运行命令 node index.js)运行 3.1 nodejs原生服务器 const http = require("http") const server = http ...
分类:
其他好文 时间:
2020-06-23 19:46:03
阅读次数:
111