3h1-ui 3.0.0-next.251 → 3.0.0-next.253
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/es/index.js
CHANGED
|
@@ -30142,7 +30142,11 @@ const ShyTag = /* @__PURE__ */ defineComponent({
|
|
|
30142
30142
|
function formatNumberWithThousandSeparator(val) {
|
|
30143
30143
|
const [intPart, decimalPart] = String(val).split(".");
|
|
30144
30144
|
const formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
30145
|
-
|
|
30145
|
+
if (decimalPart !== void 0) {
|
|
30146
|
+
const trimmedDecimal = decimalPart.replace(/0+$/, "");
|
|
30147
|
+
return trimmedDecimal ? `${formattedInt}.${trimmedDecimal}` : formattedInt;
|
|
30148
|
+
}
|
|
30149
|
+
return formattedInt;
|
|
30146
30150
|
}
|
|
30147
30151
|
const handleItem = (item, ellipsis) => {
|
|
30148
30152
|
const {
|
|
@@ -32059,6 +32063,10 @@ const shyFormTableProps = reactive({
|
|
|
32059
32063
|
};
|
|
32060
32064
|
}
|
|
32061
32065
|
},
|
|
32066
|
+
useDefaultAdd: {
|
|
32067
|
+
type: Boolean,
|
|
32068
|
+
default: () => true
|
|
32069
|
+
},
|
|
32062
32070
|
dynamicShowRemove: {
|
|
32063
32071
|
type: Function,
|
|
32064
32072
|
default: () => (record) => true
|
|
@@ -32318,15 +32326,17 @@ const ShyFormTable = /* @__PURE__ */ defineComponent({
|
|
|
32318
32326
|
}, {});
|
|
32319
32327
|
});
|
|
32320
32328
|
const create = () => {
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32329
|
+
if (props2.useDefaultAdd) {
|
|
32330
|
+
state.value = [...toRaw(state.value), {
|
|
32331
|
+
[props2.rowKey]: buildUUID(),
|
|
32332
|
+
...unref(defaultValuesRef)
|
|
32333
|
+
}];
|
|
32334
|
+
curIndex.value = 0;
|
|
32335
|
+
if (props2.isVirtual) {
|
|
32336
|
+
nextTick(() => {
|
|
32337
|
+
document.querySelector(`.${prefixCls2}-scroll-bar-wrapper`).scrollTop = (state.value.length + 1) * ROW_HEIGHT;
|
|
32338
|
+
});
|
|
32339
|
+
}
|
|
32330
32340
|
}
|
|
32331
32341
|
emit("add", state.value);
|
|
32332
32342
|
};
|
|
@@ -67,6 +67,10 @@ export declare const shyFormTableProps: {
|
|
|
67
67
|
type: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
useDefaultAdd: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: () => true;
|
|
73
|
+
};
|
|
70
74
|
dynamicShowRemove: {
|
|
71
75
|
type: ((new (...args: any[]) => (record: Recordable) => boolean) | (() => (record: Recordable) => boolean) | {
|
|
72
76
|
(): (record: Recordable) => boolean;
|
|
@@ -150,6 +154,10 @@ declare const ShyFormTable: import("vue").DefineComponent<{
|
|
|
150
154
|
type: string;
|
|
151
155
|
};
|
|
152
156
|
};
|
|
157
|
+
useDefaultAdd: {
|
|
158
|
+
type: BooleanConstructor;
|
|
159
|
+
default: () => true;
|
|
160
|
+
};
|
|
153
161
|
dynamicShowRemove: {
|
|
154
162
|
type: ((new (...args: any[]) => (record: Recordable) => boolean) | (() => (record: Recordable) => boolean) | {
|
|
155
163
|
(): (record: Recordable) => boolean;
|
|
@@ -232,6 +240,10 @@ declare const ShyFormTable: import("vue").DefineComponent<{
|
|
|
232
240
|
type: string;
|
|
233
241
|
};
|
|
234
242
|
};
|
|
243
|
+
useDefaultAdd: {
|
|
244
|
+
type: BooleanConstructor;
|
|
245
|
+
default: () => true;
|
|
246
|
+
};
|
|
235
247
|
dynamicShowRemove: {
|
|
236
248
|
type: ((new (...args: any[]) => (record: Recordable) => boolean) | (() => (record: Recordable) => boolean) | {
|
|
237
249
|
(): (record: Recordable) => boolean;
|
|
@@ -266,6 +278,7 @@ declare const ShyFormTable: import("vue").DefineComponent<{
|
|
|
266
278
|
isShowRemoveBtn: boolean;
|
|
267
279
|
showRowCount: number;
|
|
268
280
|
addBtnConf: Record<string, any>;
|
|
281
|
+
useDefaultAdd: boolean;
|
|
269
282
|
dynamicShowRemove: (record: Recordable) => boolean;
|
|
270
283
|
}, {}>;
|
|
271
284
|
export { ShyFormTable };
|
package/lib/index.js
CHANGED
|
@@ -30166,7 +30166,11 @@ const ShyTag = /* @__PURE__ */ vue.defineComponent({
|
|
|
30166
30166
|
function formatNumberWithThousandSeparator(val) {
|
|
30167
30167
|
const [intPart, decimalPart] = String(val).split(".");
|
|
30168
30168
|
const formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
30169
|
-
|
|
30169
|
+
if (decimalPart !== void 0) {
|
|
30170
|
+
const trimmedDecimal = decimalPart.replace(/0+$/, "");
|
|
30171
|
+
return trimmedDecimal ? `${formattedInt}.${trimmedDecimal}` : formattedInt;
|
|
30172
|
+
}
|
|
30173
|
+
return formattedInt;
|
|
30170
30174
|
}
|
|
30171
30175
|
const handleItem = (item, ellipsis) => {
|
|
30172
30176
|
const {
|
|
@@ -32083,6 +32087,10 @@ const shyFormTableProps = vue.reactive({
|
|
|
32083
32087
|
};
|
|
32084
32088
|
}
|
|
32085
32089
|
},
|
|
32090
|
+
useDefaultAdd: {
|
|
32091
|
+
type: Boolean,
|
|
32092
|
+
default: () => true
|
|
32093
|
+
},
|
|
32086
32094
|
dynamicShowRemove: {
|
|
32087
32095
|
type: Function,
|
|
32088
32096
|
default: () => (record) => true
|
|
@@ -32342,15 +32350,17 @@ const ShyFormTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
32342
32350
|
}, {});
|
|
32343
32351
|
});
|
|
32344
32352
|
const create = () => {
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32353
|
+
if (props2.useDefaultAdd) {
|
|
32354
|
+
state.value = [...vue.toRaw(state.value), {
|
|
32355
|
+
[props2.rowKey]: utils$1.buildUUID(),
|
|
32356
|
+
...vue.unref(defaultValuesRef)
|
|
32357
|
+
}];
|
|
32358
|
+
curIndex.value = 0;
|
|
32359
|
+
if (props2.isVirtual) {
|
|
32360
|
+
vue.nextTick(() => {
|
|
32361
|
+
document.querySelector(`.${prefixCls2}-scroll-bar-wrapper`).scrollTop = (state.value.length + 1) * ROW_HEIGHT;
|
|
32362
|
+
});
|
|
32363
|
+
}
|
|
32354
32364
|
}
|
|
32355
32365
|
emit("add", state.value);
|
|
32356
32366
|
};
|
|
@@ -67,6 +67,10 @@ export declare const shyFormTableProps: {
|
|
|
67
67
|
type: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
useDefaultAdd: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: () => true;
|
|
73
|
+
};
|
|
70
74
|
dynamicShowRemove: {
|
|
71
75
|
type: ((new (...args: any[]) => (record: Recordable) => boolean) | (() => (record: Recordable) => boolean) | {
|
|
72
76
|
(): (record: Recordable) => boolean;
|
|
@@ -150,6 +154,10 @@ declare const ShyFormTable: import("vue").DefineComponent<{
|
|
|
150
154
|
type: string;
|
|
151
155
|
};
|
|
152
156
|
};
|
|
157
|
+
useDefaultAdd: {
|
|
158
|
+
type: BooleanConstructor;
|
|
159
|
+
default: () => true;
|
|
160
|
+
};
|
|
153
161
|
dynamicShowRemove: {
|
|
154
162
|
type: ((new (...args: any[]) => (record: Recordable) => boolean) | (() => (record: Recordable) => boolean) | {
|
|
155
163
|
(): (record: Recordable) => boolean;
|
|
@@ -232,6 +240,10 @@ declare const ShyFormTable: import("vue").DefineComponent<{
|
|
|
232
240
|
type: string;
|
|
233
241
|
};
|
|
234
242
|
};
|
|
243
|
+
useDefaultAdd: {
|
|
244
|
+
type: BooleanConstructor;
|
|
245
|
+
default: () => true;
|
|
246
|
+
};
|
|
235
247
|
dynamicShowRemove: {
|
|
236
248
|
type: ((new (...args: any[]) => (record: Recordable) => boolean) | (() => (record: Recordable) => boolean) | {
|
|
237
249
|
(): (record: Recordable) => boolean;
|
|
@@ -266,6 +278,7 @@ declare const ShyFormTable: import("vue").DefineComponent<{
|
|
|
266
278
|
isShowRemoveBtn: boolean;
|
|
267
279
|
showRowCount: number;
|
|
268
280
|
addBtnConf: Record<string, any>;
|
|
281
|
+
useDefaultAdd: boolean;
|
|
269
282
|
dynamicShowRemove: (record: Recordable) => boolean;
|
|
270
283
|
}, {}>;
|
|
271
284
|
export { ShyFormTable };
|