@ljweb/layout-antdv-v4 0.1.0-beta.0 → 0.1.0-beta.2

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.
Files changed (60) hide show
  1. package/README.md +7 -11
  2. package/dist/style.css +169 -83
  3. package/esm/assets/style.css +169 -83
  4. package/esm/components/color-input/ColorInput.js +110 -41
  5. package/esm/components/color-input/ColorInput.js.map +1 -1
  6. package/esm/components/color-input/helpers.js +2 -3
  7. package/esm/components/color-input/helpers.js.map +1 -1
  8. package/esm/components/ext-table/ExtTable.vue.js +1 -1
  9. package/esm/components/ext-table/ExtTable2.vue.js +55 -31
  10. package/esm/components/ext-table/ExtTable2.vue.js.map +1 -1
  11. package/esm/components/index.js +36 -38
  12. package/esm/components/index.js.map +1 -1
  13. package/esm/index.js +36 -38
  14. package/esm/index.js.map +1 -1
  15. package/lib/assets/style.css +169 -83
  16. package/lib/components/color-input/ColorInput.js +110 -39
  17. package/lib/components/color-input/ColorInput.js.map +1 -1
  18. package/lib/components/color-input/helpers.js +2 -3
  19. package/lib/components/color-input/helpers.js.map +1 -1
  20. package/lib/components/ext-table/ExtTable.vue.js +1 -1
  21. package/lib/components/ext-table/ExtTable2.vue.js +55 -31
  22. package/lib/components/ext-table/ExtTable2.vue.js.map +1 -1
  23. package/lib/components/index.js +0 -2
  24. package/lib/components/index.js.map +1 -1
  25. package/lib/index.js +0 -2
  26. package/lib/index.js.map +1 -1
  27. package/package.json +1 -6
  28. package/src/components/color-input/style.less +48 -0
  29. package/types/components/color-input/ColorInput.d.ts +10 -0
  30. package/types/components/color-input/helpers.d.ts +8 -2
  31. package/types/components/config-provider/ConfigProvider.d.ts +1 -1
  32. package/types/components/ext-table/ExtTable.vue.d.ts +6 -6
  33. package/types/components/ext-table/types.d.ts +5 -1
  34. package/types/components/index.d.ts +0 -1
  35. package/types/components/locale-dropdown/LocaleDropdown.d.ts +1 -1
  36. package/esm/components/async-table/AsyncTable.js +0 -290
  37. package/esm/components/async-table/AsyncTable.js.map +0 -1
  38. package/esm/components/async-table/helpers.js +0 -71
  39. package/esm/components/async-table/helpers.js.map +0 -1
  40. package/esm/components/async-table/index.js +0 -6
  41. package/esm/components/async-table/index.js.map +0 -1
  42. package/esm/components/async-table/style.js +0 -2
  43. package/esm/components/async-table/style.js.map +0 -1
  44. package/esm/components/async-table/types.js +0 -2
  45. package/esm/components/async-table/types.js.map +0 -1
  46. package/lib/components/async-table/AsyncTable.js +0 -290
  47. package/lib/components/async-table/AsyncTable.js.map +0 -1
  48. package/lib/components/async-table/helpers.js +0 -71
  49. package/lib/components/async-table/helpers.js.map +0 -1
  50. package/lib/components/async-table/index.js +0 -6
  51. package/lib/components/async-table/index.js.map +0 -1
  52. package/lib/components/async-table/style.js +0 -3
  53. package/lib/components/async-table/style.js.map +0 -1
  54. package/lib/components/async-table/types.js +0 -2
  55. package/lib/components/async-table/types.js.map +0 -1
  56. package/types/components/async-table/AsyncTable.d.ts +0 -413
  57. package/types/components/async-table/helpers.d.ts +0 -18
  58. package/types/components/async-table/index.d.ts +0 -2
  59. package/types/components/async-table/style.d.ts +0 -1
  60. package/types/components/async-table/types.d.ts +0 -50
@@ -1,12 +1,22 @@
1
- import { defineComponent, ref, computed, h } from "vue";
1
+ import { defineComponent, ref, computed, shallowRef, watch, h } from "vue";
2
2
  import { Input, Popover } from "ant-design-vue";
3
3
  import { useConfigContextInject } from "ant-design-vue/es/config-provider/context";
