Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| interview:developer:vue_developer:start [2025/02/11 12:05] – perry.zeng | interview:developer:vue_developer:start [2025/05/22 10:39] (current) – [第二题] yan.feng | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ==== 提交方法 ==== | ==== 提交方法 ==== | ||
| - | * 第一题请将答案写在txt文件内提交。 | + | * 第一题:请将答案写在 |
| - | * 第二题只需要把相关的.js和.vue文件用ZIP压缩(不可用RAR或其他格式),不要把脚手架文件如node_modules和第三方插件压缩在内。 | + | * 第二题:请将相关的 .js 和 .vue 文件放在一个文件夹内,不要包含脚手架文件(如 node_modules)和第三方插件。 |
| - | * 压缩后电邮代码至 hr@gz.questwork.com。 | + | |
| - | <note warning> | ||
| ===== 第一题 ===== | ===== 第一题 ===== | ||
| Line 26: | Line 26: | ||
| opt = opt || {} | opt = opt || {} | ||
| this.status = { | this.status = { | ||
| - | active: typeof opt.active === ' | + | active: typeof opt.active === ' |
| disabled: typeof opt.disabled === ' | disabled: typeof opt.disabled === ' | ||
| } | } | ||
| Line 41: | Line 41: | ||
| } | } | ||
| - | getValidation(data) { | + | getValidation({ data }) { |
| Object.keys(this.status).forEach((k) => { | Object.keys(this.status).forEach((k) => { | ||
| const rule = this.rules.find((r) => r.key === k)?.value | const rule = this.rules.find((r) => r.key === k)?.value | ||
| Line 62: | Line 62: | ||
| function getValidation({ rule, data }) { | function getValidation({ rule, data }) { | ||
| if (!rule) { | if (!rule) { | ||
| - | return | + | return |
| } | } | ||
| const { key = '', | const { key = '', | ||
| Line 136: | Line 136: | ||
| - | 请用< | + | 请用< |
| Line 153: | Line 153: | ||
| ==== 购物车功能 ==== | ==== 购物车功能 ==== | ||
| - | | + | **以下功能必须实现** |
| + | |||
| + | | ||
| * 能删除已选择产品 | * 能删除已选择产品 | ||
| * 能更改数量 | * 能更改数量 | ||
| * 能按產品名稱排序 | * 能按產品名稱排序 | ||
| + | |||