-
大家有没有发现如果你使用vsc来编写代码,纳闷think这个词 或者this里面的对象都是高亮的,显示红色的下划线?
看着好难受呀
ThinkJS Version:2.2.x
-
## DESC
3.0中用命令行创建rest 控制器
```javascript
thinkjs controller home/user -r
```
访问 http://127.0.0.1:8360/home/user 后台一直查询rest表,而不是user这个表
## ENV
Platform:mac
Node.js Version:8.1.3
Thin…
-
## DESC
@3.0文档中关于service这一节,看到还没有撰写相关文档,问下跟@2.0的service是否一样?
## ENV
Platform:
Node.js Version:
ThinkJS Version:
-
## DESC
### ENV
OS Platform:win
Node.js Version:v6.11.3
ThinkJS Version:v3.0
### code
```js
// your code here
```
{
"version": "0.2.0",
"configurations": [
{
…
-
比如说,我创建了一个Service类,这个Service构造函数代价比较大,但整个项目只需要一个Service对象,现在的情况是,如果我在Controller里面通过think.service创建这个service的话,每接到一次请求都得构造一次,太难受了。
虽然说可以按照自己的需求自定义项目入口,让某个对象生命周期伴随整个进程一直都在,但那样又感觉不太“干净”
-
## DESC
Koa has some exmaple with Nuxt.js, but I don't know how to use in ThinkJS 3.x.
## ENV
Platform:
Node.js Version: 8.1.2
ThinkJS Version: 3.0 beta
-
## DESC
如题所示。
## ENV
Platform: Win 7
Node.js Version: 7.10.0
ThinkJS Version: 2. 2.18
-
## DESC
```
schema = { ^ SyntaxError: Unexpected token =
```
## ENV
Platform: mac
Node.js Version: 8.2.1
ThinkJS Version: next
huanz updated
7 years ago
-
## DESC
在controller目录下再新建一个目录,在该目录下存放controller.js,然后发起请求找不到该js中的action
## ENV
Platform: mac
Node.js Version: 8.4
ThinkJS Version: 3.0
-
## DESC
think-trace在production环境去log error时,只有简单的一些信息,如何配置去获得更详细的错误信息,如果能细致到某一个文件的某一行更好。
当前配置:
`
{
handle: 'trace',
enable: !think.isCli,
options: {
error: (err: any) => …