wlwy-package 3.2.3-httpOnlyCookie.0 → 3.2.4
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/editor/index.es.js +1 -1
- package/dist/{editor-core-C7ZO3umt.js → editor-core-DizrH1p6.js} +2 -2
- package/dist/{index-BPPIVUm2.js → index-DVGXAKlY.js} +1 -1
- package/dist/{index-DtK1XQdW.js → index-KquGST1J.js} +40 -22
- package/dist/style.css +1 -1
- package/dist/types/packages/axios/service.d.ts +2 -2
- package/dist/types/packages/axios/types/index.d.ts +1 -4
- package/dist/types/packages/components/list/src/table.vue.d.ts +2 -2
- package/dist/types/packages/components/table/src/table.vue.d.ts +200 -200
- package/dist/types/packages/components/table/warnDeprecated.d.ts +2 -0
- package/dist/types/packages/hooks/private/src/useRenderCell.d.ts +6 -4
- package/dist/types/packages/utils/formatCellValue.d.ts +5 -1
- package/dist/wlwy-package.es.js +67 -31
- package/package.json +2 -2
|
@@ -4,3 +4,5 @@ export declare function warnPropConflict(key: string, namespace: 'toolbar' | 'pa
|
|
|
4
4
|
export declare function warnShowToolbarConflict(): void;
|
|
5
5
|
/** toolbar slot 与显式关闭工具栏冲突时,以 slot 为准 */
|
|
6
6
|
export declare function warnToolbarSlotConflict(source: 'showToolbar' | 'toolbar.hideToolbar'): void;
|
|
7
|
+
/** 默认单元格渲染依赖 field 取值,缺失时仅开发环境报错,不阻塞运行 */
|
|
8
|
+
export declare function warnMissingFieldForDefaultCell(title?: string): void;
|
|
@@ -14,7 +14,7 @@ export type RenderCellFormatByType = {
|
|
|
14
14
|
type: 'datetime';
|
|
15
15
|
} & TemporalExtra) | ({
|
|
16
16
|
type: 'number';
|
|
17
|
-
} & Pick<FormatCellNumberOptions, 'precision'>) | ({
|
|
17
|
+
} & Pick<FormatCellNumberOptions, 'precision' | 'useGrouping'>) | ({
|
|
18
18
|
type: 'percent';
|
|
19
19
|
} & Pick<FormatCellPercentOptions, 'valueScale'>) | ({
|
|
20
20
|
type: 'boolean';
|
|
@@ -26,10 +26,10 @@ export type RenderCellFormatByType = {
|
|
|
26
26
|
}) | ({
|
|
27
27
|
type: 'i18n';
|
|
28
28
|
} & Pick<FormatCellI18nOptions, 'values'>)
|
|
29
|
-
/**
|
|
30
|
-
| {
|
|
29
|
+
/** 金额:等价于 `number` + 默认 `precision: 2` + 千分位;有 `precision` 时以传入为准 */
|
|
30
|
+
| ({
|
|
31
31
|
type: 'amount';
|
|
32
|
-
};
|
|
32
|
+
} & Pick<FormatCellNumberOptions, 'precision'>);
|
|
33
33
|
/** @deprecated 旧版平铺 props,由 {@link toFormatCellOptions} 自动映射 */
|
|
34
34
|
export type RenderCellLegacyProps = {
|
|
35
35
|
/** @deprecated 请改用 `format` */
|
|
@@ -51,6 +51,8 @@ export type RenderCellLegacyProps = {
|
|
|
51
51
|
export type RenderCellFormatType = NonNullable<RenderCellFormatByType['type']>;
|
|
52
52
|
export type RenderCellProps = {
|
|
53
53
|
field?: FieldPath;
|
|
54
|
+
/** 空值占位符,默认由 {@link formatCellValue} 处理为 `-` */
|
|
55
|
+
emptyPlaceholder?: string;
|
|
54
56
|
} & RenderCellFormatByType & Partial<RenderCellLegacyProps>;
|
|
55
57
|
export declare function resolveLegacyEnumMap(props: RenderCellProps, context: {
|
|
56
58
|
translate: (key: string) => string;
|
|
@@ -20,6 +20,8 @@ export interface FormatCellNumberOptions {
|
|
|
20
20
|
type: 'number';
|
|
21
21
|
/** 小数位数:0 为整数,1 为一位小数,以此类推 */
|
|
22
22
|
precision?: number;
|
|
23
|
+
/** 是否使用千分位分组;未传则跟随 `Intl.NumberFormat` 默认(通常为 true) */
|
|
24
|
+
useGrouping?: boolean;
|
|
23
25
|
}
|
|
24
26
|
export interface FormatCellPercentOptions {
|
|
25
27
|
type: 'percent';
|
|
@@ -78,5 +80,7 @@ export declare function formatCellValueCore(value: unknown, options: FormatCellO
|
|
|
78
80
|
/**
|
|
79
81
|
* 表格/描述列表等场景的单元格格式化:按 `options.type` 输出字符串;
|
|
80
82
|
* 无法识别为日期/数字等时 **原样字符串化**,不使用 `Invalid Date`。
|
|
83
|
+
*
|
|
84
|
+
* @param emptyPlaceholder 空值占位符,默认 `-`;日期/时间类型额外将 `0` / `'0'` 视为空
|
|
81
85
|
*/
|
|
82
|
-
export declare function formatCellValue(value: unknown, options: FormatCellOptions): string;
|
|
86
|
+
export declare function formatCellValue(value: unknown, options: FormatCellOptions, emptyPlaceholder?: string): string;
|
package/dist/wlwy-package.es.js
CHANGED
|
@@ -2,12 +2,12 @@ import { h, reactive, toRefs, markRaw, ref, computed, unref, nextTick, watch, on
|
|
|
2
2
|
import { App, message, theme, Tooltip, Switch, ConfigProvider, Spin, Button, Card, Row, DatePicker, Descriptions, Modal, Select, Statistic, Form, UploadDragger, Upload, Space, Col, FormItem, Input, InputPassword, InputNumber, Textarea, CheckboxGroup, Checkbox, RadioGroup, RangePicker, TimePicker, InputGroup, Image as Image$1, Dropdown, Menu, Progress, PageHeader, MenuItem, Tabs, TabPane, SubMenu, LayoutSider, LayoutFooter, Badge, Drawer, Alert, List, ListItem, LayoutHeader, Avatar, MenuDivider, Skeleton, Layout, LayoutContent } from "ant-design-vue";
|
|
3
3
|
import zhCn from "ant-design-vue/es/locale/zh_CN.js";
|
|
4
4
|
import enUs from "ant-design-vue/es/locale/en_US.js";
|
|
5
|
-
import { u as useI18n, a as useCommonStore, A as API, c as config, b as useLocale, d as useTabsNavStoreWithOut, e as useUserPermissionStoreWithOut, f as useDictStoreWithOut, _ as _sfc_main$19, g as useCommonStoreWithOut, h as useFormStorage, i as formatCellValue, k as kebabToCamel, j as useFormItemProps, p as pickMultiple, l as isExternalLink, n as newWin, m as useLanguageStoreWithOut, o as _sfc_main$1a, s as setConfig } from "./index-
|
|
6
|
-
import { D, E, r, t, C, z, x, y, B, q, v, w } from "./index-
|
|
5
|
+
import { u as useI18n, a as useCommonStore, A as API, c as config, b as useLocale, d as useTabsNavStoreWithOut, e as useUserPermissionStoreWithOut, f as useDictStoreWithOut, _ as _sfc_main$19, g as useCommonStoreWithOut, h as useFormStorage, i as formatCellValue, k as kebabToCamel, j as useFormItemProps, p as pickMultiple, l as isExternalLink, n as newWin, m as useLanguageStoreWithOut, o as _sfc_main$1a, s as setConfig } from "./index-KquGST1J.js";
|
|
6
|
+
import { D, E, r, t, C, z, x, y, B, q, v, w } from "./index-KquGST1J.js";
|
|
7
7
|
import { clone, debounce, omit, get, pick, merge, isEmpty, set } from "xe-utils";
|
|
8
8
|
import { RouterLink, useRouter } from "vue-router";
|
|
9
|
-
import { _ as _export_sfc } from "./index-
|
|
10
|
-
import { E as E2 } from "./index-
|
|
9
|
+
import { _ as _export_sfc } from "./index-DVGXAKlY.js";
|
|
10
|
+
import { E as E2 } from "./index-DVGXAKlY.js";
|
|
11
11
|
import { DownOutlined, UpOutlined } from "@ant-design/icons-vue";
|
|
12
12
|
import * as VxeUITable from "vxe-table";
|
|
13
13
|
import { VxeColumn, VxeUI, VxeToolbar, VxeTable } from "vxe-table";
|
|
@@ -2367,7 +2367,12 @@ function toFormatCellOptions(props, context) {
|
|
|
2367
2367
|
const legacy = props;
|
|
2368
2368
|
const temporalFormat = resolveTemporalFormat(props);
|
|
2369
2369
|
if (renderType === "amount") {
|
|
2370
|
-
|
|
2370
|
+
const p = props;
|
|
2371
|
+
return {
|
|
2372
|
+
type: "number",
|
|
2373
|
+
precision: p.precision ?? legacy.precision ?? 2,
|
|
2374
|
+
useGrouping: true
|
|
2375
|
+
};
|
|
2371
2376
|
}
|
|
2372
2377
|
if (renderType) {
|
|
2373
2378
|
switch (renderType) {
|
|
@@ -2387,7 +2392,11 @@ function toFormatCellOptions(props, context) {
|
|
|
2387
2392
|
}
|
|
2388
2393
|
case "number": {
|
|
2389
2394
|
const p = props;
|
|
2390
|
-
return {
|
|
2395
|
+
return {
|
|
2396
|
+
type: "number",
|
|
2397
|
+
precision: p.precision ?? legacy.precision,
|
|
2398
|
+
useGrouping: p.useGrouping
|
|
2399
|
+
};
|
|
2391
2400
|
}
|
|
2392
2401
|
case "percent": {
|
|
2393
2402
|
const p = props;
|
|
@@ -2464,7 +2473,7 @@ function useRenderCell(props) {
|
|
|
2464
2473
|
if (value === "" || value === null || value === void 0) return void 0;
|
|
2465
2474
|
return String(value);
|
|
2466
2475
|
}
|
|
2467
|
-
return formatCellValue(value, options);
|
|
2476
|
+
return formatCellValue(value, options, props.emptyPlaceholder);
|
|
2468
2477
|
}
|
|
2469
2478
|
return {
|
|
2470
2479
|
getRenderValue
|
|
@@ -2482,10 +2491,12 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
2482
2491
|
__name: "descriptions-item",
|
|
2483
2492
|
props: {
|
|
2484
2493
|
field: {},
|
|
2494
|
+
emptyPlaceholder: {},
|
|
2485
2495
|
type: {},
|
|
2486
2496
|
format: {},
|
|
2487
2497
|
timeZone: {},
|
|
2488
2498
|
precision: {},
|
|
2499
|
+
useGrouping: { type: Boolean },
|
|
2489
2500
|
valueScale: {},
|
|
2490
2501
|
trueText: {},
|
|
2491
2502
|
falseText: {},
|
|
@@ -3357,6 +3368,9 @@ const WTABLE_VXE_DEFAULT_CONFIG = {
|
|
|
3357
3368
|
pageSizes: [10, 20, 50, 100, 200, 500]
|
|
3358
3369
|
}
|
|
3359
3370
|
};
|
|
3371
|
+
function warnMissingFieldForDefaultCell(title) {
|
|
3372
|
+
return;
|
|
3373
|
+
}
|
|
3360
3374
|
function camelToKebab(key) {
|
|
3361
3375
|
return key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
3362
3376
|
}
|
|
@@ -3672,8 +3686,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
3672
3686
|
emits: ["pageChange"],
|
|
3673
3687
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3674
3688
|
useCssVars((_ctx) => ({
|
|
3675
|
-
"
|
|
3676
|
-
"
|
|
3689
|
+
"v7814ebd9": `${unref(token).borderRadius}px`,
|
|
3690
|
+
"v0aa3c106": unref(token).colorError
|
|
3677
3691
|
}));
|
|
3678
3692
|
const WTABLE_EXPOSE_KEYS = /* @__PURE__ */ new Set([
|
|
3679
3693
|
"getTableInstance",
|
|
@@ -3789,10 +3803,17 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
3789
3803
|
...omit(config2.value.pager, ["currentPage", "pageSize"]),
|
|
3790
3804
|
...pagerDataBind.value
|
|
3791
3805
|
}));
|
|
3792
|
-
const
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3806
|
+
const seqOffset = computed(() => props.showPager ? (currentPage.value - 1) * pageSize.value : 0);
|
|
3807
|
+
const mergedSeqConfig = computed(() => {
|
|
3808
|
+
const userSeqConfig = config2.value.table.seqConfig ?? {};
|
|
3809
|
+
const { startIndex: _2, seqMethod: userSeqMethod, ...rest } = userSeqConfig;
|
|
3810
|
+
return {
|
|
3811
|
+
...rest,
|
|
3812
|
+
seqMethod: userSeqMethod ?? ((params) => {
|
|
3813
|
+
return seqOffset.value + params.rowIndex + 1;
|
|
3814
|
+
})
|
|
3815
|
+
};
|
|
3816
|
+
});
|
|
3796
3817
|
function getPagerState() {
|
|
3797
3818
|
return {
|
|
3798
3819
|
currentPage: currentPage.value,
|
|
@@ -3951,7 +3972,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
3951
3972
|
};
|
|
3952
3973
|
}
|
|
3953
3974
|
});
|
|
3954
|
-
const WTable = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-
|
|
3975
|
+
const WTable = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-5e8a9501"]]);
|
|
3955
3976
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
3956
3977
|
...{
|
|
3957
3978
|
name: "WActionColumn"
|
|
@@ -3981,9 +4002,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3981
4002
|
},
|
|
3982
4003
|
__name: "column",
|
|
3983
4004
|
props: {
|
|
4005
|
+
emptyPlaceholder: {},
|
|
3984
4006
|
format: {},
|
|
3985
4007
|
timeZone: {},
|
|
3986
4008
|
precision: {},
|
|
4009
|
+
useGrouping: { type: Boolean },
|
|
3987
4010
|
valueScale: {},
|
|
3988
4011
|
trueText: {},
|
|
3989
4012
|
falseText: {},
|
|
@@ -4020,6 +4043,32 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4020
4043
|
const props = __props;
|
|
4021
4044
|
const attrs = useAttrs();
|
|
4022
4045
|
const slots = useSlots();
|
|
4046
|
+
const DEFAULT_CELL_EDIT_RENDER_NAMES = [
|
|
4047
|
+
"input",
|
|
4048
|
+
"$input",
|
|
4049
|
+
"VxeInput",
|
|
4050
|
+
"textarea",
|
|
4051
|
+
"$textarea",
|
|
4052
|
+
"VxeTextarea"
|
|
4053
|
+
];
|
|
4054
|
+
function shouldUseDefaultCellRender(editRender) {
|
|
4055
|
+
if (!editRender) return true;
|
|
4056
|
+
const name = editRender.name;
|
|
4057
|
+
return !!name && DEFAULT_CELL_EDIT_RENDER_NAMES.includes(name);
|
|
4058
|
+
}
|
|
4059
|
+
const usesDefaultCellRender = computed(() => {
|
|
4060
|
+
return !slots.default && !["seq", "checkbox", "radio", "expand", "html"].includes(props.type ?? "") && !props.formatter && shouldUseDefaultCellRender(props.editRender);
|
|
4061
|
+
});
|
|
4062
|
+
watch(
|
|
4063
|
+
() => [usesDefaultCellRender.value, props.field],
|
|
4064
|
+
([need, field]) => {
|
|
4065
|
+
if (!need) return;
|
|
4066
|
+
if (field === void 0 || field === null || field === "") {
|
|
4067
|
+
warnMissingFieldForDefaultCell(props.title);
|
|
4068
|
+
}
|
|
4069
|
+
},
|
|
4070
|
+
{ immediate: true }
|
|
4071
|
+
);
|
|
4023
4072
|
const extraSlotNames = computed(() => Object.keys(slots).filter((name) => name !== "default"));
|
|
4024
4073
|
const columnShowOverflow = computed(() => {
|
|
4025
4074
|
const explicit = attrs.showOverflow ?? attrs["show-overflow"];
|
|
@@ -4111,19 +4160,6 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4111
4160
|
}
|
|
4112
4161
|
return isNaN(width2) ? 100 : width2;
|
|
4113
4162
|
}
|
|
4114
|
-
const DEFAULT_CELL_EDIT_RENDER_NAMES = [
|
|
4115
|
-
"input",
|
|
4116
|
-
"$input",
|
|
4117
|
-
"VxeInput",
|
|
4118
|
-
"textarea",
|
|
4119
|
-
"$textarea",
|
|
4120
|
-
"VxeTextarea"
|
|
4121
|
-
];
|
|
4122
|
-
function shouldUseDefaultCellRender(editRender) {
|
|
4123
|
-
if (!editRender) return true;
|
|
4124
|
-
const name = editRender.name;
|
|
4125
|
-
return !!name && DEFAULT_CELL_EDIT_RENDER_NAMES.includes(name);
|
|
4126
|
-
}
|
|
4127
4163
|
const editRanderTypeExtend = ["VxeTextarea"];
|
|
4128
4164
|
const headerClassName = (params) => {
|
|
4129
4165
|
if (typeof props.headerClassName === "string") {
|
|
@@ -4195,7 +4231,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4195
4231
|
}, 1536)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, { ...data })))
|
|
4196
4232
|
]),
|
|
4197
4233
|
key: "1"
|
|
4198
|
-
} :
|
|
4234
|
+
} : usesDefaultCellRender.value ? {
|
|
4199
4235
|
name: "default",
|
|
4200
4236
|
fn: withCtx((data) => [
|
|
4201
4237
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ ...data })), () => [
|
|
@@ -11106,7 +11142,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11106
11142
|
},
|
|
11107
11143
|
setup(__props) {
|
|
11108
11144
|
useCssVars((_ctx) => ({
|
|
11109
|
-
"
|
|
11145
|
+
"e8971a06": unref(token).colorPrimary
|
|
11110
11146
|
}));
|
|
11111
11147
|
const { t: t3 } = useI18n();
|
|
11112
11148
|
const defaultsOption = [
|
|
@@ -11142,7 +11178,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11142
11178
|
Modal.confirm({
|
|
11143
11179
|
title: t3("lang.com_msg_2684"),
|
|
11144
11180
|
onOk: async () => {
|
|
11145
|
-
const { success } = await API.
|
|
11181
|
+
const { success } = await API.GET("/auth/cas/logout");
|
|
11146
11182
|
if (success) {
|
|
11147
11183
|
API.GET("/auth/cas/isLogin");
|
|
11148
11184
|
}
|
|
@@ -11271,7 +11307,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11271
11307
|
};
|
|
11272
11308
|
}
|
|
11273
11309
|
});
|
|
11274
|
-
const WLayoutHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
11310
|
+
const WLayoutHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-69e34512"]]);
|
|
11275
11311
|
const _hoisted_1$1 = { class: "skeleton-list" };
|
|
11276
11312
|
const _hoisted_2$1 = { class: "search-form" };
|
|
11277
11313
|
const _hoisted_3 = { class: "label" };
|