Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
anjinlenxiao committed Apr 2, 2024
0 parents commit dccb5b4
Show file tree
Hide file tree
Showing 22 changed files with 2,295 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.history/
src/assets/logo.svg
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Hixtrip FE Online

## 准备

- fork 此仓库
- 根据如下要求实现相关代码
- 完成要求
- 提交`pull request`
- 提供页面截图

## 需求

1. 目前已经有`src/api/user.ts` 以及 `src/api/org.ts` 两个 API
2. 需要实现如下效果界面:

![](./docs/preview.jpg)

> 功能要求:
- 不限 ```React``` 或者 ```Vue```
- 需要拆分 `OrgTree` 以及 `UserTable` 两个组件
- 两个组件自己维护相关的数据。
- 体现两个组件的互相通信。
- 组织架构根据点上级节点进行查询子级节点实现异步加载。
- 用户 ```Table ``` 数据跟据点击 ```组织架构树形节点``` 以及 ```输入搜索关键字``` 查询。
- 需要考虑防抖节流等功能点
- 风格不限
- 示例图仅仅是效果展示,不需要完全符合。
- 可以使用 ```UI Framework```, 如 ```ant-design```, ```element-ui```
- 如果不用```UI Framework```, 可以直接用原生的```<ul> <li>```, ```<table>``` 实现,不用实现相关的CSS样式, 可以加分。

## 其他简答题

### 如何将如下的`JSON`正确解析成 `Object`
```json
{
"userId": 111323290434354540545
}
```
### 前端需要*稳定*每隔`1s`向服务端请求`API`, 请问如何实现?

### 什么情况下,你会为你的项目引入状态管理库,比如`Redux`, `Pinia`, 可以简述一下起到了什么作用么?

### 为什么`ESM``CJS`不能兼容?
Binary file added docs/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hixtrip FE Online Quiz</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<!-- <script type="module" src="/src/main.ts"></script> -->
</body>
</html>
8 changes: 8 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
Loading

0 comments on commit dccb5b4

Please sign in to comment.