Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

bug: 懒加载umeditor.js和umeditor.css路径问题 #14

Closed
we125182 opened this issue Sep 11, 2018 · 0 comments
Closed

bug: 懒加载umeditor.js和umeditor.css路径问题 #14

we125182 opened this issue Sep 11, 2018 · 0 comments

Comments

@we125182
Copy link

// 文件: lib/src/script.service.ts
 // 优先加载依赖库
        this.loadLib(path).then(() => {
            const promises: Promise<any>[] = [];

            promises.push(
                // <style color="red">路径${path}后多加了'/'</style>
                this.loadCss(`${path}/themes/default/css/umeditor.min.css`)
            );

            [
                `${path}umeditor.config.js`,
                debug === true
                    ? `${path}/umeditor.js`
                    : `${path}/umeditor.all.min.js`
            ].forEach(script => promises.push(this.loadScript(script)));

            Promise.all(promises).then(res => {
                this.emitter.next(true);
            });
        });

路径${path}后多加了'/'
后续的依赖都是${path}third-party/...,导致umeditor.js和umeditor.css路径会多出一个'/', 如下:
image
普通服务器没有问题, 但是纯静态服务器(例如阿里oss)导致文件找不到. 希望能够修复

@cipchk cipchk closed this as completed in 864a04b Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant