@ibiz-template/vue3-components 0.7.41-alpha.25 → 0.7.41-alpha.26
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-8V2VOkJ3.js → index-i-UdTGjq.js} +4 -4
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-8Ebtgl0o.js → wang-editor-3ZSVyG8N.js} +1 -1
- package/dist/{xlsx-util-_DMqcSDQ.js → xlsx-util-Ia8Tdyju.js} +1 -1
- package/es/control/tree-grid/tree-grid.mjs +16 -2
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +26 -5
- package/es/panel-component/app-switch/app-switch.controller.mjs +3 -0
- package/lib/control/tree-grid/tree-grid.cjs +15 -1
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +25 -4
- package/lib/panel-component/app-switch/app-switch.controller.cjs +3 -0
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isVNode, resolveComponent, createVNode, nextTick, watch, createTextVNode, renderSlot, mergeProps, defineComponent } from 'vue';
|
|
2
2
|
import { useControlController, useControlPopoverzIndex, useNamespace, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { recursiveIterate } from '@ibiz-template/core';
|
|
4
|
-
import { TreeGridController } from '@ibiz-template/runtime';
|
|
4
|
+
import { ScriptFactory, TreeGridController } from '@ibiz-template/runtime';
|
|
5
5
|
import { useRowEditPopover } from '../grid/row-edit-popover/use-row-edit-popover.mjs';
|
|
6
6
|
import '../grid/grid/index.mjs';
|
|
7
7
|
import { renderChildColumn } from '../grid/grid/grid.mjs';
|
|
@@ -11,6 +11,18 @@ import { useITableEvent, useAppGridPagination, useAppGridBase, useGridHeaderStyl
|
|
|
11
11
|
function _isSlot(s) {
|
|
12
12
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
13
13
|
}
|
|
14
|
+
function renderAttrs(model, params) {
|
|
15
|
+
var _a;
|
|
16
|
+
const attrs = {};
|
|
17
|
+
(_a = model.controlAttributes) == null ? void 0 : _a.forEach((item) => {
|
|
18
|
+
if (item.attrName && item.attrValue) {
|
|
19
|
+
attrs[item.attrName] = ScriptFactory.execSingleLine(item.attrValue, {
|
|
20
|
+
...params
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return attrs;
|
|
25
|
+
}
|
|
14
26
|
const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
15
27
|
name: "IBizTreeGridControl",
|
|
16
28
|
props: {
|
|
@@ -307,7 +319,9 @@ const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
|
307
319
|
hasChildren: "hasChildren"
|
|
308
320
|
},
|
|
309
321
|
"data": this.c.state.showTreeGrid ? state.treeGirdData : this.tableData
|
|
310
|
-
}, this.$attrs
|
|
322
|
+
}, this.$attrs, renderAttrs(this.c.model, {
|
|
323
|
+
...this.c.getEventArgs()
|
|
324
|
+
})), {
|
|
311
325
|
empty: this.renderNoData,
|
|
312
326
|
default: () => {
|
|
313
327
|
return [!state.singleSelect && createVNode(resolveComponent("el-table-column"), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isVNode, createVNode, resolveComponent, computed, ref, watchEffect, renderSlot, mergeProps, h, defineComponent } from 'vue';
|
|
2
2
|
import { useControlController, useControlPopoverzIndex, useNamespace, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { TreeGridExController } from '@ibiz-template/runtime';
|
|
3
|
+
import { ScriptFactory, TreeGridExController } from '@ibiz-template/runtime';
|
|
4
4
|
import { RuntimeError } from '@ibiz-template/core';
|
|
5
5
|
import { createUUID } from 'qx-util';
|
|
6
6
|
import { useRowEditPopover } from './use-row-edit-popover.mjs';
|
|
@@ -10,6 +10,18 @@ import './tree-grid-ex.css';
|
|
|
10
10
|
function _isSlot(s) {
|
|
11
11
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
12
12
|
}
|
|
13
|
+
function renderAttrs(model, params) {
|
|
14
|
+
var _a;
|
|
15
|
+
const attrs = {};
|
|
16
|
+
(_a = model.controlAttributes) == null ? void 0 : _a.forEach((item) => {
|
|
17
|
+
if (item.attrName && item.attrValue) {
|
|
18
|
+
attrs[item.attrName] = ScriptFactory.execSingleLine(item.attrValue, {
|
|
19
|
+
...params
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return attrs;
|
|
24
|
+
}
|
|
13
25
|
const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
14
26
|
name: "IBizTreeGridExControl",
|
|
15
27
|
props: {
|
|
@@ -84,7 +96,8 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
84
96
|
const temp = {
|
|
85
97
|
id: node._id,
|
|
86
98
|
_uuid: node._uuid,
|
|
87
|
-
hasChildren: !node._leaf
|
|
99
|
+
hasChildren: !node._leaf,
|
|
100
|
+
_deData: node._deData
|
|
88
101
|
};
|
|
89
102
|
if (!noChild && !node._leaf && node._children !== void 0) {
|
|
90
103
|
temp.children = toElNodes(node._children);
|
|
@@ -249,10 +262,16 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
249
262
|
const rowState = this.c.getRowState(row.id);
|
|
250
263
|
if (rowState) {
|
|
251
264
|
const comp = resolveComponent(this.c.providers[columnName].component);
|
|
265
|
+
const nodeData = rowState.data;
|
|
266
|
+
const nodeModel = this.c.getNodeModel(nodeData._nodeId);
|
|
252
267
|
return h(comp, {
|
|
253
268
|
controller: columnC,
|
|
254
269
|
row: rowState,
|
|
255
|
-
key: rowState.data._uuid + columnName
|
|
270
|
+
key: rowState.data._uuid + columnName,
|
|
271
|
+
attrs: renderAttrs(nodeModel, {
|
|
272
|
+
...this.c.getEventArgs(),
|
|
273
|
+
data: rowState.data
|
|
274
|
+
})
|
|
256
275
|
});
|
|
257
276
|
}
|
|
258
277
|
return null;
|
|
@@ -266,7 +285,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
266
285
|
"controller": this.c,
|
|
267
286
|
"class": [this.ns.b()]
|
|
268
287
|
}, {
|
|
269
|
-
default: () => [this.c.state.isLoaded && createVNode(resolveComponent("el-table"), {
|
|
288
|
+
default: () => [this.c.state.isLoaded && createVNode(resolveComponent("el-table"), mergeProps({
|
|
270
289
|
"ref": "tableRef",
|
|
271
290
|
"key": this.tableRefreshKey,
|
|
272
291
|
"class": this.ns.e("table"),
|
|
@@ -282,7 +301,9 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
282
301
|
"onExpandChange": this.onExpandChange,
|
|
283
302
|
"row-class-name": this.handleRowClassName,
|
|
284
303
|
"load": this.loadData
|
|
285
|
-
}, {
|
|
304
|
+
}, renderAttrs(this.c.model, {
|
|
305
|
+
...this.c.getEventArgs()
|
|
306
|
+
})), {
|
|
286
307
|
empty: this.renderNoData,
|
|
287
308
|
default: () => {
|
|
288
309
|
return [this.renderColumns.map((model, index) => {
|
|
@@ -192,6 +192,9 @@ class AppSwitchController extends PanelItemController {
|
|
|
192
192
|
return result;
|
|
193
193
|
}
|
|
194
194
|
const defaultAppModel = ibiz.hub.getAppSourceModel(defaultApp.appId);
|
|
195
|
+
if (!defaultAppModel || !defaultAppModel.cache) {
|
|
196
|
+
return result;
|
|
197
|
+
}
|
|
195
198
|
const allAppIndexViews = (_b = (_a = defaultAppModel.cache) == null ? void 0 : _a.getPSAppViews) == null ? void 0 : _b.filter(
|
|
196
199
|
(appView) => {
|
|
197
200
|
return appView.viewType === "APPINDEXVIEW";
|
|
@@ -13,6 +13,18 @@ var gridControl_util = require('../grid/grid/grid-control.util.cjs');
|
|
|
13
13
|
function _isSlot(s) {
|
|
14
14
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
15
15
|
}
|
|
16
|
+
function renderAttrs(model, params) {
|
|
17
|
+
var _a;
|
|
18
|
+
const attrs = {};
|
|
19
|
+
(_a = model.controlAttributes) == null ? void 0 : _a.forEach((item) => {
|
|
20
|
+
if (item.attrName && item.attrValue) {
|
|
21
|
+
attrs[item.attrName] = runtime.ScriptFactory.execSingleLine(item.attrValue, {
|
|
22
|
+
...params
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return attrs;
|
|
27
|
+
}
|
|
16
28
|
const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
17
29
|
name: "IBizTreeGridControl",
|
|
18
30
|
props: {
|
|
@@ -309,7 +321,9 @@ const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
309
321
|
hasChildren: "hasChildren"
|
|
310
322
|
},
|
|
311
323
|
"data": this.c.state.showTreeGrid ? state.treeGirdData : this.tableData
|
|
312
|
-
}, this.$attrs
|
|
324
|
+
}, this.$attrs, renderAttrs(this.c.model, {
|
|
325
|
+
...this.c.getEventArgs()
|
|
326
|
+
})), {
|
|
313
327
|
empty: this.renderNoData,
|
|
314
328
|
default: () => {
|
|
315
329
|
return [!state.singleSelect && vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
@@ -12,6 +12,18 @@ require('./tree-grid-ex.css');
|
|
|
12
12
|
function _isSlot(s) {
|
|
13
13
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14
14
|
}
|
|
15
|
+
function renderAttrs(model, params) {
|
|
16
|
+
var _a;
|
|
17
|
+
const attrs = {};
|
|
18
|
+
(_a = model.controlAttributes) == null ? void 0 : _a.forEach((item) => {
|
|
19
|
+
if (item.attrName && item.attrValue) {
|
|
20
|
+
attrs[item.attrName] = runtime.ScriptFactory.execSingleLine(item.attrValue, {
|
|
21
|
+
...params
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return attrs;
|
|
26
|
+
}
|
|
15
27
|
const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
16
28
|
name: "IBizTreeGridExControl",
|
|
17
29
|
props: {
|
|
@@ -86,7 +98,8 @@ const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
98
|
const temp = {
|
|
87
99
|
id: node._id,
|
|
88
100
|
_uuid: node._uuid,
|
|
89
|
-
hasChildren: !node._leaf
|
|
101
|
+
hasChildren: !node._leaf,
|
|
102
|
+
_deData: node._deData
|
|
90
103
|
};
|
|
91
104
|
if (!noChild && !node._leaf && node._children !== void 0) {
|
|
92
105
|
temp.children = toElNodes(node._children);
|
|
@@ -251,10 +264,16 @@ const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
251
264
|
const rowState = this.c.getRowState(row.id);
|
|
252
265
|
if (rowState) {
|
|
253
266
|
const comp = vue.resolveComponent(this.c.providers[columnName].component);
|
|
267
|
+
const nodeData = rowState.data;
|
|
268
|
+
const nodeModel = this.c.getNodeModel(nodeData._nodeId);
|
|
254
269
|
return vue.h(comp, {
|
|
255
270
|
controller: columnC,
|
|
256
271
|
row: rowState,
|
|
257
|
-
key: rowState.data._uuid + columnName
|
|
272
|
+
key: rowState.data._uuid + columnName,
|
|
273
|
+
attrs: renderAttrs(nodeModel, {
|
|
274
|
+
...this.c.getEventArgs(),
|
|
275
|
+
data: rowState.data
|
|
276
|
+
})
|
|
258
277
|
});
|
|
259
278
|
}
|
|
260
279
|
return null;
|
|
@@ -268,7 +287,7 @@ const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
268
287
|
"controller": this.c,
|
|
269
288
|
"class": [this.ns.b()]
|
|
270
289
|
}, {
|
|
271
|
-
default: () => [this.c.state.isLoaded && vue.createVNode(vue.resolveComponent("el-table"), {
|
|
290
|
+
default: () => [this.c.state.isLoaded && vue.createVNode(vue.resolveComponent("el-table"), vue.mergeProps({
|
|
272
291
|
"ref": "tableRef",
|
|
273
292
|
"key": this.tableRefreshKey,
|
|
274
293
|
"class": this.ns.e("table"),
|
|
@@ -284,7 +303,9 @@ const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
284
303
|
"onExpandChange": this.onExpandChange,
|
|
285
304
|
"row-class-name": this.handleRowClassName,
|
|
286
305
|
"load": this.loadData
|
|
287
|
-
}, {
|
|
306
|
+
}, renderAttrs(this.c.model, {
|
|
307
|
+
...this.c.getEventArgs()
|
|
308
|
+
})), {
|
|
288
309
|
empty: this.renderNoData,
|
|
289
310
|
default: () => {
|
|
290
311
|
return [this.renderColumns.map((model, index) => {
|
|
@@ -194,6 +194,9 @@ class AppSwitchController extends runtime.PanelItemController {
|
|
|
194
194
|
return result;
|
|
195
195
|
}
|
|
196
196
|
const defaultAppModel = ibiz.hub.getAppSourceModel(defaultApp.appId);
|
|
197
|
+
if (!defaultAppModel || !defaultAppModel.cache) {
|
|
198
|
+
return result;
|
|
199
|
+
}
|
|
197
200
|
const allAppIndexViews = (_b = (_a = defaultAppModel.cache) == null ? void 0 : _a.getPSAppViews) == null ? void 0 : _b.filter(
|
|
198
201
|
(appView) => {
|
|
199
202
|
return appView.viewType === "APPINDEXVIEW";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.26",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"@ibiz-template-plugin/data-view": "0.0.5",
|
|
37
37
|
"@ibiz-template/core": "0.7.41-alpha.23",
|
|
38
38
|
"@ibiz-template/devtool": "0.0.11",
|
|
39
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
40
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
39
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.25",
|
|
40
|
+
"@ibiz-template/runtime": "0.7.41-alpha.25",
|
|
41
41
|
"@ibiz-template/theme": "0.7.39",
|
|
42
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
42
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.25",
|
|
43
43
|
"@ibiz-template/web-theme": "3.8.0",
|
|
44
44
|
"@ibiz/model-core": "^0.1.81",
|
|
45
45
|
"@imengyu/vue3-context-menu": "^1.3.5",
|