Isaac's Blog

学习、研究 IT 知识,分享技术经验和见解

  • 使用parse解析模板生成astv-for相关的属性;
  • 使用generate,结合ast生成函数文本(code),包含v-for的函数文本是_l(/* ... */);
  • 结合code构造render_watcher.update(),从而渲染v-for元素。

nest中你可以看到使用装饰器实现路由路径。

1
2
3
4
5
6
7
8
9
10
import { Controller, Get, Query } from '@nestjs/common';
import { ListAllEntities } from './dto';

@Controller('cats')
export class CatsController {
@Get()
findAll(@Query() query: ListAllEntities) {
return `This action returns all cats (limit: ${query.limit} items)`;
}
}

在 html 中做圆框图片很容易,只需要简单的 border-radius: 50%; 当然,为了兼容性,还有必要做带前缀的兼容性写法。但总的来说还是很简单。

0%