Background

Because the module development of CabloyJS follows the principle of opening and closing, in actual projects, project level parameters can be used to override module level parameters, so that we can customize module behavior parameters from the project level

Override Module Config

Since config supports multiple scenes, you can configure parameters in the appropriate scene config file as needed. For example, if we need to modify the parameters in the module test-party to take effect in all scenes, we need to modify the file config.default.js

src/front/config/config.default.js

  1. 1export default{
  2. 2 modules: {
  3. 3 'test-party': {
  4. 4 message: 'Hello World!',
  5. 5 markCount: 3,
  6. 6 },
  7. 7 },
  8. 8};