对比
| frontend | backend |
|---|
| <$list filter='[tags[]!is[system]sort[title]]'> | |
| <$transclude tiddler="$:/core/ui/TagTemplate"/> | |
| </$list> |
| it('console.log the text "hello"', () => { | |
| console.log = jest.fn(); | |
| log('hello'); | |
| // The first argument of the first call to the function was 'hello' | |
| expect(console.log).toHaveBeenCalledWith('hello'); | |
| }); |
对比
| frontend | backend |
|---|
| | Method name | API call | | |
| | :----------------- | :----------------------------------------------------------- | | |
| | `getList` | `GET http://my.api.url/posts?sort=["title","ASC"]&range=[0, 24]&filter={"title":"bar"}` | | |
| | `getOne` | `GET http://my.api.url/posts/123` | | |
| | `getMany` | `GET http://my.api.url/posts?filter={"ids":[123,456,789]}` | | |
| | `getManyReference` | `GET http://my.api.url/posts?filter={"author_id":345}` | | |
| | `create` | `POST http://my.api.url/posts` | | |
| | `update` | `PUT http://my.api.url/posts/123` | | |
| | `updateMany` | Multiple calls to `PUT http://my.api.url/posts/123` | | |
| | `delete` | `DELETE http://my.api.url/posts/123` | |
// ejs
<%- include('_layout-header') %>
// heex
<%= render "_layout_header.html", assigns %>| { | |
| "version": "2.0", | |
| "columns": 2, | |
| "tiles": [ | |
| { | |
| "type": "HTTP-STATUS", | |
| "params": { | |
| "url": "https://dev.smartcompany.work", | |
| "statusCodeMax": 299 | |
| } |
| <form action="/api/find" method="get"> | |
| <label> | |
| <p>Zip-code:</p> | |
| <input type="text" name="q" value="" placeholder="000-0000"> | |
| </label> | |
| <p> | |
| <button type="submit">Search</button> | |
| </p> | |
| </form> |