plain-design 1.0.0-beta.127 → 1.0.0-beta.128
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/plain-design.commonjs.min.js +2 -2
- package/dist/plain-design.min.js +2 -2
- package/dist/report.html +2 -2
- package/package.json +2 -2
- package/src/packages/components/AutoTable/filter/useTableOption.filter.form.tsx +6 -3
- package/src/packages/components/Table/standard/PlcOperation/PlcOperation.tsx +7 -1
- package/src/packages/components/VirtualList/useVirtualList.tsx +3 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "plain-design",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.128",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/plain-design.min.js",
|
6
6
|
"module": "dist/plain-design.commonjs.min.js",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"react-transition-group": "4.4.5"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
|
-
"@peryl/react-compose": "0.0.
|
43
|
+
"@peryl/react-compose": "0.0.224",
|
44
44
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
45
45
|
"@babel/plugin-transform-class-properties": "7.23.3",
|
46
46
|
"@babel/preset-env": "7.23.7",
|
@@ -160,11 +160,14 @@ export const useTableOptionFilterForm = AutoModule.createRegistration((
|
|
160
160
|
});
|
161
161
|
|
162
162
|
hooks.onTableOuterRender.use({
|
163
|
-
processor: ({ list, render }) => {
|
164
|
-
render: () => (
|
163
|
+
processor: ({ list, render }) => {
|
165
164
|
!!filterOptions.value &&
|
166
165
|
filterOptions.value.length > 0 &&
|
167
|
-
state.show &&
|
166
|
+
state.show &&
|
167
|
+
list.push({ seq: 0, key: 'form-filter', render, });
|
168
|
+
},
|
169
|
+
render: () => (
|
170
|
+
<FilterFormMultiple
|
168
171
|
ref={onRef.filter}
|
169
172
|
filterOptions={filterOptions.value!}
|
170
173
|
initialState={state.data}
|
@@ -181,9 +181,10 @@ export const PlcOperation = designComponent({
|
|
181
181
|
* @date 2022.11.24 16:25
|
182
182
|
*/
|
183
183
|
const predicateWidth = computed((): number => {
|
184
|
+
const fontSize = ['small', 'mini'].indexOf(table.styleComputed.value.size) > -1 ? 14 : 16;
|
184
185
|
if (innerOperationConfigs.value.length === 0) {return 0;}
|
185
186
|
return innerOperationConfigs.value.reduce((prev) => {
|
186
|
-
return prev + 2 *
|
187
|
+
return prev + 2 * fontSize + 13;
|
187
188
|
}, 0) + 24;
|
188
189
|
});
|
189
190
|
|
@@ -221,7 +222,12 @@ export const PlcOperation = designComponent({
|
|
221
222
|
}
|
222
223
|
});
|
223
224
|
const width = maxWidth + state.cellPaddingX * 2;
|
225
|
+
console.warn({ width });
|
224
226
|
if (!state.plcOperationWidth || width > state.plcOperationWidth) {
|
227
|
+
console.log({
|
228
|
+
'plcOperationWidth.value': plcOperationWidth.value,
|
229
|
+
'width + 4': width + 4,
|
230
|
+
});
|
225
231
|
if (width + 4 > plcOperationWidth.value) {
|
226
232
|
state.plcOperationWidth = width + 4;
|
227
233
|
}
|
@@ -94,7 +94,7 @@ export function useVirtualList(
|
|
94
94
|
|
95
95
|
const _pageSize = computed(() => {
|
96
96
|
if (state.hostSize == null) {return null;}
|
97
|
-
return Math.floor(state.hostSize / _avgSize.value);
|
97
|
+
return Math.max(3, Math.floor(state.hostSize / _avgSize.value));
|
98
98
|
});
|
99
99
|
|
100
100
|
const idMap = new WeakMap<PlainObject, string>();
|
@@ -178,7 +178,7 @@ export function useVirtualList(
|
|
178
178
|
if (!props.dynamicSize) {
|
179
179
|
style.height = `${(dataModel.value || []).length * props.size}px`;
|
180
180
|
} else {
|
181
|
-
style.height = `${nodes.value[nodes.value.length - 1].end}px`;
|
181
|
+
style.height = !nodes.value.length ? 0 : `${nodes.value[nodes.value.length - 1].end}px`;
|
182
182
|
}
|
183
183
|
} else {
|
184
184
|
/*横向*/
|
@@ -189,7 +189,7 @@ export function useVirtualList(
|
|
189
189
|
if (!props.dynamicSize) {
|
190
190
|
style.width = `${(dataModel.value || []).length * props.size}px`;
|
191
191
|
} else {
|
192
|
-
style.width = `${nodes.value[nodes.value.length - 1].end}px`;
|
192
|
+
style.width = !nodes.value.length ? 0 : `${nodes.value[nodes.value.length - 1].end}px`;
|
193
193
|
}
|
194
194
|
}
|
195
195
|
});
|