Skip to content

Commit

Permalink
jssdk monaco-editor 类名不加 .amis-scope 前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Jun 1, 2020
1 parent 7b2d8f3 commit fa0b2c3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/embed-packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function prefixCss(code, prefix) {
/^\.is\-modalOpened\s/,
'.is-modalOpened ' + prefix + ' '
);
else if (sel.match(/^(?:\.fr-|\.fa|\.tox)/)) return sel;
else if (sel.match(/^(?:\.fr-|\.fa|\.tox|\.monaco)/)) return sel;
else return prefix + ' ' + sel;
}

Expand All @@ -47,15 +47,15 @@ function prefixCss(code, prefix) {
}

function unicodeJs(str) {
return str.replace(/([\u4E00-\u9FA5]|[\uFE30-\uFFA0]|[\u2019])/g, function(
return str.replace(/([\u4E00-\u9FA5]|[\uFE30-\uFFA0]|[\u2019])/g, function (
_,
value
) {
return '\\u' + value.charCodeAt(0).toString(16);
});
}

module.exports = function(ret, pack, settings, opt) {
module.exports = function (ret, pack, settings, opt) {
var root = fis.project.getProjectPath();

var tpl = ret.pkg['/examples/sdk-placeholder.html'];
Expand All @@ -76,13 +76,13 @@ module.exports = function(ret, pack, settings, opt) {
var resource = tpl._resource;

var files = ret.pkg;
Object.keys(files).forEach(function(subpath) {
Object.keys(files).forEach(function (subpath) {
var file = files[subpath];

mapping[file.getUrl()] = file;
});

contents.replace(rLinkScript, function(
contents.replace(rLinkScript, function (
all,
comment,
script,
Expand Down Expand Up @@ -127,7 +127,7 @@ module.exports = function(ret, pack, settings, opt) {
} catch (e) {
d = (/((?:https?|file)\:.*)$/.test(e.stack) && RegExp.$1).replace(/\\/[^\\/]*$/, '');
}
${contents.replace(/\"url\"\s*\:\s*('|")(\.\/.*)\1/g, function(
${contents.replace(/\"url\"\s*\:\s*('|")(\.\/.*)\1/g, function (
_,
quote,
value
Expand Down

0 comments on commit fa0b2c3

Please sign in to comment.