Browse Source

Add custom option to AssetManager

pull/3795/head
Artur Arseniev 4 years ago
parent
commit
2655a4501c
  1. 3
      src/asset_manager/config/config.js
  2. 1
      src/asset_manager/index.js
  3. 4
      src/common/module.js

3
src/asset_manager/config/config.js

@ -99,6 +99,9 @@ export default {
// }
beforeUpload: null,
// Avoid rendering the default asset manager.
custom: false,
// Toggles visiblity of assets url input
showUrlInput: true
};

1
src/asset_manager/index.js

@ -258,6 +258,7 @@ export default () => {
* ));
*/
render(assts) {
if (this.getConfig('custom')) return;
const toRender = assts || this.getAll().models;
if (!am) {

4
src/common/module.js

@ -46,10 +46,10 @@ export default {
const { em, events } = this;
const options = opts || coll;
em && events.all && em.trigger(events.all, { event, model, options });
this.__customEvent();
this.__onAllEvent();
},
__customEvent() {},
__onAllEvent() {},
_createId(len = 16) {
const all = this.getAll();

Loading…
Cancel
Save