@ibiz-template/vue3-util 0.3.5-alpha.1 → 0.3.6-dev.0
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.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/es/common/code-list/code-list.mjs +2 -1
- package/es/control/index.d.ts +2 -0
- package/es/control/index.d.ts.map +1 -0
- package/es/control/index.mjs +5 -0
- package/es/control/panel/index.d.ts +3 -0
- package/es/control/panel/index.d.ts.map +1 -0
- package/es/control/panel/index.mjs +4 -0
- package/es/control/panel/panel/index.d.ts +57 -0
- package/es/control/panel/panel/index.d.ts.map +1 -0
- package/es/control/panel/panel/index.mjs +13 -0
- package/es/control/panel/panel/panel.css +1 -0
- package/es/control/panel/panel/panel.d.ts +63 -0
- package/es/control/panel/panel/panel.d.ts.map +1 -0
- package/es/control/panel/panel/panel.mjs +135 -0
- package/es/control/panel/panel/panel.provider.d.ts +14 -0
- package/es/control/panel/panel/panel.provider.d.ts.map +1 -0
- package/es/control/panel/panel/panel.provider.mjs +8 -0
- package/es/control/panel/view-layout-panel/index.d.ts +58 -0
- package/es/control/panel/view-layout-panel/index.d.ts.map +1 -0
- package/es/control/panel/view-layout-panel/index.mjs +19 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.css +1 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +62 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +137 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.provider.d.ts +14 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.provider.d.ts.map +1 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.provider.mjs +8 -0
- package/es/index.d.ts +1 -0
- package/es/index.d.ts.map +1 -1
- package/es/index.mjs +3 -0
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +1 -2
- package/es/use/control/use-control-controller/use-control-controller.d.ts +10 -1
- package/es/use/control/use-control-controller/use-control-controller.d.ts.map +1 -1
- package/es/use/control/use-control-controller/use-control-controller.mjs +4 -4
- package/lib/index.cjs +10 -5
- package/package.json +6 -6
- package/src/common/code-list/code-list.tsx +1 -1
- package/src/control/index.ts +1 -0
- package/src/control/panel/index.ts +2 -0
- package/src/control/panel/panel/index.ts +12 -0
- package/src/control/panel/panel/panel.provider.ts +14 -0
- package/src/control/panel/panel/panel.scss +9 -0
- package/src/control/panel/panel/panel.tsx +160 -0
- package/src/control/panel/view-layout-panel/index.ts +18 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.provider.ts +14 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.scss +9 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +172 -0
- package/src/index.ts +1 -0
- package/src/plugin/plugin-factory/plugin-factory.ts +1 -2
- package/src/use/control/use-control-controller/use-control-controller.ts +18 -3
|
@@ -255,8 +255,7 @@ export class PluginFactory implements IPluginFactory {
|
|
|
255
255
|
if (this.devPackages.has(name)) {
|
|
256
256
|
const fn = this.devPackages.get(name)!;
|
|
257
257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
258
|
-
|
|
259
|
-
this.setPluginCode(pluginModule.default);
|
|
258
|
+
data = (await fn()) as any;
|
|
260
259
|
this.cache.set(scriptUrl, true);
|
|
261
260
|
} else if (ibiz.env.dev) {
|
|
262
261
|
data = await import(scriptUrl /* @vite-ignore */);
|
|
@@ -38,8 +38,12 @@ function watchAndUpdateContextParams(
|
|
|
38
38
|
* @param {IData} props
|
|
39
39
|
* @param {IControlController} control
|
|
40
40
|
*/
|
|
41
|
-
function watchAndUpdateState(
|
|
42
|
-
|
|
41
|
+
function watchAndUpdateState(
|
|
42
|
+
props: IData,
|
|
43
|
+
control: IControlController,
|
|
44
|
+
excludeFields: string[] = [],
|
|
45
|
+
): void {
|
|
46
|
+
const excludeKeys = ['context', 'params', 'modelData', ...excludeFields];
|
|
43
47
|
watch(
|
|
44
48
|
() => {
|
|
45
49
|
const watchProps: IData = {};
|
|
@@ -68,6 +72,16 @@ function watchAndUpdateState(props: IData, control: IControlController): void {
|
|
|
68
72
|
);
|
|
69
73
|
}
|
|
70
74
|
|
|
75
|
+
export interface extraOptions {
|
|
76
|
+
/**
|
|
77
|
+
* 排除监听的props里的key
|
|
78
|
+
* @author lxm
|
|
79
|
+
* @date 2023-11-22 06:11:45
|
|
80
|
+
* @type {string[]}
|
|
81
|
+
*/
|
|
82
|
+
excludePropsKeys: string[];
|
|
83
|
+
}
|
|
84
|
+
|
|
71
85
|
/**
|
|
72
86
|
* 初始化部件控制器
|
|
73
87
|
*
|
|
@@ -80,6 +94,7 @@ function watchAndUpdateState(props: IData, control: IControlController): void {
|
|
|
80
94
|
*/
|
|
81
95
|
export function useControlController<T extends IControlController>(
|
|
82
96
|
fn: (...args: ConstructorParameters<typeof ControlController>) => T,
|
|
97
|
+
opts?: Partial<extraOptions>,
|
|
83
98
|
): T {
|
|
84
99
|
// 获取上层组件的ctx
|
|
85
100
|
const ctx = useCtx();
|
|
@@ -104,7 +119,7 @@ export function useControlController<T extends IControlController>(
|
|
|
104
119
|
}
|
|
105
120
|
|
|
106
121
|
watchAndUpdateContextParams(props, c);
|
|
107
|
-
watchAndUpdateState(props, c);
|
|
122
|
+
watchAndUpdateState(props, c, opts?.excludePropsKeys);
|
|
108
123
|
|
|
109
124
|
c.state = reactive(c.state);
|
|
110
125
|
|