4
- import { colorPickerValue, colorWithAlpha, colorAlpha } from "./helpers.js";
4
+ import { useInjectDisabled } from "ant-design-vue/es/config-provider/DisabledContext";
5
+ import tinycolor from "tinycolor2";
6
+ import { colorWithAlpha } from "./helpers.js";
7
+ const paletteKeys = {
8
+ ArrowLeft: [-0.01, 0],
9
+ ArrowRight: [0.01, 0],
10
+ ArrowDown: [0, -0.01],
11
+ ArrowUp: [0, 0.01]
12
+ };
13
+ const clampUnit = (value) => Math.max(0, Math.min(1, value));
5
14
  const ColorInput = defineComponent({
6
15
  name: "ColorInput",
7
16
  inheritAttrs: false,
8
17
  props: {
9
18
  value: String,
19
+ disabled: { type: Boolean, default: void 0 },
10
20
  disableAlpha: Boolean,
11
21
  disableFields: Boolean,
12
22
  presetColors: { type: Array, default: () => [] },
@@ -19,57 +29,115 @@ const ColorInput = defineComponent({
19
29
  const container = ref();
20
30
  const input = ref();
21
31
  const { getPrefixCls } = useConfigContextInject();
32
+ const contextDisabled = useInjectDisabled();
33
+ const disabled = computed(() => props.disabled ?? contextDisabled.value);
22
34
  const prefixCls = computed(() => getPrefixCls("color-input", props.prefixCls));
35
+ const hsv = computed(() => tinycolor(props.value || "#000000").toHsv());
36
+ const hue = shallowRef(hsv.value.h);
37
+ watch(hsv, ({ h: nextHue, s, v }) => {
38
+ if (s && v) hue.value = nextHue;
39
+ });
23
40
  const change = (value) => {
24
41
  emit("update:value", value);
25
42
  emit("change", value);
26
43
  };
27
- const selectColor = (value) => change(colorWithAlpha(value, colorAlpha(props.value), props.disableAlpha));
28
- const disabled = computed(() => !!attrs.disabled);
44
+ const selectColor = (s, v) => {
45
+ change(colorWithAlpha({ h: hue.value, s: clampUnit(s), v: clampUnit(v) }, hsv.value.a, props.disableAlpha));
46
+ };
47
+ const selectFromPointer = (event) => {
48
+ const { left, top, width, height } = event.currentTarget.getBoundingClientRect();
49
+ if (width && height) selectColor((event.clientX - left) / width, 1 - (event.clientY - top) / height);
50
+ };
29
51
  expose({ focus: () => input.value?.focus(), blur: () => input.value?.blur() });
30
- const renderPicker = () => h("div", { class: `${prefixCls.value}-picker` }, [
31
- h("input", {
32
- type: "color",
33
- "aria-label": "选择颜色",
34
- value: colorPickerValue(props.value),
35
- disabled: disabled.value,
36
- onInput: (event) => selectColor(event.target.value)
37
- }),
38
- !props.disableAlpha ? h("label", { class: `${prefixCls.value}-alpha` }, [
39
- "透明度",
52
+ const renderPicker = () => {
53
+ const { s, v, a } = hsv.value;
54
+ const pickerPrefix = prefixCls.value;
55
+ return h("div", { class: `${pickerPrefix}-picker` }, [
56
+ h(
57
+ "div",
58
+ {
59
+ class: `${pickerPrefix}-palette`,
60
+ role: "slider",
61
+ tabindex: disabled.value ? -1 : 0,
62
+ "aria-label": "饱和度和明度",
63
+ "aria-valuemin": 0,
64
+ "aria-valuemax": 100,
65
+ "aria-valuenow": Math.round(s * 100),
66
+ "aria-valuetext": `饱和度 ${Math.round(s * 100)}%,明度 ${Math.round(v * 100)}%`,
67
+ "aria-disabled": disabled.value,
68
+ style: { backgroundColor: `hsl(${hue.value}, 100%, 50%)` },
69
+ onPointerdown: (event) => {
70
+ if (disabled.value || event.button !== 0) return;
71
+ const palette = event.currentTarget;
72
+ palette.setPointerCapture?.(event.pointerId);
73
+ selectFromPointer(event);
74
+ },
75
+ onPointermove: (event) => {
76
+ if (!disabled.value && event.currentTarget.hasPointerCapture?.(event.pointerId)) {
77
+ selectFromPointer(event);
78
+ }
79
+ },
80
+ onKeydown: (event) => {
81
+ const delta = paletteKeys[event.key];
82
+ if (disabled.value || !delta) return;
83
+ event.preventDefault();
84
+ selectColor(s + delta[0], v + delta[1]);
85
+ }
86
+ },
87
+ h("span", {
88
+ class: `${pickerPrefix}-palette-marker`,
89
+ style: { left: `${s * 100}%`, top: `${(1 - v) * 100}%` }
90
+ })
91
+ ),
40
92
  h("input", {
93
+ class: `${pickerPrefix}-hue`,
41
94
  type: "range",
42
95
  min: 0,
43
- max: 1,
44
- step: 0.01,
45
- "aria-label": "透明度",
46
- value: colorAlpha(props.value),
96
+ max: 359,
97
+ "aria-label": "色相",
98
+ value: Math.round(hue.value) % 360,
47
99
  disabled: disabled.value,
48
- onInput: (event) => change(colorWithAlpha(props.value || "#000000", Number(event.target.value)))
49
- })
50
- ]) : null,
51
- !props.disableFields ? h("input", {
52
- "aria-label": "颜色值",
53
- value: props.value,
54
- disabled: disabled.value,
55
- onInput: (event) => change(event.target.value)
56
- }) : null,
57
- props.presetColors.length ? h(
58
- "div",
59
- { class: `${prefixCls.value}-presets` },
60
- props.presetColors.map(
61
- (color) => h("button", {
62
- key: color,
63
- type: "button",
64
- "aria-label": `选择 ${color}`,
65
- title: color,
100
+ onInput: (event) => {
101
+ hue.value = event.target.valueAsNumber;
102
+ selectColor(s, v);
103
+ }
104
+ }),
105
+ !props.disableAlpha ? h("label", { class: `${pickerPrefix}-alpha` }, [
106
+ "透明度",
107
+ h("input", {
108
+ type: "range",
109
+ min: 0,
110
+ max: 1,
111
+ step: 0.01,
112
+ "aria-label": "透明度",
113
+ value: a,
66
114
  disabled: disabled.value,
67
- style: { backgroundColor: color },
68
- onClick: () => change(props.disableAlpha ? colorWithAlpha(color, 1, true) : color)
115
+ onInput: (event) => change(colorWithAlpha(props.value || "#000000", event.target.valueAsNumber))
69
116
  })
70
- )
71
- ) : null
72
- ]);
117
+ ]) : null,
118
+ !props.disableFields ? h("input", {
119
+ "aria-label": "颜色值",
120
+ value: props.value,
121
+ disabled: disabled.value,
122
+ onInput: (event) => change(event.target.value)
123
+ }) : null,
124
+ props.presetColors.length ? h(
125
+ "div",
126
+ { class: `${pickerPrefix}-presets` },
127
+ props.presetColors.map(
128
+ (color) => h("button", {
129
+ key: color,
130
+ type: "button",
131
+ "aria-label": `选择 ${color}`,
132
+ title: color,
133
+ disabled: disabled.value,
134
+ style: { backgroundColor: color },
135
+ onClick: () => change(props.disableAlpha ? colorWithAlpha(color, 1, true) : color)
136
+ })
137
+ )
138
+ ) : null
139
+ ]);
140
+ };
73
141
  return () => h("div", { ref: container, class: prefixCls.value }, [
74
142
  h(
75
143
  Input,
@@ -77,6 +145,7 @@ const ColorInput = defineComponent({
77
145
  ...attrs,
78
146
  ref: input,
79
147
  value: props.value,
148
+ disabled: disabled.value,
80
149
  onChange: (event) => change(event.target.value)
81
150
  },
82
151
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ColorInput.js","sources":["../../../src/components/color-input/ColorInput.ts"],"sourcesContent":["import { computed, defineComponent, h, ref } from 'vue';\nimport { Input, Popover } from 'ant-design-vue';\nimport { useConfigContextInject } from 'ant-design-vue/es/config-provider/context';\nimport { colorAlpha, colorPickerValue, colorWithAlpha } from './helpers';\nimport type { PropType } from 'vue';\nimport type { PopoverProps } from 'ant-design-vue';\n\nexport interface ColorInputProps {\n value?: string;\n disableAlpha?: boolean;\n disableFields?: boolean;\n presetColors?: string[];\n popupProps?: Partial<PopoverProps>;\n prefixCls?: string;\n /** @deprecated 使用 disableAlpha、disableFields、presetColors 配置色盘。 */\n colorPickerProps?: Record<string, unknown>;\n}\n\nexport default defineComponent({\n name: 'ColorInput',\n inheritAttrs: false,\n props: {\n value: String,\n disableAlpha: Boolean,\n disableFields: Boolean,\n presetColors: { type: Array as PropType<string[]>, default: () => [] },\n popupProps: Object as PropType<Partial<PopoverProps>>,\n colorPickerProps: Object as PropType<Record<string, unknown>>,\n prefixCls: String,\n },\n emits: ['change', 'update:value'],\n setup(props, { attrs, emit, slots, expose }) {\n const container = ref<HTMLElement>();\n const input = ref<any>();\n const { getPrefixCls } = useConfigContextInject();\n const prefixCls = computed(() => getPrefixCls('color-input', props.prefixCls));\n const change = (value: string) => {\n emit('update:value', value);\n emit('change', value);\n };\n const selectColor = (value: string) => change(colorWithAlpha(value, colorAlpha(props.value), props.disableAlpha));\n const disabled = computed(() => !!attrs.disabled);\n expose({ focus: () => input.value?.focus(), blur: () => input.value?.blur() });\n\n const renderPicker = () =>\n h('div', { class: `${prefixCls.value}-picker` }, [\n h('input', {\n type: 'color',\n 'aria-label': '选择颜色',\n value: colorPickerValue(props.value),\n disabled: disabled.value,\n onInput: (event: Event) => selectColor((event.target as HTMLInputElement).value),\n }),\n !props.disableAlpha\n ? h('label', { class: `${prefixCls.value}-alpha` }, [\n '透明度',\n h('input', {\n type: 'range',\n min: 0,\n max: 1,\n step: 0.01,\n 'aria-label': '透明度',\n value: colorAlpha(props.value),\n disabled: disabled.value,\n onInput: (event: Event) =>\n change(colorWithAlpha(props.value || '#000000', Number((event.target as HTMLInputElement).value))),\n }),\n ])\n : null,\n !props.disableFields\n ? h('input', {\n 'aria-label': '颜色值',\n value: props.value,\n disabled: disabled.value,\n onInput: (event: Event) => change((event.target as HTMLInputElement).value),\n })\n : null,\n props.presetColors.length\n ? h(\n 'div',\n { class: `${prefixCls.value}-presets` },\n props.presetColors.map((color) =>\n h('button', {\n key: color,\n type: 'button',\n 'aria-label': `选择 ${color}`,\n title: color,\n disabled: disabled.value,\n style: { backgroundColor: color },\n onClick: () => change(props.disableAlpha ? colorWithAlpha(color, 1, true) : color),\n }),\n ),\n )\n : null,\n ]);\n\n return () =>\n h('div', { ref: container, class: prefixCls.value }, [\n h(\n Input,\n {\n ...attrs,\n ref: input,\n value: props.value,\n onChange: (event: Event) => change((event.target as HTMLInputElement).value),\n },\n {\n ...slots,\n prefix: () =>\n h(\n Popover,\n {\n ...props.popupProps,\n trigger: 'click',\n ...(disabled.value ? { open: false } : {}),\n getPopupContainer: () => container.value || document.body,\n },\n {\n content: renderPicker,\n default: () =>\n h('button', {\n type: 'button',\n class: `${prefixCls.value}-color-tips`,\n 'aria-label': '打开颜色选择器',\n disabled: disabled.value,\n style: { backgroundColor: props.value },\n }),\n },\n ),\n },\n ),\n ]);\n },\n});\n"],"names":[],"mappings":";;;;AAkBA,MAAA,aAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,IACL,OAAO;AAAA,IACP,cAAc;AAAA,IACd,eAAe;AAAA,IACf,cAAc,EAAE,MAAM,OAA6B,SAAS,MAAM,CAAA,EAAC;AAAA,IACnE,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,WAAW;AAAA,EAAA;AAAA,EAEb,OAAO,CAAC,UAAU,cAAc;AAAA,EAChC,MAAM,OAAO,EAAE,OAAO,MAAM,OAAO,UAAU;AAC3C,UAAM,YAAY,IAAA;AAClB,UAAM,QAAQ,IAAA;AACd,UAAM,EAAE,aAAA,IAAiB,uBAAA;AACzB,UAAM,YAAY,SAAS,MAAM,aAAa,eAAe,MAAM,SAAS,CAAC;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AAE,OAAO,GAAG,UAAU,KAAK,WAAA;AAAA,QAC3B,MAAM,aAAa;AAAA,UAAI,CAAC,UACtB,EAAE,UAAU;AAAA,YACV,KAAK;AAAA,YACL,MAAM;AAAA,YACN,cAAc,MAAM,KAAK;AAAA,YACzB,OAAO;AAAA,YACP,UAAU,SAAS;AAAA,YACnB,OAAO,EAAE,iBAAiB,MAAA;AAAA,YAC1B,SAAS,MAAM,OAAO,MAAM,eAAe,eAAe,OAAO,GAAG,IAAI,IAAI,KAAK;AAAA,UAAA,CAClF;AAAA,QAAA;AAAA,MACH,IAEF;AAAA,IAAA,CACL;AAEH,WAAO,MACL,EAAE,OAAO,EAAE,KAAK,WAAW,OAAO,UAAU,SAAS;AAAA,MACnD;AAAA,QACE;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,KAAK;AAAA,UACL,OAAO,MAAM;AAAA,UACb,UAAU,CAAC,UAAiB,OAAQ,MAAM,OAA4B,KAAK;AAAA,QAAA;AAAA,QAE7E;AAAA,UACE,GAAG;AAAA,UACH,QAAQ,MACN;AAAA,YACE;AAAA,YACA;AAAA,cACE,GAAG,MAAM;AAAA,cACT,SAAS;AAAA,cACT,GAAI,SAAS,QAAQ,EAAE,MAAM,MAAA,IAAU,CAAA;AAAA,cACvC,mBAAmB,MAAM,UAAU,SAAS,SAAS;AAAA,YAAA;AAAA,YAEvD;AAAA,cACE,SAAS;AAAA,cACT,SAAS,MACP,EAAE,UAAU;AAAA,gBACV,MAAM;AAAA,gBACN,OAAO,GAAG,UAAU,KAAK;AAAA,gBACzB,cAAc;AAAA,gBACd,UAAU,SAAS;AAAA,gBACnB,OAAO,EAAE,iBAAiB,MAAM,MAAA;AAAA,cAAM,CACvC;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,MACJ;AAAA,IACF,CACD;AAAA,EACL;AACF,CAAC;"}
1
+ {"version":3,"file":"ColorInput.js","sources":["../../../src/components/color-input/ColorInput.ts"],"sourcesContent":["import { computed, defineComponent, h, ref, shallowRef, watch } from 'vue';\nimport { Input, Popover } from 'ant-design-vue';\nimport { useConfigContextInject } from 'ant-design-vue/es/config-provider/context';\nimport { useInjectDisabled } from 'ant-design-vue/es/config-provider/DisabledContext';\nimport tinycolor from 'tinycolor2';\nimport { colorWithAlpha } from './helpers';\nimport type { PropType } from 'vue';\nimport type { PopoverProps } from 'ant-design-vue';\n\nconst paletteKeys: Partial<Record<string, [number, number]>> = {\n ArrowLeft: [-0.01, 0],\n ArrowRight: [0.01, 0],\n ArrowDown: [0, -0.01],\n ArrowUp: [0, 0.01],\n};\n\nconst clampUnit = (value: number) => Math.max(0, Math.min(1, value));\n\nexport interface ColorInputProps {\n value?: string;\n disabled?: boolean;\n disableAlpha?: boolean;\n disableFields?: boolean;\n presetColors?: string[];\n popupProps?: Partial<PopoverProps>;\n prefixCls?: string;\n /** @deprecated 使用 disableAlpha、disableFields、presetColors 配置色盘。 */\n colorPickerProps?: Record<string, unknown>;\n}\n\nexport default defineComponent({\n name: 'ColorInput',\n inheritAttrs: false,\n props: {\n value: String,\n disabled: { type: Boolean, default: undefined },\n disableAlpha: Boolean,\n disableFields: Boolean,\n presetColors: { type: Array as PropType<string[]>, default: () => [] },\n popupProps: Object as PropType<Partial<PopoverProps>>,\n colorPickerProps: Object as PropType<Record<string, unknown>>,\n prefixCls: String,\n },\n emits: ['change', 'update:value'],\n setup(props, { attrs, emit, slots, expose }) {\n const container = ref<HTMLElement>();\n const input = ref<any>();\n const { getPrefixCls } = useConfigContextInject();\n const contextDisabled = useInjectDisabled();\n const disabled = computed(() => props.disabled ?? contextDisabled.value);\n const prefixCls = computed(() => getPrefixCls('color-input', props.prefixCls));\n const hsv = computed(() => tinycolor(props.value || '#000000').toHsv());\n const hue = shallowRef(hsv.value.h);\n watch(hsv, ({ h: nextHue, s, v }) => {\n // 黑色和灰色没有可还原的色相,保留用户在滑条上选中的色相。\n if (s && v) hue.value = nextHue;\n });\n\n const change = (value: string) => {\n emit('update:value', value);\n emit('change', value);\n };\n const selectColor = (s: number, v: number) => {\n change(colorWithAlpha({ h: hue.value, s: clampUnit(s), v: clampUnit(v) }, hsv.value.a, props.disableAlpha));\n };\n const selectFromPointer = (event: PointerEvent) => {\n const { left, top, width, height } = (event.currentTarget as HTMLElement).getBoundingClientRect();\n if (width && height) selectColor((event.clientX - left) / width, 1 - (event.clientY - top) / height);\n };\n expose({ focus: () => input.value?.focus(), blur: () => input.value?.blur() });\n\n const renderPicker = () => {\n const { s, v, a } = hsv.value;\n const pickerPrefix = prefixCls.value;\n return h('div', { class: `${pickerPrefix}-picker` }, [\n h(\n 'div',\n {\n class: `${pickerPrefix}-palette`,\n role: 'slider',\n tabindex: disabled.value ? -1 : 0,\n 'aria-label': '饱和度和明度',\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'aria-valuenow': Math.round(s * 100),\n 'aria-valuetext': `饱和度 ${Math.round(s * 100)}%,明度 ${Math.round(v * 100)}%`,\n 'aria-disabled': disabled.value,\n style: { backgroundColor: `hsl(${hue.value}, 100%, 50%)` },\n onPointerdown: (event: PointerEvent) => {\n if (disabled.value || event.button !== 0) return;\n const palette = event.currentTarget as HTMLElement;\n palette.setPointerCapture?.(event.pointerId);\n selectFromPointer(event);\n },\n onPointermove: (event: PointerEvent) => {\n if (!disabled.value && (event.currentTarget as HTMLElement).hasPointerCapture?.(event.pointerId)) {\n selectFromPointer(event);\n }\n },\n onKeydown: (event: KeyboardEvent) => {\n const delta = paletteKeys[event.key];\n if (disabled.value || !delta) return;\n event.preventDefault();\n selectColor(s + delta[0], v + delta[1]);\n },\n },\n h('span', {\n class: `${pickerPrefix}-palette-marker`,\n style: { left: `${s * 100}%`, top: `${(1 - v) * 100}%` },\n }),\n ),\n h('input', {\n class: `${pickerPrefix}-hue`,\n type: 'range',\n min: 0,\n max: 359,\n 'aria-label': '色相',\n value: Math.round(hue.value) % 360,\n disabled: disabled.value,\n onInput: (event: Event) => {\n hue.value = (event.target as HTMLInputElement).valueAsNumber;\n selectColor(s, v);\n },\n }),\n !props.disableAlpha\n ? h('label', { class: `${pickerPrefix}-alpha` }, [\n '透明度',\n h('input', {\n type: 'range',\n min: 0,\n max: 1,\n step: 0.01,\n 'aria-label': '透明度',\n value: a,\n disabled: disabled.value,\n onInput: (event: Event) =>\n change(colorWithAlpha(props.value || '#000000', (event.target as HTMLInputElement).valueAsNumber)),\n }),\n ])\n : null,\n !props.disableFields\n ? h('input', {\n 'aria-label': '颜色值',\n value: props.value,\n disabled: disabled.value,\n onInput: (event: Event) => change((event.target as HTMLInputElement).value),\n })\n : null,\n props.presetColors.length\n ? h(\n 'div',\n { class: `${pickerPrefix}-presets` },\n props.presetColors.map((color) =>\n h('button', {\n key: color,\n type: 'button',\n 'aria-label': `选择 ${color}`,\n title: color,\n disabled: disabled.value,\n style: { backgroundColor: color },\n onClick: () => change(props.disableAlpha ? colorWithAlpha(color, 1, true) : color),\n }),\n ),\n )\n : null,\n ]);\n };\n\n return () =>\n h('div', { ref: container, class: prefixCls.value }, [\n h(\n Input,\n {\n ...attrs,\n ref: input,\n value: props.value,\n disabled: disabled.value,\n onChange: (event: Event) => change((event.target as HTMLInputElement).value),\n },\n {\n ...slots,\n prefix: () =>\n h(\n Popover,\n {\n ...props.popupProps,\n trigger: 'click',\n ...(disabled.value ? { open: false } : {}),\n getPopupContainer: () => container.value || document.body,\n },\n {\n content: renderPicker,\n default: () =>\n h('button', {\n type: 'button',\n class: `${prefixCls.value}-color-tips`,\n 'aria-label': '打开颜色选择器',\n disabled: disabled.value,\n style: { backgroundColor: props.value },\n }),\n },\n ),\n },\n ),\n ]);\n },\n});\n"],"names":[],"mappings":";;;;;;AASA,MAAM,cAAyD;AAAA,EAC7D,WAAW,CAAC,OAAO,CAAC;AAAA,EACpB,YAAY,CAAC,MAAM,CAAC;AAAA,EACpB,WAAW,CAAC,GAAG,KAAK;AAAA,EACpB,SAAS,CAAC,GAAG,IAAI;AACnB;AAEA,MAAM,YAAY,CAAC,UAAkB,KAAK,IAAI,GAA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AAA,cACL,MAAM;AAAA,cACN,cAAc,MAAM,KAAK;AAAA,cACzB,OAAO;AAAA,cACP,UAAU,SAAS;AAAA,cACnB,OAAO,EAAE,iBAAiB,MAAA;AAAA,cAC1B,SAAS,MAAM,OAAO,MAAM,eAAe,eAAe,OAAO,GAAG,IAAI,IAAI,KAAK;AAAA,YAAA,CAClF;AAAA,UAAA;AAAA,QACH,IAEF;AAAA,MAAA,CACL;AAAA,IACH;AAEA,WAAO,MACL,EAAE,OAAO,EAAE,KAAK,WAAW,OAAO,UAAU,SAAS;AAAA,MACnD;AAAA,QACE;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,KAAK;AAAA,UACL,OAAO,MAAM;AAAA,UACb,UAAU,SAAS;AAAA,UACnB,UAAU,CAAC,UAAiB,OAAQ,MAAM,OAA4B,KAAK;AAAA,QAAA;AAAA,QAE7E;AAAA,UACE,GAAG;AAAA,UACH,QAAQ,MACN;AAAA,YACE;AAAA,YACA;AAAA,cACE,GAAG,MAAM;AAAA,cACT,SAAS;AAAA,cACT,GAAI,SAAS,QAAQ,EAAE,MAAM,MAAA,IAAU,CAAA;AAAA,cACvC,mBAAmB,MAAM,UAAU,SAAS,SAAS;AAAA,YAAA;AAAA,YAEvD;AAAA,cACE,SAAS;AAAA,cACT,SAAS,MACP,EAAE,UAAU;AAAA,gBACV,MAAM;AAAA,gBACN,OAAO,GAAG,UAAU,KAAK;AAAA,gBACzB,cAAc;AAAA,gBACd,UAAU,SAAS;AAAA,gBACnB,OAAO,EAAE,iBAAiB,MAAM,MAAA;AAAA,cAAM,CACvC;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,MACJ;AAAA,IACF,CACD;AAAA,EACL;AACF,CAAC;"}
@@ -3,9 +3,8 @@ function colorPickerValue(value) {
3
3
  return tinycolor(value || "#000000").toHexString();
4
4
  }
5
5
  function colorWithAlpha(value, alpha, disableAlpha = false) {
6
- const color = tinycolor(value);
7
- if (disableAlpha) return color.toHexString();
8
- return color.setAlpha(Math.max(0, Math.min(1, alpha))).toRgbString();
6
+ if (disableAlpha) return colorPickerValue(value);
7
+ return tinycolor(value).setAlpha(Math.max(0, Math.min(1, alpha))).toRgbString();
9
8
  }
10
9
  function colorAlpha(value) {
11
10
  return tinycolor(value || "#000000").getAlpha();
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../src/components/color-input/helpers.ts"],"sourcesContent":["import tinycolor from 'tinycolor2';\n\nexport function colorPickerValue(value?: string) {\n return tinycolor(value || '#000000').toHexString();\n}\n\nexport function colorWithAlpha(value: string, alpha: number, disableAlpha = false) {\n const color = tinycolor(value);\n if (disableAlpha) return color.toHexString();\n return color.setAlpha(Math.max(0, Math.min(1, alpha))).toRgbString();\n}\n\nexport function colorAlpha(value?: string) {\n return tinycolor(value || '#000000').getAlpha();\n}\n"],"names":[],"mappings":";AAEO,SAAS,iBAAiB,OAAgB;AAC/C,SAAO,UAAU,SAAS,SAAS,EAAE,YAAA;AACvC;AAEO,SAAS,eAAe,OAAe,OAAe,eAAe,OAAO;AACjF,QAAM,QAAQ,UAAU,KAAK;AAC7B,MAAI,aAAc,QAAO,MAAM,YAAA;AAC/B,SAAO,MAAM,SAAS,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,YAAA;AACzD;AAEO,SAAS,WAAW,OAAgB;AACzC,SAAO,UAAU,SAAS,SAAS,EAAE,SAAA;AACvC;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../src/components/color-input/helpers.ts"],"sourcesContent":["import tinycolor from 'tinycolor2';\n\ntype ColorValue = string | { h: number; s: number; v: number };\n\nexport function colorPickerValue(value?: ColorValue) {\n return tinycolor(value || '#000000').toHexString();\n}\n\nexport function colorWithAlpha(value: ColorValue, alpha: number, disableAlpha = false) {\n if (disableAlpha) return colorPickerValue(value);\n return tinycolor(value)\n .setAlpha(Math.max(0, Math.min(1, alpha)))\n .toRgbString();\n}\n\nexport function colorAlpha(value?: string) {\n return tinycolor(value || '#000000').getAlpha();\n}\n"],"names":[],"mappings":";AAIO,SAAS,iBAAiB,OAAoB;AACnD,SAAO,UAAU,SAAS,SAAS,EAAE,YAAA;AACvC;AAEO,SAAS,eAAe,OAAmB,OAAe,eAAe,OAAO;AACrF,MAAI,aAAc,QAAO,iBAAiB,KAAK;AAC/C,SAAO,UAAU,KAAK,EACnB,SAAS,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,CAAC,EACxC,YAAA;AACL;AAEO,SAAS,WAAW,OAAgB;AACzC,SAAO,UAAU,SAAS,SAAS,EAAE,SAAA;AACvC;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ExtTable2.vue.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const ExtTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-60f82f19"]]);
4
+ const ExtTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8476b82b"]]);
5
5
  export {
6
6
  ExtTable as default
7
7
  };
@@ -20,7 +20,7 @@ import { TABLE_SHOW_TOTAL, TABLE_SHOW_SIZE_CHANGER, TABLE_PAGE_SIZE_OPTIONS, NES
20
20
  import _sfc_main$4 from "./Status.vue.js";
21
21
  import Operations from "./Operations.vue.js";
22
22
  import ColumnSetting from "./ColumnSetting.vue.js";
23
- const _withScopeId = (n) => (pushScopeId("data-v-60f82f19"), n = n(), popScopeId(), n);
23
+ const _withScopeId = (n) => (pushScopeId("data-v-8476b82b"), n = n(), popScopeId(), n);
24
24
  const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
25
25
  "svg",
26
26
  {
@@ -57,12 +57,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  formatMappings: {},
58
58
  prefixCls: { default: void 0 },
59
59
  size: {},
60
+ scroll: {},
60
61
  dataSource: { default: void 0 },
61
62
  toolbar: { default: void 0 },
62
63
  fixedColumns: {},
63
64
  requiredColumns: {},
64
65
  tableId: { default: void 0 },
65
66
  showPagination: { type: Boolean, default: true },
67
+ paginationProps: {},
66
68
  paginationPosition: { default: "right" },
67
69
  defaultPageSize: { default: 20 },
68
70
  pageSizeOptions: { default: () => TABLE_PAGE_SIZE_OPTIONS },
@@ -433,10 +435,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
433
435
  },
434
436
  { immediate: true }
435
437
  );
436
- const loadData = (isResetPage = false) => {
437
- if (isResetPage) {
438
- currentPage.value = 1;
439
- }
438
+ let queryVersion = 0;
439
+ const loadPage = (canRetryLastPage = true) => {
440
+ const version = ++queryVersion;
440
441
  return new Promise((resolve) => {
441
442
  isLoading.value = true;
442
443
  const queryParams = {
@@ -446,9 +447,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
446
447
  },
447
448
  ...props.sortRemote ? { sorter: tableSorter.value } : {},
448
449
  success: (data = { list: [], count: 0 }) => {
450
+ if (version !== queryVersion) return resolve();
449
451
  if (data.list.length === 0 && props.showPagination && currentPage.value > 1) {
450
- currentPage.value--;
451
- loadData().then(resolve);
452
+ const lastPage = Math.max(1, Math.ceil(data.count / pageSize.value));
453
+ currentPage.value = canRetryLastPage && lastPage < currentPage.value ? lastPage : 1;
454
+ loadPage(false).then(resolve);
452
455
  return;
453
456
  }
454
457
  isLoading.value = false;
@@ -460,6 +463,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
460
463
  resolve();
461
464
  },
462
465
  fail: (err) => {
466
+ if (version !== queryVersion) return resolve();
463
467
  isLoading.value = false;
464
468
  if (err && isPlainObject(err) && err.message) {
465
469
  message.error({
@@ -479,6 +483,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
479
483
  emits("query", queryParams);
480
484
  });
481
485
  };
486
+ const loadData = (isResetPage = false) => {
487
+ if (isResetPage) currentPage.value = 1;
488
+ return loadPage();
489
+ };
482
490
  const onTableChange = (_pagination, _filters, sorter, extra) => {
483
491
  emits("change", _pagination, _filters, sorter, extra);
484
492
  if (!props.sortRemote) {
@@ -514,6 +522,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
514
522
  refreshColumns(true);
515
523
  };
516
524
  const reset = () => {
525
+ queryVersion++;
517
526
  total.value = 0;
518
527
  pageSize.value = props.defaultPageSize;
519
528
  currentPage.value = 1;
@@ -753,6 +762,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
753
762
  scheduleUndefinedColumnWidthMeasurement();
754
763
  });
755
764
  onUnmounted(() => {
765
+ queryVersion++;
756
766
  isTableMounted = false;
757
767
  columnWidthMeasureVersion++;
758
768
  destroySortable();
@@ -763,6 +773,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
763
773
  pageSize.value = size;
764
774
  loadData();
765
775
  };
776
+ const paginationBindings = computed(
777
+ () => props.paginationProps ?? {
778
+ current: currentPage.value,
779
+ pageSize: pageSize.value,
780
+ total: total.value,
781
+ showTotal: props.showTotal,
782
+ pageSizeOptions: props.pageSizeOptions,
783
+ showSizeChanger: props.showSizeChanger,
784
+ onChange: onPageChange
785
+ }
786
+ );
787
+ const showPaginationControls = computed(() => {
788
+ const { hideOnSinglePage, total: total2 = 0, pageSize: pageSize2, defaultPageSize = 10 } = paginationBindings.value;
789
+ return props.showPagination && (!hideOnSinglePage || total2 > (pageSize2 ?? defaultPageSize));
790
+ });
766
791
  const isSlot = (column, type) => {
767
792
  return get(column, "format.type") === type;
768
793
  };
@@ -796,7 +821,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
796
821
  return get(row, column.dataIndex, defaultValue || props.emptyValue);
797
822
  };
798
823
  const formatIndex = (index) => {
799
- return (currentPage.value - 1) * pageSize.value + index + 1;
824
+ const current = props.paginationProps?.current ?? currentPage.value;
825
+ const size = props.paginationProps?.pageSize ?? pageSize.value;
826
+ return (current - 1) * size + index + 1;
800
827
  };
801
828
  const formatFileType = (row, column) => {
802
829
  const value = get(row, column.dataIndex);
@@ -1182,6 +1209,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1182
1209
  disabled: unref(isNestedExtTable) || !_ctx.scrollTable,
1183
1210
  "row-selection": computedRowSelection.value,
1184
1211
  size: _ctx.size,
1212
+ scroll: _ctx.scroll,
1185
1213
  bordered: _ctx.bordered,
1186
1214
  columns: columnList.value,
1187
1215
  loading: isLoading.value,
@@ -1448,7 +1476,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1448
1476
  ]),
1449
1477
  key: "2"
1450
1478
  } : void 0,
1451
- _ctx.showPagination || computedBatchOperations.value && computedBatchOperations.value.length > 0 || _ctx.$slots["batch-operators"] ? {
1479
+ showPaginationControls.value || computedBatchOperations.value && computedBatchOperations.value.length > 0 || _ctx.$slots["batch-operators"] ? {
1452
1480
  name: "default",
1453
1481
  fn: withCtx(() => [
1454
1482
  createVNode(unref(Flex), {
@@ -1495,21 +1523,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1495
1523
  clear: handleClearSelection
1496
1524
  }, void 0, true) : createCommentVNode("v-if", true)
1497
1525
  ]),
1498
- _ctx.showPagination ? (openBlock(), createBlock(unref(Flex), {
1526
+ showPaginationControls.value ? (openBlock(), createBlock(unref(Flex), {
1499
1527
  key: 0,
1500
1528
  justify: paginationJustify.value,
1501
1529
  class: "ext-table-pagination"
1502
1530
  }, {
1503
1531
  default: withCtx(() => [
1504
- createVNode(unref(Pagination), {
1505
- current: currentPage.value,
1506
- "page-size": pageSize.value,
1507
- total: total.value,
1508
- "show-total": _ctx.showTotal,
1509
- "page-size-options": _ctx.pageSizeOptions,
1510
- "show-size-changer": _ctx.showSizeChanger,
1511
- onChange: onPageChange
1512
- }, null, 8, ["current", "page-size", "total", "show-total", "page-size-options", "show-size-changer"])
1532
+ createVNode(
1533
+ unref(Pagination),
1534
+ normalizeProps(guardReactiveProps(paginationBindings.value)),
1535
+ null,
1536
+ 16
1537
+ /* FULL_PROPS */
1538
+ )
1513
1539
  ]),
1514
1540
  _: 1
1515
1541
  /* STABLE */
@@ -1521,9 +1547,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1521
1547
  ]),
1522
1548
  key: "3"
1523
1549
  } : void 0
1524
- ]), 1040, ["disabled", "row-selection", "size", "bordered", "columns", "loading", "data-source", "row-key"]),
1550
+ ]), 1040, ["disabled", "row-selection", "size", "scroll", "bordered", "columns", "loading", "data-source", "row-key"]),
1525
1551
  createCommentVNode(" pagination "),
1526
- _ctx.showPagination || computedBatchOperations.value && computedBatchOperations.value.length > 0 || _ctx.$slots["batch-operators"] ? (openBlock(), createBlock(unref(Flex), {
1552
+ showPaginationControls.value || computedBatchOperations.value && computedBatchOperations.value.length > 0 || _ctx.$slots["batch-operators"] ? (openBlock(), createBlock(unref(Flex), {
1527
1553
  key: 1,
1528
1554
  justify: "space-between",
1529
1555
  align: "center",
@@ -1568,21 +1594,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1568
1594
  clear: handleClearSelection
1569
1595
  }, void 0, true) : createCommentVNode("v-if", true)
1570
1596
  ]),
1571
- _ctx.showPagination ? (openBlock(), createBlock(unref(Flex), {
1597
+ showPaginationControls.value ? (openBlock(), createBlock(unref(Flex), {
1572
1598
  key: 0,
1573
1599
  justify: paginationJustify.value,
1574
1600
  class: "ext-table-pagination"
1575
1601
  }, {
1576
1602
  default: withCtx(() => [
1577
- createVNode(unref(Pagination), {
1578
- current: currentPage.value,
1579
- "page-size": pageSize.value,
1580
- total: total.value,
1581
- "show-total": _ctx.showTotal,
1582
- "page-size-options": _ctx.pageSizeOptions,
1583
- "show-size-changer": _ctx.showSizeChanger,
1584
- onChange: onPageChange
1585
- }, null, 8, ["current", "page-size", "total", "show-total", "page-size-options", "show-size-changer"])
1603
+ createVNode(
1604
+ unref(Pagination),
1605
+ normalizeProps(guardReactiveProps(paginationBindings.value)),
1606
+ null,
1607
+ 16
1608
+ /* FULL_PROPS */
1609
+ )
1586
1610
  ]),
1587
1611
  _: 1
1588
1612
  /* STABLE */