@byteluck-fe/model-driven-engine 5.3.1-1-zt → 5.3.1-3-zt
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -182,11 +182,11 @@ export var ActionManager = /*#__PURE__*/ function() {
|
|
|
182
182
|
_class_call_check(this, ActionManager);
|
|
183
183
|
_define_property(this, "actionMap", new Map());
|
|
184
184
|
_define_property(this, "buildinActions", {});
|
|
185
|
-
/**
|
|
186
|
-
* 执行action的时候,作为第二个参数传递给方法,可以通过外部挂载
|
|
185
|
+
/**
|
|
186
|
+
* 执行action的时候,作为第二个参数传递给方法,可以通过外部挂载
|
|
187
187
|
*/ _define_property(this, "actionUtils", {});
|
|
188
|
-
/**
|
|
189
|
-
* 用于存储es module解析出来的源码,CustomVueControlPlugin
|
|
188
|
+
/**
|
|
189
|
+
* 用于存储es module解析出来的源码,CustomVueControlPlugin
|
|
190
190
|
*/ _define_property(this, "sources", {});
|
|
191
191
|
}
|
|
192
192
|
_create_class(ActionManager, [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: zhaoxiaoyang zhaoxiaoyang@byteluck.com
|
|
3
|
-
* @Date: 2022-04-15 14:06:03
|
|
4
|
-
* @LastEditors: SuperLuckyqi
|
|
5
|
-
* @LastEditTime: 2024-11-08 11:17:53
|
|
6
|
-
* @FilePath: /model-driven/packages/engine/src/plugins/StylePlugin.ts
|
|
1
|
+
/*
|
|
2
|
+
* @Author: zhaoxiaoyang zhaoxiaoyang@byteluck.com
|
|
3
|
+
* @Date: 2022-04-15 14:06:03
|
|
4
|
+
* @LastEditors: SuperLuckyqi
|
|
5
|
+
* @LastEditTime: 2024-11-08 11:17:53
|
|
6
|
+
* @FilePath: /model-driven/packages/engine/src/plugins/StylePlugin.ts
|
|
7
7
|
*/ function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -36,9 +36,6 @@ function _define_property(obj, key, value) {
|
|
|
36
36
|
}
|
|
37
37
|
return obj;
|
|
38
38
|
}
|
|
39
|
-
import postcss from 'postcss';
|
|
40
|
-
import prefixSelector from 'postcss-prefix-selector';
|
|
41
|
-
import postcssNested from 'postcss-nested';
|
|
42
39
|
export var StylePlugin = /*#__PURE__*/ function() {
|
|
43
40
|
"use strict";
|
|
44
41
|
function StylePlugin(config) {
|
|
@@ -62,23 +59,19 @@ export var StylePlugin = /*#__PURE__*/ function() {
|
|
|
62
59
|
style.className = 'edit-css-' + engine.id;
|
|
63
60
|
var dom = document.querySelector('head');
|
|
64
61
|
dom === null || dom === void 0 ? void 0 : dom.appendChild(style);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
var cssStyleText = postcss(plugins).process(compiledStyle, {
|
|
80
|
-
from: undefined
|
|
81
|
-
}).css;
|
|
62
|
+
// const plugins: any[] = [postcssNested()]
|
|
63
|
+
// if (this.isPc) {
|
|
64
|
+
// plugins.push(prefixSelector({
|
|
65
|
+
// prefix: `.render-engine-${this.engine?.id}`,
|
|
66
|
+
// // 明确将前缀通过空格连接到每个选择器,避免重复前缀
|
|
67
|
+
// transform(prefix, selector) {
|
|
68
|
+
// if (selector.startsWith(prefix)) return selector
|
|
69
|
+
// return `${prefix} ${selector}`
|
|
70
|
+
// },
|
|
71
|
+
// }))
|
|
72
|
+
// }
|
|
73
|
+
// const cssStyleText = postcss(plugins).process(compiledStyle, { from: undefined }).css;
|
|
74
|
+
var cssStyleText = compiledStyle;
|
|
82
75
|
style.appendChild(document.createTextNode(cssStyleText));
|
|
83
76
|
}
|
|
84
77
|
}
|