@ibiz-template/vue3-components 0.6.16 → 0.7.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/chart-jfPZ04eU.js +1 -0
- package/dist/index-Wk7Kbc7Z.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-94ZSfJEl.js → xlsx-util-keqImqNu.js} +1 -1
- package/es/common/pagination/pagination.d.ts +9 -0
- package/es/common/pagination/pagination.mjs +12 -2
- package/es/common/view-message/view-message.css +1 -1
- package/es/common/view-message/view-message.d.ts +27 -1
- package/es/common/view-message/view-message.mjs +130 -17
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/caption-bar/caption-bar.mjs +3 -1
- package/es/control/chart/chart.css +1 -1
- package/es/control/chart/chart.d.ts +3 -1
- package/es/control/chart/chart.mjs +70 -6
- package/es/control/data-view/data-view.mjs +1 -0
- package/es/control/drbar/drbar.controller.d.ts +9 -0
- package/es/control/drbar/drbar.controller.mjs +31 -17
- package/es/control/drtab/drtab.controller.d.ts +9 -0
- package/es/control/drtab/drtab.controller.mjs +16 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +13 -4
- package/es/control/form/form-detail/form-mdctrl/index.d.ts +1 -0
- package/es/control/form/form-detail/form-rawitem/form-rawitem.d.ts +2 -1
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +31 -1
- package/es/control/form/form-detail/form-rawitem/index.d.ts +1 -0
- package/es/control/grid/grid/grid.mjs +1 -0
- package/es/control/grid/grid-column/grid-field-edit-column/cell-edit.mjs +3 -1
- package/es/control/list/list.mjs +1 -0
- package/es/control/search-bar/filter-tree/filter-tree.d.ts +3 -3
- package/es/control/search-bar/filter-tree/filter-tree.mjs +98 -37
- package/es/control/search-bar/index.d.ts +1 -0
- package/es/control/search-bar/index.mjs +2 -0
- package/es/control/search-bar/quick-search-select/quick-search-select.css +1 -0
- package/es/control/search-bar/quick-search-select/quick-search-select.d.ts +16 -0
- package/es/control/search-bar/quick-search-select/quick-search-select.mjs +72 -0
- package/es/control/search-bar/search-bar.css +1 -1
- package/es/control/search-bar/search-bar.d.ts +1 -0
- package/es/control/search-bar/search-bar.mjs +14 -3
- package/es/control/toolbar/index.d.ts +1 -0
- package/es/control/toolbar/toolbar.d.ts +1 -0
- package/es/control/toolbar/toolbar.mjs +15 -14
- package/es/control/tree-grid/tree-grid.mjs +1 -0
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/cell-edit.mjs +3 -1
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +11 -3
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +5 -7
- package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.mjs +5 -7
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +19 -10
- package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +13 -5
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +7 -0
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +6 -8
- package/es/editor/text-box/input/input.mjs +7 -9
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +9 -11
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/es/panel-component/nav-tabs/nav-tabs.mjs +7 -1
- package/es/panel-component/panel-index-view-search/index.d.ts +1 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +1 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +22 -2
- package/es/panel-component/view-msg-pos/index.d.ts +25 -0
- package/es/panel-component/view-msg-pos/index.mjs +16 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.controller.d.ts +21 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.controller.mjs +48 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.d.ts +25 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.mjs +47 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.provider.d.ts +16 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.provider.mjs +21 -0
- package/es/view-engine/index.mjs +4 -0
- package/es/view-engine/panel-view-engine.d.ts +2 -2
- package/es/web-app/App.mjs +9 -1
- package/es/web-app/main.mjs +8 -1
- package/lib/common/pagination/pagination.cjs +12 -2
- package/lib/common/view-message/view-message.cjs +129 -16
- package/lib/common/view-message/view-message.css +1 -1
- package/lib/control/caption-bar/caption-bar.cjs +3 -1
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/chart/chart.cjs +69 -5
- package/lib/control/chart/chart.css +1 -1
- package/lib/control/data-view/data-view.cjs +1 -0
- package/lib/control/drbar/drbar.controller.cjs +31 -17
- package/lib/control/drtab/drtab.controller.cjs +16 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +13 -4
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +30 -0
- package/lib/control/grid/grid/grid.cjs +1 -0
- package/lib/control/grid/grid-column/grid-field-edit-column/cell-edit.cjs +3 -1
- package/lib/control/list/list.cjs +1 -0
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +98 -37
- package/lib/control/search-bar/index.cjs +2 -0
- package/lib/control/search-bar/quick-search-select/quick-search-select.cjs +74 -0
- package/lib/control/search-bar/quick-search-select/quick-search-select.css +1 -0
- package/lib/control/search-bar/search-bar.cjs +14 -3
- package/lib/control/search-bar/search-bar.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +15 -14
- package/lib/control/tree-grid/tree-grid.cjs +1 -0
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/cell-edit.cjs +3 -1
- package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +11 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +5 -7
- package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.cjs +5 -7
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +19 -10
- package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +13 -5
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +7 -0
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +6 -8
- package/lib/editor/text-box/input/input.cjs +7 -9
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +8 -10
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/nav-tabs/nav-tabs.cjs +7 -1
- package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +21 -1
- package/lib/panel-component/view-msg-pos/index.cjs +22 -0
- package/lib/panel-component/view-msg-pos/view-msg-pos.cjs +49 -0
- package/lib/panel-component/view-msg-pos/view-msg-pos.controller.cjs +50 -0
- package/lib/panel-component/view-msg-pos/view-msg-pos.provider.cjs +23 -0
- package/lib/view-engine/index.cjs +4 -0
- package/lib/web-app/App.cjs +8 -0
- package/lib/web-app/main.cjs +7 -0
- package/package.json +14 -14
- package/dist/chart-IsmrW_d0.js +0 -1
- package/dist/index-l_9Kqet_.js +0 -4
|
@@ -25,10 +25,14 @@ const FormMDCtrl = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
vue3Util.useController(props.controller);
|
|
26
26
|
const c = props.controller;
|
|
27
27
|
const hasCaption = c.model.showCaption && !!c.model.caption;
|
|
28
|
+
const onActionClick = async (detail, event) => {
|
|
29
|
+
await props.controller.onActionClick(detail, event);
|
|
30
|
+
};
|
|
28
31
|
return {
|
|
29
32
|
c,
|
|
30
33
|
ns,
|
|
31
|
-
hasCaption
|
|
34
|
+
hasCaption,
|
|
35
|
+
onActionClick
|
|
32
36
|
};
|
|
33
37
|
},
|
|
34
38
|
render() {
|
|
@@ -60,11 +64,16 @@ const FormMDCtrl = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
64
|
}
|
|
61
65
|
return vue.createVNode("div", {
|
|
62
66
|
"class": [this.ns.b(), this.ns.m(this.modelData.codeName), ...this.controller.containerClass, this.hasCaption ? this.ns.m("show-caption") : ""]
|
|
63
|
-
}, [
|
|
67
|
+
}, [vue.createVNode("div", {
|
|
64
68
|
"class": this.ns.b("header")
|
|
65
|
-
}, [vue.createVNode("
|
|
69
|
+
}, [vue.createVNode("div", {
|
|
66
70
|
"class": this.ns.e("title")
|
|
67
|
-
}, [this.c.model.caption])
|
|
71
|
+
}, [this.hasCaption ? this.c.model.caption : ""]), model.uiactionGroup && vue.createVNode(vue.resolveComponent("iBizActionToolbar"), {
|
|
72
|
+
"class": this.ns.e("toolbar"),
|
|
73
|
+
"action-details": model.uiactionGroup.uiactionGroupDetails,
|
|
74
|
+
"actions-state": this.controller.state.actionGroupState,
|
|
75
|
+
"onActionClick": this.onActionClick
|
|
76
|
+
}, null)]), content]);
|
|
68
77
|
}
|
|
69
78
|
});
|
|
70
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-form-mdctrl{--ibiz-form-mdctrl-header-height:
|
|
1
|
+
.ibiz-form-mdctrl{--ibiz-form-mdctrl-header-height:49px}.ibiz-form-mdctrl__toolbar{display:flex;justify-content:flex-end;width:50%}.ibiz-form-mdctrl__title{width:50%;font-size:var(--ibiz-font-size-header-5);font-weight:var(--ibiz-font-weight-bold)}.ibiz-form-mdctrl-header{display:flex;place-content:center space-between;align-items:center;height:var(--ibiz-form-mdctrl-header-height);padding:var(--ibiz-spacing-base-tight) 0;margin:6px var(--ibiz-spacing-base-tight);line-height:var(--ibiz-form-mdctrl-header-height);border-bottom:1px solid var(--ibiz-color-border)}
|
|
@@ -22,14 +22,43 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
22
22
|
},
|
|
23
23
|
setup(props) {
|
|
24
24
|
const ns = vue3Util.useNamespace("form-raw-item");
|
|
25
|
+
const c = props.controller;
|
|
26
|
+
const content = vue.ref("");
|
|
25
27
|
const showFormDefaultContent = vue.computed(() => {
|
|
26
28
|
if (props.controller.form.controlParams && props.controller.form.controlParams.editmode === "hover") {
|
|
27
29
|
return true;
|
|
28
30
|
}
|
|
29
31
|
return false;
|
|
30
32
|
});
|
|
33
|
+
vue.watch(() => c.data, async (newVal) => {
|
|
34
|
+
if (newVal) {
|
|
35
|
+
const rawItemModel = c.model.rawItem;
|
|
36
|
+
if (!rawItemModel) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
let rawItemContent = "";
|
|
40
|
+
const obj = {
|
|
41
|
+
...newVal
|
|
42
|
+
};
|
|
43
|
+
if (rawItemModel.contentType === "RAW") {
|
|
44
|
+
rawItemContent = rawItemModel.caption;
|
|
45
|
+
} else if (rawItemModel.contentType === "HTML") {
|
|
46
|
+
rawItemContent = rawItemModel.content;
|
|
47
|
+
}
|
|
48
|
+
if (rawItemContent && rawItemModel.templateMode) {
|
|
49
|
+
content.value = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
|
|
50
|
+
data: {
|
|
51
|
+
...newVal
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
immediate: true
|
|
58
|
+
});
|
|
31
59
|
return {
|
|
32
60
|
ns,
|
|
61
|
+
content,
|
|
33
62
|
showFormDefaultContent
|
|
34
63
|
};
|
|
35
64
|
},
|
|
@@ -40,6 +69,7 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
69
|
return vue.createVNode(vue.resolveComponent("iBizRawItem"), {
|
|
41
70
|
"class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("show-default", this.showFormDefaultContent)],
|
|
42
71
|
"rawItem": this.modelData,
|
|
72
|
+
"content": this.content,
|
|
43
73
|
"onClick": (event) => this.controller.onClick(event)
|
|
44
74
|
}, null);
|
|
45
75
|
}
|
|
@@ -294,6 +294,7 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
294
294
|
"total": state.total,
|
|
295
295
|
"curPage": state.curPage,
|
|
296
296
|
"size": state.size,
|
|
297
|
+
"totalPages": state.totalPages,
|
|
297
298
|
"onChange": this.onPageChange,
|
|
298
299
|
"onPageSizeChange": this.onPageSizeChange,
|
|
299
300
|
"onPageRefresh": this.onPageRefresh
|
|
@@ -29,7 +29,9 @@ function useCellEdit(props, componentRef) {
|
|
|
29
29
|
return !editorShowEdit.value;
|
|
30
30
|
});
|
|
31
31
|
const editorDisabled = false;
|
|
32
|
-
const isAutoFocus =
|
|
32
|
+
const isAutoFocus = vue.computed(() => {
|
|
33
|
+
return !hasError.value;
|
|
34
|
+
});
|
|
33
35
|
const showEditMask = vue.computed(() => {
|
|
34
36
|
return cellEditable.value && !editable.value;
|
|
35
37
|
});
|
|
@@ -214,6 +214,7 @@ const ListControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
214
214
|
"total": this.c.state.total,
|
|
215
215
|
"curPage": this.c.state.curPage,
|
|
216
216
|
"size": this.c.state.size,
|
|
217
|
+
"totalPages": this.c.state.totalPages,
|
|
217
218
|
"onChange": this.onPageChange,
|
|
218
219
|
"onPageSizeChange": this.onPageSizeChange,
|
|
219
220
|
"onPageRefresh": this.onPageRefresh
|
|
@@ -4,6 +4,7 @@ var vue = require('vue');
|
|
|
4
4
|
var runtime = require('@ibiz-template/runtime');
|
|
5
5
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
6
|
require('./filter-tree.css');
|
|
7
|
+
var qxUtil = require('qx-util');
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
9
10
|
function _isSlot(s) {
|
|
@@ -92,33 +93,49 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
92
93
|
const UiFilterNodes = vue.computed(() => {
|
|
93
94
|
return props.filterNodes;
|
|
94
95
|
});
|
|
95
|
-
const findFilterController = (
|
|
96
|
+
const findFilterController = (node) => {
|
|
97
|
+
if (node.nodeType === "ITEMS" && node.simple) {
|
|
98
|
+
const subNode = node.children[0];
|
|
99
|
+
return props.filterControllers.find((item) => {
|
|
100
|
+
if (item.type === "SIMPLE_ITEMS") {
|
|
101
|
+
const simpleC = item;
|
|
102
|
+
if (simpleC.fieldName === node.field && simpleC.valueOP === node.valueOP && simpleC.subFieldName === subNode.field && simpleC.subValueOP === subNode.valueOP) {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return false;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const {
|
|
110
|
+
field,
|
|
111
|
+
valueOP
|
|
112
|
+
} = node;
|
|
96
113
|
return props.filterControllers.find((item) => {
|
|
97
|
-
if (item.
|
|
114
|
+
if (item.type === "SIMPLE_ITEMS") {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
if (item.fieldName === field) {
|
|
98
118
|
return item.valueOP ? item.valueOP === valueOP : true;
|
|
99
119
|
}
|
|
100
120
|
return false;
|
|
101
121
|
});
|
|
102
122
|
};
|
|
103
123
|
const allFields = [];
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
const field = fieldInfos.find((item) => item.name === fieldName);
|
|
109
|
-
if (!field) {
|
|
124
|
+
props.filterControllers.forEach((filterC) => {
|
|
125
|
+
let find = allFields.find((x) => x.name === filterC.key);
|
|
126
|
+
if (filterC.hidden) {
|
|
110
127
|
return;
|
|
111
128
|
}
|
|
112
|
-
return field.valueOPs;
|
|
113
|
-
};
|
|
114
|
-
props.filterControllers.forEach((filterC) => {
|
|
115
|
-
let find = allFields.find((x) => x.name === filterC.fieldName);
|
|
116
129
|
if (find === void 0) {
|
|
117
130
|
find = {
|
|
118
|
-
name: filterC.
|
|
131
|
+
name: filterC.key,
|
|
132
|
+
fieldName: filterC.fieldName,
|
|
119
133
|
label: filterC.label,
|
|
120
134
|
valueOPs: []
|
|
121
135
|
};
|
|
136
|
+
if (filterC.type === "SIMPLE_ITEMS") {
|
|
137
|
+
find.simpleFilterC = filterC;
|
|
138
|
+
}
|
|
122
139
|
allFields.push(find);
|
|
123
140
|
}
|
|
124
141
|
if (!filterC.valueOP) {
|
|
@@ -127,25 +144,38 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
127
144
|
find.valueOPs.push(filterC.valueOP);
|
|
128
145
|
}
|
|
129
146
|
});
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
147
|
+
const getFilterModes = (fieldName, fieldInfos = allFields) => {
|
|
148
|
+
if (!fieldName) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const field = fieldInfos.find((item) => item.name === fieldName);
|
|
152
|
+
if (!field) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
return field.valueOPs;
|
|
156
|
+
};
|
|
157
|
+
const onFieldSelect = (node, key, fields = allFields) => {
|
|
158
|
+
const fieldInfo = fields.find((item) => item.name === key);
|
|
159
|
+
if (!fieldInfo) {
|
|
160
|
+
ibiz.log.error("allFields\u627E\u4E0D\u5230\u5C5E\u6027\u6807\u8BC6\u4E3A".concat(key, "\u7684"));
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
qxUtil.clearAll(node);
|
|
164
|
+
if (fieldInfo.simpleFilterC) {
|
|
165
|
+
fieldInfo.simpleFilterC.addSimpleFilterNode(node);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
node.nodeType = "FIELD";
|
|
169
|
+
node.field = fieldInfo.fieldName;
|
|
139
170
|
};
|
|
140
171
|
const onValueOPSelect = (node, valueOP) => {
|
|
141
172
|
node.valueOP = valueOP;
|
|
142
173
|
node.value = null;
|
|
143
174
|
if (["EXISTS", "NOTEXISTS"].includes(valueOP)) {
|
|
144
175
|
Object.assign(node, {
|
|
145
|
-
|
|
146
|
-
logicType: "ITEMS",
|
|
176
|
+
nodeType: "ITEMS",
|
|
147
177
|
children: [{
|
|
148
|
-
|
|
178
|
+
nodeType: "FIELD",
|
|
149
179
|
field: null,
|
|
150
180
|
valueOP: null,
|
|
151
181
|
value: null
|
|
@@ -153,8 +183,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
153
183
|
});
|
|
154
184
|
} else {
|
|
155
185
|
Object.assign(node, {
|
|
156
|
-
|
|
157
|
-
logicType: void 0,
|
|
186
|
+
nodeType: "FIELD",
|
|
158
187
|
children: void 0
|
|
159
188
|
});
|
|
160
189
|
}
|
|
@@ -164,10 +193,10 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
164
193
|
};
|
|
165
194
|
const addGroup = (node) => {
|
|
166
195
|
node.children.push({
|
|
167
|
-
|
|
196
|
+
nodeType: "GROUP",
|
|
168
197
|
logicType: "AND",
|
|
169
198
|
children: [{
|
|
170
|
-
|
|
199
|
+
nodeType: "FIELD",
|
|
171
200
|
field: null,
|
|
172
201
|
valueOP: null,
|
|
173
202
|
value: null
|
|
@@ -176,7 +205,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
176
205
|
};
|
|
177
206
|
const addItem = (node) => {
|
|
178
207
|
node.children.push({
|
|
179
|
-
|
|
208
|
+
nodeType: "FIELD",
|
|
180
209
|
field: null,
|
|
181
210
|
valueOP: null,
|
|
182
211
|
value: null
|
|
@@ -214,6 +243,9 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
214
243
|
};
|
|
215
244
|
const renderFilterItem = (node, itemsC) => {
|
|
216
245
|
let _slot;
|
|
246
|
+
if (node.hidden) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
217
249
|
let fieldInfos = allFields;
|
|
218
250
|
if (itemsC) {
|
|
219
251
|
fieldInfos = itemsC.allFields;
|
|
@@ -225,7 +257,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
225
257
|
const subFilterC = itemsC.getSubFilterController(node.field, node.valueOP);
|
|
226
258
|
editor = renderEditor(node, subFilterC);
|
|
227
259
|
} else {
|
|
228
|
-
const filterC = findFilterController(node
|
|
260
|
+
const filterC = findFilterController(node);
|
|
229
261
|
if (filterC && !["EXISTS", "NOTEXISTS"].includes(filterC.valueOP)) {
|
|
230
262
|
editor = renderEditor(node, filterC);
|
|
231
263
|
}
|
|
@@ -239,7 +271,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
239
271
|
"teleported": false,
|
|
240
272
|
"class": ns.e("field-select"),
|
|
241
273
|
"onChange": (field) => {
|
|
242
|
-
onFieldSelect(node, field);
|
|
274
|
+
onFieldSelect(node, field, fieldInfos);
|
|
243
275
|
}
|
|
244
276
|
}, _isSlot(_slot = fieldInfos.map((field) => {
|
|
245
277
|
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
@@ -261,7 +293,10 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
261
293
|
};
|
|
262
294
|
let renderFilterItems = (_node) => vue.createVNode("div", null, null);
|
|
263
295
|
const renderFilterGroup = (node, itemsC) => {
|
|
264
|
-
if (node.
|
|
296
|
+
if (node.hidden) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (node.nodeType === "ITEMS") {
|
|
265
300
|
return renderFilterItems(node);
|
|
266
301
|
}
|
|
267
302
|
return vue.createVNode("div", {
|
|
@@ -303,7 +338,10 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
303
338
|
})]), vue.createVNode("div", {
|
|
304
339
|
"class": ns.be("group", "list")
|
|
305
340
|
}, [node.children.length > 0 && node.children.map((child, index) => {
|
|
306
|
-
const childContent = child.
|
|
341
|
+
const childContent = child.nodeType === "FIELD" ? renderFilterItem(child, itemsC) : renderFilterGroup(child, itemsC);
|
|
342
|
+
if (!childContent) {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
307
345
|
return vue.createVNode("div", {
|
|
308
346
|
"class": ns.be("group", "list-item")
|
|
309
347
|
}, [vue.createVNode("div", {
|
|
@@ -320,7 +358,30 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
320
358
|
})])]);
|
|
321
359
|
};
|
|
322
360
|
renderFilterItems = (node) => {
|
|
323
|
-
const itemsC = findFilterController(node
|
|
361
|
+
const itemsC = findFilterController(node);
|
|
362
|
+
if (node.simple) {
|
|
363
|
+
let _slot2;
|
|
364
|
+
const child = node.children[0];
|
|
365
|
+
if (!child) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
return [vue.createVNode(vue.resolveComponent("el-select"), {
|
|
369
|
+
"model-value": itemsC.key,
|
|
370
|
+
"teleported": false,
|
|
371
|
+
"class": ns.e("field-select"),
|
|
372
|
+
"onChange": (field) => {
|
|
373
|
+
onFieldSelect(node, field);
|
|
374
|
+
}
|
|
375
|
+
}, _isSlot(_slot2 = allFields.map((field) => {
|
|
376
|
+
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
377
|
+
"key": field.name,
|
|
378
|
+
"value": field.name,
|
|
379
|
+
"label": field.label
|
|
380
|
+
}, null);
|
|
381
|
+
})) ? _slot2 : {
|
|
382
|
+
default: () => [_slot2]
|
|
383
|
+
}), renderEditor(child, itemsC)];
|
|
384
|
+
}
|
|
324
385
|
return vue.createVNode("div", {
|
|
325
386
|
"class": (ns.b("group"), ns.bm("group", "items"))
|
|
326
387
|
}, [vue.createVNode("div", {
|
|
@@ -335,7 +396,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
335
396
|
})]), vue.createVNode("div", {
|
|
336
397
|
"class": ns.be("group", "list")
|
|
337
398
|
}, [node.children.length > 0 && node.children.map((child, index) => {
|
|
338
|
-
const childContent = child.
|
|
399
|
+
const childContent = child.nodeType === "FIELD" ? renderFilterItem(child, itemsC) : renderFilterGroup(child, itemsC);
|
|
339
400
|
return vue.createVNode("div", {
|
|
340
401
|
"class": ns.be("group", "list-item")
|
|
341
402
|
}, [vue.createVNode("div", {
|
|
@@ -371,7 +432,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
371
432
|
return vue.createVNode("div", {
|
|
372
433
|
"class": [this.ns.b()]
|
|
373
434
|
}, [this.UiFilterNodes.length > 0 && this.UiFilterNodes.map((node) => {
|
|
374
|
-
if (node.
|
|
435
|
+
if (node.nodeType === "FIELD") {
|
|
375
436
|
return this.renderFilterItem(node);
|
|
376
437
|
}
|
|
377
438
|
return this.renderFilterGroup(node);
|
|
@@ -9,6 +9,7 @@ var searchBar_provider = require('./search-bar.provider.cjs');
|
|
|
9
9
|
var filterTree = require('./filter-tree/filter-tree.cjs');
|
|
10
10
|
var filterModeSelect = require('./filter-mode-select/filter-mode-select.cjs');
|
|
11
11
|
var searchGroups = require('./search-groups/search-groups.cjs');
|
|
12
|
+
var quickSearchSelect = require('./quick-search-select/quick-search-select.cjs');
|
|
12
13
|
|
|
13
14
|
"use strict";
|
|
14
15
|
const IBizSearchBarControl = vue3Util.withInstall(
|
|
@@ -18,6 +19,7 @@ const IBizSearchBarControl = vue3Util.withInstall(
|
|
|
18
19
|
v.component(filterTree.FilterTreeControl.name, filterTree.FilterTreeControl);
|
|
19
20
|
v.component(filterModeSelect.FilterModeSelect.name, filterModeSelect.FilterModeSelect);
|
|
20
21
|
v.component(searchGroups.SearchGroups.name, searchGroups.SearchGroups);
|
|
22
|
+
v.component(quickSearchSelect.QuickSearchSelect.name, quickSearchSelect.QuickSearchSelect);
|
|
21
23
|
runtime.registerControlProvider(
|
|
22
24
|
runtime.ControlType.SEARCHBAR,
|
|
23
25
|
() => new searchBar_provider.SearchBarProvider()
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var runtime = require('@ibiz-template/runtime');
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
require('./quick-search-select.css');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
function _isSlot(s) {
|
|
10
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
11
|
+
}
|
|
12
|
+
const QuickSearchSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
name: "IBizQuickSearchSelect",
|
|
14
|
+
props: {
|
|
15
|
+
controller: {
|
|
16
|
+
type: runtime.SearchBarController,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(props) {
|
|
21
|
+
const ns = vue3Util.useNamespace("quick-search-select");
|
|
22
|
+
const onItemClick = (item) => {
|
|
23
|
+
const key = item.fieldName;
|
|
24
|
+
const {
|
|
25
|
+
quickSearchFieldNames
|
|
26
|
+
} = props.controller.state;
|
|
27
|
+
const index = quickSearchFieldNames.indexOf(key);
|
|
28
|
+
if (index === -1) {
|
|
29
|
+
quickSearchFieldNames.push(key);
|
|
30
|
+
} else {
|
|
31
|
+
quickSearchFieldNames.splice(index, 1);
|
|
32
|
+
}
|
|
33
|
+
props.controller.calcQuickSearchPlaceHolder();
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
ns,
|
|
37
|
+
onItemClick
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
render() {
|
|
41
|
+
const {
|
|
42
|
+
state
|
|
43
|
+
} = this.controller;
|
|
44
|
+
return vue.createVNode(vue.resolveComponent("el-dropdown"), {
|
|
45
|
+
"onCommand": this.onItemClick,
|
|
46
|
+
"trigger": "click",
|
|
47
|
+
"hide-on-click": false,
|
|
48
|
+
"class": [this.ns.b()],
|
|
49
|
+
"popper-class": [this.ns.b("popover")]
|
|
50
|
+
}, {
|
|
51
|
+
default: () => vue.createVNode("div", {
|
|
52
|
+
"class": this.ns.e("icon")
|
|
53
|
+
}, [vue.createVNode("ion-icon", {
|
|
54
|
+
"name": "settings-outline"
|
|
55
|
+
}, null)]),
|
|
56
|
+
dropdown: () => {
|
|
57
|
+
let _slot;
|
|
58
|
+
return vue.createVNode(vue.resolveComponent("el-dropdown-menu"), null, _isSlot(_slot = state.quickSearchItems.map((item) => {
|
|
59
|
+
const isSelected = state.quickSearchFieldNames.includes(item.fieldName);
|
|
60
|
+
return vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
|
|
61
|
+
"class": [this.ns.be("popover", "item"), isSelected && this.ns.bem("popover", "item", "selected")],
|
|
62
|
+
"command": item
|
|
63
|
+
}, {
|
|
64
|
+
default: () => [item.label]
|
|
65
|
+
});
|
|
66
|
+
})) ? _slot : {
|
|
67
|
+
default: () => [_slot]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
exports.QuickSearchSelect = QuickSearchSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-quick-search-select{width:40px;height:100%;color:var(--ibiz-color-white);cursor:pointer;background-color:var(--ibiz-color-primary);border-top-left-radius:var(--el-input-border-radius);border-bottom-left-radius:var(--el-input-border-radius)}.ibiz-quick-search-select:hover{background-color:var(--ibiz-color-primary-hover)}.ibiz-quick-search-select__icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.ibiz-quick-search-select-popover{--ibiz-quick-search-select-item-text-color:var(--ibiz-color-text-2);--ibiz-quick-search-select-item-bg-color:var(--ibiz-color-bg-1);--ibiz-quick-search-select-item-hover-text-color:var(--ibiz-color-text-0);--ibiz-quick-search-select-item-hover-bg-color:var(--ibiz-color-fill-0);--ibiz-quick-search-select-item-selected-text-color:var(--ibiz-color-primary);--ibiz-quick-search-select-item-selected-bg-color:var(--ibiz-color-bg-1)}.ibiz-quick-search-select-popover.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list{background-color:var(--ibiz-color-bg-1)}.ibiz-quick-search-select-popover.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu{background-color:var(--ibiz-color-bg-1)}.ibiz-quick-search-select-popover.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu__item{color:var(--ibiz-quick-search-select-item-text-color);background-color:var(--ibiz-quick-search-select-item-bg-color)}.ibiz-quick-search-select-popover.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu__item:hover{color:var(--ibiz-quick-search-select-item-hover-text-color);background-color:var(--ibiz-quick-search-select-item-hover-bg-color)}.ibiz-quick-search-select-popover__item--selected{font-weight:700;--ibiz-quick-search-select-item-text-color:var(--ibiz-quick-search-select-item-selected-text-color);--ibiz-quick-search-select-item-bg-color:var(--ibiz-quick-search-select-item-selected-bg-color)}
|
|
@@ -96,6 +96,14 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
96
96
|
const handleSave = () => {
|
|
97
97
|
c.handleSave();
|
|
98
98
|
};
|
|
99
|
+
const renderAdvancedSearch = () => {
|
|
100
|
+
if (!c.state.advancedQuickSearch) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
return vue.createVNode(vue.resolveComponent("iBizQuickSearchSelect"), {
|
|
104
|
+
"controller": c
|
|
105
|
+
}, null);
|
|
106
|
+
};
|
|
99
107
|
return {
|
|
100
108
|
c,
|
|
101
109
|
ns,
|
|
@@ -106,7 +114,8 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
106
114
|
onKeydown,
|
|
107
115
|
onGroupClick,
|
|
108
116
|
triggerFilter,
|
|
109
|
-
handleSave
|
|
117
|
+
handleSave,
|
|
118
|
+
renderAdvancedSearch
|
|
110
119
|
};
|
|
111
120
|
},
|
|
112
121
|
render() {
|
|
@@ -139,7 +148,7 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
139
148
|
"modelValue": this.c.state.query,
|
|
140
149
|
"onUpdate:modelValue": ($event) => this.c.state.query = $event,
|
|
141
150
|
"class": this.ns.b("quick-search"),
|
|
142
|
-
"placeholder": this.c.
|
|
151
|
+
"placeholder": this.c.state.quickSearchPlaceHolder,
|
|
143
152
|
"clearable": true,
|
|
144
153
|
"onKeydown": this.onKeydown,
|
|
145
154
|
"onClear": this.onClear,
|
|
@@ -148,7 +157,9 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
148
157
|
"class": this.ns.e("search-icon"),
|
|
149
158
|
"name": "search"
|
|
150
159
|
}, null)
|
|
151
|
-
},
|
|
160
|
+
}, {
|
|
161
|
+
prepend: () => this.renderAdvancedSearch()
|
|
162
|
+
}), this.c.enableFilter && vue.createVNode(vue.resolveComponent("el-button"), {
|
|
152
163
|
"ref": "filterButtonRef",
|
|
153
164
|
"type": "primary",
|
|
154
165
|
"title": "\u8FC7\u6EE4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-control-searchbar{--ibiz-control-searchbar-quick-search-width:220px;--ibiz-control-searchbar-quick-group-item-padding:var(--ibiz-spacing-tight);--ibiz-control-searchbar-quick-group-item-margin:var(--ibiz-spacing-tight);display:flex;align-items:center;justify-content:flex-start;height:100%}.ibiz-control-searchbar .ibiz-control-searchbar-quick-search{width:var(--ibiz-control-searchbar-quick-search-width);margin-left:var(--ibiz-spacing-base-tight);font-size:14px;color:var(--ibiz-text-color);background:var(--ibiz-color-white);border:1px solid var(--ibiz-border-color);border-radius:4px}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group{height:100%;overflow-x:auto;white-space:nowrap}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group .ibiz-control-searchbar-quick-group-item{position:relative;display:inline-block;height:100%;padding:var(--ibiz-control-searchbar-quick-group-item-padding);margin-right:var(--ibiz-control-searchbar-quick-group-item-margin);font-size:var(--ibiz-font-size-regular);cursor:pointer}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group .ibiz-control-searchbar-quick-group-item.is-selected::after{position:absolute;bottom:2px;left:0;width:100%;height:2px;content:"";background-color:var(--ibiz-color-primary)}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group .ibiz-control-searchbar-quick-group-item:hover{color:var(--ibiz-color-primary)}.ibiz-control-searchbar .el-input__icon{cursor:pointer}.ibiz-control-searchbar-filter{margin-right:var(--ibiz-spacing-extra-tight);margin-left:var(--ibiz-spacing-base-tight)}.ibiz-control-searchbar-save{margin-left:var(--ibiz-spacing-base-tight)}
|
|
1
|
+
@charset "UTF-8";.ibiz-control-searchbar{--ibiz-control-searchbar-quick-search-width:220px;--ibiz-control-searchbar-quick-group-item-padding:var(--ibiz-spacing-tight);--ibiz-control-searchbar-quick-group-item-margin:var(--ibiz-spacing-tight);display:flex;align-items:center;justify-content:flex-start;height:100%}.ibiz-control-searchbar .ibiz-control-searchbar-quick-search{width:var(--ibiz-control-searchbar-quick-search-width);margin-left:var(--ibiz-spacing-base-tight);font-size:14px;color:var(--ibiz-text-color);background:var(--ibiz-color-white);border:1px solid var(--ibiz-border-color);border-radius:4px}.ibiz-control-searchbar .ibiz-control-searchbar-quick-search .el-input-group__prepend,.ibiz-control-searchbar .ibiz-control-searchbar-quick-search.el-input-group__append{padding:0}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group{height:100%;overflow-x:auto;white-space:nowrap}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group .ibiz-control-searchbar-quick-group-item{position:relative;display:inline-block;height:100%;padding:var(--ibiz-control-searchbar-quick-group-item-padding);margin-right:var(--ibiz-control-searchbar-quick-group-item-margin);font-size:var(--ibiz-font-size-regular);cursor:pointer}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group .ibiz-control-searchbar-quick-group-item.is-selected::after{position:absolute;bottom:2px;left:0;width:100%;height:2px;content:"";background-color:var(--ibiz-color-primary)}.ibiz-control-searchbar .ibiz-control-searchbar-quick-group .ibiz-control-searchbar-quick-group-item:hover{color:var(--ibiz-color-primary)}.ibiz-control-searchbar .el-input__icon{cursor:pointer}.ibiz-control-searchbar-filter{margin-right:var(--ibiz-spacing-extra-tight);margin-left:var(--ibiz-spacing-base-tight)}.ibiz-control-searchbar-save{margin-left:var(--ibiz-spacing-base-tight)}
|
|
@@ -52,9 +52,11 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
setup() {
|
|
55
|
+
var _a;
|
|
55
56
|
const c = vue3Util.useControlController((...args) => new runtime.ToolbarController(...args));
|
|
56
57
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
57
58
|
const btnSize = vue.ref("default");
|
|
59
|
+
const toolbarStyle = (_a = c.model.toolbarStyle) == null ? void 0 : _a.toLowerCase();
|
|
58
60
|
const handleClick = async (item, event, params) => {
|
|
59
61
|
await c.onItemClick(item, event, params);
|
|
60
62
|
};
|
|
@@ -80,13 +82,13 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
80
82
|
"class": ns.b("submenu"),
|
|
81
83
|
"index": item.id,
|
|
82
84
|
"title": item.tooltip,
|
|
83
|
-
"popper-class": ns.b("submenu-popper")
|
|
85
|
+
"popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle)]
|
|
84
86
|
}, {
|
|
85
87
|
default: () => {
|
|
86
88
|
return detoolbarItems.map((item2) => {
|
|
87
|
-
var
|
|
89
|
+
var _a2;
|
|
88
90
|
const actionId = item2.uiactionId;
|
|
89
|
-
const visible = (
|
|
91
|
+
const visible = (_a2 = c.state.buttonsState[item2.id]) == null ? void 0 : _a2.visible;
|
|
90
92
|
if (!visible) {
|
|
91
93
|
return null;
|
|
92
94
|
}
|
|
@@ -150,9 +152,9 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
150
152
|
});
|
|
151
153
|
};
|
|
152
154
|
const renderToolbarItem = (item) => {
|
|
153
|
-
var
|
|
155
|
+
var _a2, _b;
|
|
154
156
|
const itemId = item.id;
|
|
155
|
-
const visible = (
|
|
157
|
+
const visible = (_a2 = c.state.buttonsState[itemId]) == null ? void 0 : _a2.visible;
|
|
156
158
|
if (!visible) {
|
|
157
159
|
return null;
|
|
158
160
|
}
|
|
@@ -192,7 +194,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
192
194
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
193
195
|
"title": item.tooltip,
|
|
194
196
|
"size": btnSize.value,
|
|
195
|
-
"text": Object.is(buttonType, "
|
|
197
|
+
"text": Object.is(buttonType, "inverse"),
|
|
196
198
|
"type": buttonType,
|
|
197
199
|
"loading": c.state.buttonsState[itemId].loading,
|
|
198
200
|
"disabled": c.state.buttonsState[itemId].disabled,
|
|
@@ -218,24 +220,23 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
218
220
|
c,
|
|
219
221
|
btnSize,
|
|
220
222
|
ns,
|
|
223
|
+
toolbarStyle,
|
|
221
224
|
handleClick,
|
|
222
225
|
renderExtraButtons,
|
|
223
226
|
renderToolbarItem
|
|
224
227
|
};
|
|
225
228
|
},
|
|
226
229
|
render() {
|
|
227
|
-
var _a, _b, _c
|
|
230
|
+
var _a, _b, _c;
|
|
228
231
|
const {
|
|
229
|
-
state
|
|
230
|
-
model
|
|
232
|
+
state
|
|
231
233
|
} = this.c;
|
|
232
|
-
const toolbarStyle = (_a = model.toolbarStyle) == null ? void 0 : _a.toLowerCase();
|
|
233
234
|
let content = null;
|
|
234
235
|
if (state.isCreated) {
|
|
235
236
|
content = [
|
|
236
237
|
// 绘制最前方的额外按钮
|
|
237
|
-
((
|
|
238
|
-
(
|
|
238
|
+
((_a = state.extraButtons.before) == null ? void 0 : _a.length) > 0 && this.renderExtraButtons(state.extraButtons.before),
|
|
239
|
+
(_b = this.modelData.detoolbarItems) == null ? void 0 : _b.map((item, index) => {
|
|
239
240
|
var _a2;
|
|
240
241
|
const toolbarItemNode = this.renderToolbarItem(item);
|
|
241
242
|
if ((_a2 = state.extraButtons[index]) == null ? void 0 : _a2.length) {
|
|
@@ -244,12 +245,12 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
244
245
|
return toolbarItemNode;
|
|
245
246
|
}),
|
|
246
247
|
// 绘制最后方的额外按钮
|
|
247
|
-
((
|
|
248
|
+
((_c = state.extraButtons.after) == null ? void 0 : _c.length) > 0 && this.renderExtraButtons(state.extraButtons.after)
|
|
248
249
|
];
|
|
249
250
|
}
|
|
250
251
|
return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
|
|
251
252
|
"controller": this.c,
|
|
252
|
-
"class": [this.ns.m(state.viewMode.toLowerCase()), this.ns.m(toolbarStyle)]
|
|
253
|
+
"class": [this.ns.m(state.viewMode.toLowerCase()), this.ns.m(this.toolbarStyle)]
|
|
253
254
|
}, _isSlot(content) ? content : {
|
|
254
255
|
default: () => [content]
|
|
255
256
|
});
|
|
@@ -239,6 +239,7 @@ const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
239
239
|
"total": state.total,
|
|
240
240
|
"curPage": state.curPage,
|
|
241
241
|
"size": state.size,
|
|
242
|
+
"totalPages": state.totalPages,
|
|
242
243
|
"onChange": this.onPageChange,
|
|
243
244
|
"onPageSizeChange": this.onPageSizeChange,
|
|
244
245
|
"onPageRefresh": this.onPageRefresh
|
|
@@ -27,7 +27,9 @@ function useCellEdit(props, componentRef) {
|
|
|
27
27
|
return !editorShowEdit.value;
|
|
28
28
|
});
|
|
29
29
|
const editorDisabled = false;
|
|
30
|
-
const isAutoFocus =
|
|
30
|
+
const isAutoFocus = vue.computed(() => {
|
|
31
|
+
return !hasError.value;
|
|
32
|
+
});
|
|
31
33
|
const showEditMask = vue.computed(() => {
|
|
32
34
|
return cellEditable.value && !editable.value;
|
|
33
35
|
});
|