- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL - 修复 HomePage.tsx 中所有图片引用 - 修复 CoursePage.tsx 中所有图片引用 - 确保图片在 GitHub Pages 上正确加载 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
474 B
JavaScript
19 lines
474 B
JavaScript
'use strict';
|
|
|
|
module.exports = function defFunc(ajv) {
|
|
defFunc.definition = {
|
|
type: 'object',
|
|
macro: function (schema, parentSchema) {
|
|
if (!schema) return true;
|
|
var properties = Object.keys(parentSchema.properties);
|
|
if (properties.length == 0) return true;
|
|
return {required: properties};
|
|
},
|
|
metaSchema: {type: 'boolean'},
|
|
dependencies: ['properties']
|
|
};
|
|
|
|
ajv.addKeyword('allRequired', defFunc.definition);
|
|
return ajv;
|
|
};
|