yc-pro-components 0.0.20 → 0.0.21

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 (59) hide show
  1. package/es/components/index.mjs +3 -1
  2. package/es/components/yc-plus-page/index.d.ts +5 -1
  3. package/es/components/yc-plus-page/index.mjs +5 -1
  4. package/es/components/yc-plus-page/src/constants.d.ts +22 -0
  5. package/es/components/yc-plus-page/src/constants.mjs +41 -0
  6. package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +85 -0
  7. package/es/components/yc-plus-page/src/header-filter-cell.vue.mjs +6 -0
  8. package/es/components/yc-plus-page/src/header-filter-cell.vue2.mjs +354 -0
  9. package/es/components/yc-plus-page/src/index.vue.d.ts +327 -23
  10. package/es/components/yc-plus-page/src/index.vue.mjs +1 -1
  11. package/es/components/yc-plus-page/src/index.vue2.mjs +126 -8
  12. package/es/components/yc-plus-page/src/type.d.ts +112 -0
  13. package/es/components/yc-plus-page/src/use-header-filter.d.ts +55 -0
  14. package/es/components/yc-plus-page/src/use-header-filter.mjs +172 -0
  15. package/es/index.css +2 -1
  16. package/es/index.mjs +3 -1
  17. package/index.css +10 -6
  18. package/index.js +844 -163
  19. package/index.min.css +2 -1
  20. package/index.min.js +7 -7
  21. package/index.min.mjs +7 -7
  22. package/index.mjs +839 -164
  23. package/lib/components/index.js +8 -0
  24. package/lib/components/yc-plus-page/index.d.ts +5 -1
  25. package/lib/components/yc-plus-page/index.js +10 -0
  26. package/lib/components/yc-plus-page/src/constants.d.ts +22 -0
  27. package/lib/components/yc-plus-page/src/constants.js +46 -0
  28. package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +85 -0
  29. package/lib/components/yc-plus-page/src/header-filter-cell.vue.js +10 -0
  30. package/lib/components/yc-plus-page/src/header-filter-cell.vue2.js +358 -0
  31. package/lib/components/yc-plus-page/src/index.vue.d.ts +327 -23
  32. package/lib/components/yc-plus-page/src/index.vue.js +1 -1
  33. package/lib/components/yc-plus-page/src/index.vue2.js +125 -7
  34. package/lib/components/yc-plus-page/src/type.d.ts +112 -0
  35. package/lib/components/yc-plus-page/src/use-header-filter.d.ts +55 -0
  36. package/lib/components/yc-plus-page/src/use-header-filter.js +174 -0
  37. package/lib/index.css +2 -1
  38. package/lib/index.js +8 -0
  39. package/locale/en.js +1 -1
  40. package/locale/en.min.js +1 -1
  41. package/locale/en.min.mjs +1 -1
  42. package/locale/en.mjs +1 -1
  43. package/locale/ja.js +1 -1
  44. package/locale/ja.min.js +1 -1
  45. package/locale/ja.min.mjs +1 -1
  46. package/locale/ja.mjs +1 -1
  47. package/locale/ko.js +1 -1
  48. package/locale/ko.min.js +1 -1
  49. package/locale/ko.min.mjs +1 -1
  50. package/locale/ko.mjs +1 -1
  51. package/locale/zh-cn.js +1 -1
  52. package/locale/zh-cn.min.js +1 -1
  53. package/locale/zh-cn.min.mjs +1 -1
  54. package/locale/zh-cn.mjs +1 -1
  55. package/locale/zh-tw.js +1 -1
  56. package/locale/zh-tw.min.js +1 -1
  57. package/locale/zh-tw.min.mjs +1 -1
  58. package/locale/zh-tw.mjs +1 -1
  59. package/package.json +1 -1
@@ -21,7 +21,7 @@ export { PlusLayout } from './layout/index.mjs';
21
21
  export { PlusCheckCard } from './check-card/index.mjs';
22
22
  export { PlusCheckCardGroup } from './check-card-group/index.mjs';
23
23
  export { YcConfigProvider as ReConfigProvider, YcConfigProvider } from './yc-config-provider/index.mjs';
24
- export { RePlusPage, YcPlusPage } from './yc-plus-page/index.mjs';
24
+ export { RePlusPage, YcPlusPage, YcTableHeaderFilterCell } from './yc-plus-page/index.mjs';
25
25
  export { RePlusTree, YcPlusTree } from './yc-plus-tree/index.mjs';
26
26
  export { ReDialog, YcDialog } from './yc-dialog/index.mjs';
27
27
  export { ReDrawer, YcDrawer } from './yc-drawer/index.mjs';
@@ -41,6 +41,8 @@ export { YcDownloadDialogWithInstall } from './yc-download-dialog/index.mjs';
41
41
  export { YcTabsWithFilterWithInstall } from './yc-tabs-with-filter/index.mjs';
42
42
  export { DEFAULT_CDN_CONFIG, DEFAULT_YC_CONFIG, YC_CONFIG_KEY } from './yc-config-provider/src/type.mjs';
43
43
  export { useYcAuth, useYcCdn, useYcCdnUrl, useYcComponentConfig, useYcConfig, useYcPerms, useYcShowPageSearch, useYcTranslate } from './yc-config-provider/src/useYcConfig.mjs';
44
+ export { useHeaderFilter } from './yc-plus-page/src/use-header-filter.mjs';
45
+ export { DEFAULT_OPERATORS, NO_VALUE_OPERATORS, OPERATOR_CATALOG, OPERATOR_LABELS } from './yc-plus-page/src/constants.mjs';
44
46
  export { default as ReSelectV2, default as YcSelectV2 } from './yc-select-v2/src/index.vue.mjs';
45
47
  export { findNodeById, findNodeByPath, findNodePosition, insertAsChild, insertAsSibling, insertNodeAtPosition, removeNode, reorderNodeChildren, reorderSiblingNodes } from './yc-plus-tree/src/treeDataUtils.mjs';
46
48
  export { SIZE_MAP } from './yc-dialog/src/type.mjs';
@@ -1,8 +1,12 @@
1
1
  import { default as YcPlusPageComponent } from './src/index.vue';
2
2
  import { DefineComponent } from 'vue';
3
3
 
4
- export type { YcPlusPageProps } from './src/type';
4
+ export type { YcPlusPageProps, FieldCatalogItem, FieldCatalog, OperatorOption, HeaderFilterConfig, ColumnHeaderFilterConfig, HeaderFilterPayload, HeaderFilterResetPayload, FilterItem, HeaderFiltersState, OrderByItem, RequestResponse } from './src/type';
5
+ export { useHeaderFilter } from './src/use-header-filter';
6
+ export type { UseHeaderFilterOptions, UseHeaderFilterReturn } from './src/use-header-filter';
7
+ export { OPERATOR_CATALOG, OPERATOR_LABELS, NO_VALUE_OPERATORS, DEFAULT_OPERATORS } from './src/constants';
5
8
  export type YcPlusPageInstance = InstanceType<typeof YcPlusPageComponent>;
6
9
  export declare const YcPlusPage: DefineComponent;
10
+ export declare const YcTableHeaderFilterCell: DefineComponent;
7
11
  export declare const RePlusPage: DefineComponent;
8
12
  export type { YcPlusPageProps as RePlusPageProps } from './src/type';
@@ -1,6 +1,10 @@
1
1
  import YcPlusPageComponent from './src/index.vue.mjs';
2
+ import YcTableHeaderFilterCellComponent from './src/header-filter-cell.vue.mjs';
3
+ export { useHeaderFilter } from './src/use-header-filter.mjs';
4
+ export { DEFAULT_OPERATORS, NO_VALUE_OPERATORS, OPERATOR_CATALOG, OPERATOR_LABELS } from './src/constants.mjs';
2
5
 
3
6
  const YcPlusPage = YcPlusPageComponent;
7
+ const YcTableHeaderFilterCell = YcTableHeaderFilterCellComponent;
4
8
  const RePlusPage = YcPlusPageComponent;
5
9
 
6
- export { RePlusPage, YcPlusPage };
10
+ export { RePlusPage, YcPlusPage, YcTableHeaderFilterCell };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 表头筛选相关常量
3
+ */
4
+ /**
5
+ * 操作符目录 - 按字段类型分组
6
+ */
7
+ export declare const OPERATOR_CATALOG: Record<string, string[]>;
8
+ /**
9
+ * 操作符中文映射
10
+ */
11
+ export declare const OPERATOR_LABELS: Record<string, string>;
12
+ /**
13
+ * 不需要输入值的操作符
14
+ */
15
+ export declare const NO_VALUE_OPERATORS: string[];
16
+ /**
17
+ * 默认操作符
18
+ */
19
+ export declare const DEFAULT_OPERATORS: {
20
+ label: string;
21
+ code: string;
22
+ }[];
@@ -0,0 +1,41 @@
1
+ const OPERATOR_CATALOG = {
2
+ string: ["=", "!=", "like", "not like", "in", "not in"],
3
+ number: ["=", "!=", ">", ">=", "<", "<=", "in", "not in", "between"],
4
+ date: ["=", ">", ">=", "<", "<=", "between"],
5
+ boolean: ["is true", "is false", "is null", "is not null"],
6
+ nullable: ["is null", "is not null"],
7
+ json: ["contains", "not contains", "is null", "is not null"]
8
+ };
9
+ const OPERATOR_LABELS = {
10
+ // 通用
11
+ "=": "\u7B49\u4E8E",
12
+ "!=": "\u4E0D\u7B49\u4E8E",
13
+ ">": "\u5927\u4E8E",
14
+ ">=": "\u5927\u4E8E\u7B49\u4E8E",
15
+ "<": "\u5C0F\u4E8E",
16
+ "<=": "\u5C0F\u4E8E\u7B49\u4E8E",
17
+ like: "\u5305\u542B",
18
+ "not like": "\u4E0D\u5305\u542B",
19
+ in: "\u5C5E\u4E8E",
20
+ "not in": "\u4E0D\u5C5E\u4E8E",
21
+ between: "\u4ECB\u4E8E",
22
+ "is null": "\u4E3A\u7A7A",
23
+ "is not null": "\u4E0D\u4E3A\u7A7A",
24
+ // 布尔专用
25
+ "is true": "\u4E3A\u771F",
26
+ "is false": "\u4E3A\u5047",
27
+ // JSON 专用
28
+ contains: "\u5305\u542B\u952E\u503C",
29
+ "not contains": "\u4E0D\u5305\u542B\u952E\u503C"
30
+ };
31
+ const NO_VALUE_OPERATORS = [
32
+ "empty",
33
+ "not_empty",
34
+ "is null",
35
+ "is not null",
36
+ "is true",
37
+ "is false"
38
+ ];
39
+ const DEFAULT_OPERATORS = [{ label: OPERATOR_LABELS["="] || "=", code: "=" }];
40
+
41
+ export { DEFAULT_OPERATORS, NO_VALUE_OPERATORS, OPERATOR_CATALOG, OPERATOR_LABELS };
@@ -0,0 +1,85 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { OperatorOption, OrderByItem, FilterItem } from './type';
3
+ import { PlusColumn } from 'yc-pro-components/es/types/plus';
4
+
5
+ interface Props {
6
+ /** 列标签 */
7
+ label: string;
8
+ /** 列配置 */
9
+ column: PlusColumn;
10
+ /** 操作符列表 */
11
+ operators?: OperatorOption[];
12
+ /** 当前筛选状态 */
13
+ filters?: FilterItem[];
14
+ /** 当前排序状态 */
15
+ orderBy?: OrderByItem[];
16
+ /** 是否禁用筛选(仅显示排序) */
17
+ disableFilter?: boolean;
18
+ /** 自定义渲染 reference */
19
+ referenceRenderer?: () => unknown;
20
+ }
21
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
22
+ operators: () => never[];
23
+ filters: () => never[];
24
+ orderBy: () => never[];
25
+ disableFilter: boolean;
26
+ referenceRenderer: undefined;
27
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
28
+ reset: (payload: {
29
+ column: PlusColumn;
30
+ op: string;
31
+ }) => void;
32
+ confirm: (payload: {
33
+ column: PlusColumn;
34
+ op: string;
35
+ value?: string | undefined;
36
+ }) => void;
37
+ sortChange: (payload: {
38
+ field: string;
39
+ direction?: "desc" | "asc" | undefined;
40
+ }) => void;
41
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
42
+ operators: () => never[];
43
+ filters: () => never[];
44
+ orderBy: () => never[];
45
+ disableFilter: boolean;
46
+ referenceRenderer: undefined;
47
+ }>>> & {
48
+ onReset?: ((payload: {
49
+ column: PlusColumn;
50
+ op: string;
51
+ }) => any) | undefined;
52
+ onConfirm?: ((payload: {
53
+ column: PlusColumn;
54
+ op: string;
55
+ value?: string | undefined;
56
+ }) => any) | undefined;
57
+ onSortChange?: ((payload: {
58
+ field: string;
59
+ direction?: "desc" | "asc" | undefined;
60
+ }) => any) | undefined;
61
+ }, {
62
+ filters: FilterItem[];
63
+ orderBy: OrderByItem[];
64
+ operators: OperatorOption[];
65
+ disableFilter: boolean;
66
+ referenceRenderer: () => unknown;
67
+ }, {}>;
68
+ export default _default;
69
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
70
+ type __VLS_TypePropsToRuntimeProps<T> = {
71
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
72
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
73
+ } : {
74
+ type: PropType<T[K]>;
75
+ required: true;
76
+ };
77
+ };
78
+ type __VLS_WithDefaults<P, D> = {
79
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
80
+ default: D[K];
81
+ }> : P[K];
82
+ };
83
+ type __VLS_Prettify<T> = {
84
+ [K in keyof T]: T[K];
85
+ } & {};
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './header-filter-cell.vue2.mjs';
2
+ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
3
+
4
+ var YcTableHeaderFilterCellComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-87ce6807"], ["__file", "header-filter-cell.vue"]]);
5
+
6
+ export { YcTableHeaderFilterCellComponent as default };
@@ -0,0 +1,354 @@
1
+ import { defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, createCommentVNode, createElementVNode, withModifiers, createBlock, resolveDynamicComponent, Fragment, createTextVNode, toDisplayString, createVNode, unref, withCtx, renderList, normalizeStyle, h } from 'vue';
2
+ import { ElIcon, ElPopover, ElButton, ElTimePicker, ElTimeSelect, ElDatePicker, ElInput } from 'element-plus';
3
+ import { CaretTop, CaretBottom, Filter } from '@element-plus/icons-vue';
4
+ import { NO_VALUE_OPERATORS } from './constants.mjs';
5
+
6
+ const _hoisted_1 = {
7
+ class: "yc-header-filter-cell__sort",
8
+ style: {
9
+ display: "inline-flex",
10
+ flexDirection: "column",
11
+ alignItems: "center",
12
+ lineHeight: 1
13
+ }
14
+ };
15
+ const _hoisted_2 = {
16
+ class: "yc-header-filter-cell__content",
17
+ style: {
18
+ display: "flex",
19
+ flexDirection: "column",
20
+ padding: "8px",
21
+ minWidth: "180px",
22
+ gap: "6px"
23
+ }
24
+ };
25
+ const _hoisted_3 = { class: "yc-header-filter-cell__operators" };
26
+ const _hoisted_4 = ["onClick"];
27
+ const _hoisted_5 = { key: 0 };
28
+ const _hoisted_6 = {
29
+ class: "yc-header-filter-cell__actions",
30
+ style: {
31
+ display: "flex",
32
+ justifyContent: "space-between",
33
+ marginTop: "6px"
34
+ }
35
+ };
36
+ var _sfc_main = /* @__PURE__ */ defineComponent({
37
+ ...{
38
+ name: "YcTableHeaderFilterCell"
39
+ },
40
+ __name: "header-filter-cell",
41
+ props: {
42
+ label: {},
43
+ column: {},
44
+ operators: { default: () => [] },
45
+ filters: { default: () => [] },
46
+ orderBy: { default: () => [] },
47
+ disableFilter: { type: Boolean, default: false },
48
+ referenceRenderer: { type: Function, default: void 0 }
49
+ },
50
+ emits: ["confirm", "reset", "sortChange"],
51
+ setup(__props, { emit: __emit }) {
52
+ const props = __props;
53
+ const emit = __emit;
54
+ const state = reactive({
55
+ selectedOp: "=",
56
+ inputVal: ""
57
+ });
58
+ const popVisible = ref(false);
59
+ const wrapperElRef = ref(null);
60
+ const operatorsList = computed(() => props.operators);
61
+ watch(
62
+ operatorsList,
63
+ (list) => {
64
+ var _a;
65
+ const firstCode = (_a = list == null ? void 0 : list[0]) == null ? void 0 : _a.code;
66
+ if (!Array.isArray(list)) return;
67
+ if (!list.some((op) => op.code === state.selectedOp)) {
68
+ state.selectedOp = firstCode != null ? firstCode : "=";
69
+ }
70
+ },
71
+ { immediate: true }
72
+ );
73
+ const fieldRef = computed(() => {
74
+ var _a;
75
+ return String(((_a = props.column) == null ? void 0 : _a.prop) || "");
76
+ });
77
+ const isActive = computed(() => {
78
+ var _a, _b;
79
+ const field = fieldRef.value;
80
+ return (_b = (_a = props.filters) == null ? void 0 : _a.some((i) => String(i.field) === field)) != null ? _b : false;
81
+ });
82
+ const isAscActive = computed(
83
+ () => {
84
+ var _a;
85
+ return (_a = props.orderBy) == null ? void 0 : _a.some((i) => i.field === fieldRef.value && i.direction === "asc");
86
+ }
87
+ );
88
+ const isDescActive = computed(
89
+ () => {
90
+ var _a;
91
+ return (_a = props.orderBy) == null ? void 0 : _a.some((i) => i.field === fieldRef.value && i.direction === "desc");
92
+ }
93
+ );
94
+ const onDocPointerOrClick = (e) => {
95
+ if (!popVisible.value) return;
96
+ const target = e.target;
97
+ const wrapper = wrapperElRef.value;
98
+ if (target && ((wrapper == null ? void 0 : wrapper.contains(target)) || target.closest(".yc-header-filter-pop"))) return;
99
+ popVisible.value = false;
100
+ };
101
+ onMounted(() => {
102
+ window.addEventListener("pointerdown", onDocPointerOrClick, true);
103
+ window.addEventListener("click", onDocPointerOrClick, true);
104
+ });
105
+ onBeforeUnmount(() => {
106
+ window.removeEventListener("pointerdown", onDocPointerOrClick, true);
107
+ window.removeEventListener("click", onDocPointerOrClick, true);
108
+ });
109
+ const handleSelect = (op) => {
110
+ state.selectedOp = op.code;
111
+ };
112
+ const handleReset = () => {
113
+ state.inputVal = "";
114
+ emit("reset", { column: props.column, op: state.selectedOp });
115
+ popVisible.value = false;
116
+ };
117
+ const handleConfirm = () => {
118
+ emit("confirm", {
119
+ column: props.column,
120
+ op: state.selectedOp,
121
+ value: state.inputVal
122
+ });
123
+ popVisible.value = false;
124
+ };
125
+ const toggleAsc = () => {
126
+ const field = fieldRef.value;
127
+ emit("sortChange", { field, direction: isAscActive.value ? void 0 : "asc" });
128
+ };
129
+ const toggleDesc = () => {
130
+ const field = fieldRef.value;
131
+ emit("sortChange", { field, direction: isDescActive.value ? void 0 : "desc" });
132
+ };
133
+ const cycleSort = () => {
134
+ const field = fieldRef.value;
135
+ if (!field) return;
136
+ if (isDescActive.value) {
137
+ emit("sortChange", { field, direction: "asc" });
138
+ } else if (isAscActive.value) {
139
+ emit("sortChange", { field, direction: void 0 });
140
+ } else {
141
+ emit("sortChange", { field, direction: "desc" });
142
+ }
143
+ };
144
+ const needValueInput = computed(() => {
145
+ return !NO_VALUE_OPERATORS.includes(state.selectedOp);
146
+ });
147
+ const renderValueField = () => {
148
+ var _a, _b, _c, _d, _e;
149
+ if (!needValueInput.value) return null;
150
+ const vt = String(((_a = props.column) == null ? void 0 : _a.valueType) || "").toLowerCase();
151
+ const fp = ((_b = props.column) == null ? void 0 : _b.fieldProps) || {};
152
+ if (vt === "time-picker") {
153
+ return h(ElTimePicker, {
154
+ ...fp,
155
+ format: (_c = fp == null ? void 0 : fp.format) != null ? _c : "HH:mm:ss",
156
+ valueFormat: (_d = fp == null ? void 0 : fp.valueFormat) != null ? _d : "HH:mm:ss",
157
+ modelValue: state.inputVal,
158
+ "onUpdate:modelValue": (v) => state.inputVal = String(v != null ? v : ""),
159
+ style: "margin-top: 4px; width: 100%"
160
+ });
161
+ }
162
+ if (vt === "time-select") {
163
+ return h(ElTimeSelect, {
164
+ ...fp,
165
+ modelValue: state.inputVal,
166
+ "onUpdate:modelValue": (v) => {
167
+ const raw = String(v != null ? v : "");
168
+ const nv = raw && /^\d{2}:\d{2}$/.test(raw) ? `${raw}:00` : raw;
169
+ state.inputVal = nv;
170
+ },
171
+ style: "margin-top: 4px; width: 100%"
172
+ });
173
+ }
174
+ if (vt === "date-picker") {
175
+ return h(ElDatePicker, {
176
+ ...fp,
177
+ valueFormat: (_e = fp == null ? void 0 : fp.valueFormat) != null ? _e : "YYYY-MM-DD HH:mm:ss",
178
+ modelValue: state.inputVal,
179
+ "onUpdate:modelValue": (v) => {
180
+ const nv = Array.isArray(v) ? v.join(",") : String(v != null ? v : "");
181
+ state.inputVal = nv;
182
+ },
183
+ style: "margin-top: 4px; width: 100%"
184
+ });
185
+ }
186
+ return h(ElInput, {
187
+ modelValue: state.inputVal,
188
+ "onUpdate:modelValue": (v) => state.inputVal = v,
189
+ placeholder: "",
190
+ style: "margin-top: 4px; width: 100%"
191
+ });
192
+ };
193
+ return (_ctx, _cache) => {
194
+ return openBlock(), createElementBlock(
195
+ "div",
196
+ {
197
+ ref_key: "wrapperElRef",
198
+ ref: wrapperElRef,
199
+ class: "yc-header-filter-cell",
200
+ style: {
201
+ display: "inline-flex",
202
+ alignItems: "center",
203
+ gap: "6px",
204
+ cursor: "default"
205
+ }
206
+ },
207
+ [
208
+ createCommentVNode(" \u6807\u7B7E\u5185\u5BB9 "),
209
+ createElementVNode("span", {
210
+ class: "yc-header-filter-cell__label",
211
+ style: {
212
+ userSelect: "none",
213
+ cursor: "pointer"
214
+ },
215
+ onClick: withModifiers(cycleSort, ["stop"])
216
+ }, [
217
+ _ctx.referenceRenderer ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.referenceRenderer), { key: 0 })) : (openBlock(), createElementBlock(
218
+ Fragment,
219
+ { key: 1 },
220
+ [
221
+ createTextVNode(
222
+ toDisplayString(_ctx.label),
223
+ 1
224
+ /* TEXT */
225
+ )
226
+ ],
227
+ 64
228
+ /* STABLE_FRAGMENT */
229
+ ))
230
+ ]),
231
+ createCommentVNode(" \u6392\u5E8F\u56FE\u6807 "),
232
+ createElementVNode("span", _hoisted_1, [
233
+ createVNode(unref(ElIcon), {
234
+ size: 12,
235
+ color: isAscActive.value ? "var(--el-color-primary)" : "var(--el-text-color-secondary)",
236
+ style: { cursor: "pointer" },
237
+ onClick: withModifiers(toggleAsc, ["stop"])
238
+ }, {
239
+ default: withCtx(() => [
240
+ createVNode(unref(CaretTop))
241
+ ]),
242
+ _: 1
243
+ /* STABLE */
244
+ }, 8, ["color"]),
245
+ createVNode(unref(ElIcon), {
246
+ size: 12,
247
+ color: isDescActive.value ? "var(--el-color-primary)" : "var(--el-text-color-secondary)",
248
+ style: { cursor: "pointer", marginTop: "-5px" },
249
+ onClick: withModifiers(toggleDesc, ["stop"])
250
+ }, {
251
+ default: withCtx(() => [
252
+ createVNode(unref(CaretBottom))
253
+ ]),
254
+ _: 1
255
+ /* STABLE */
256
+ }, 8, ["color"])
257
+ ]),
258
+ createCommentVNode(" \u7B5B\u9009\u56FE\u6807\u548C\u5F39\u7A97 "),
259
+ !_ctx.disableFilter ? (openBlock(), createBlock(unref(ElPopover), {
260
+ key: 0,
261
+ trigger: "click",
262
+ placement: "bottom-start",
263
+ width: 220,
264
+ visible: popVisible.value,
265
+ "popper-class": "yc-header-filter-pop",
266
+ "popper-style": { zIndex: 4e3 }
267
+ }, {
268
+ reference: withCtx(() => [
269
+ createVNode(unref(ElIcon), {
270
+ size: 16,
271
+ color: isActive.value ? "var(--el-color-primary)" : "var(--el-text-color-secondary)",
272
+ style: { cursor: "pointer" },
273
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => popVisible.value = !popVisible.value, ["stop"]))
274
+ }, {
275
+ default: withCtx(() => [
276
+ createVNode(unref(Filter))
277
+ ]),
278
+ _: 1
279
+ /* STABLE */
280
+ }, 8, ["color"])
281
+ ]),
282
+ default: withCtx(() => [
283
+ createElementVNode("div", _hoisted_2, [
284
+ createCommentVNode(" \u64CD\u4F5C\u7B26\u5217\u8868 "),
285
+ createElementVNode("div", _hoisted_3, [
286
+ (openBlock(true), createElementBlock(
287
+ Fragment,
288
+ null,
289
+ renderList(operatorsList.value, (op) => {
290
+ return openBlock(), createElementBlock("div", {
291
+ key: op.code,
292
+ class: "yc-header-filter-cell__operator-item",
293
+ style: normalizeStyle({
294
+ display: "flex",
295
+ justifyContent: "space-between",
296
+ alignItems: "center",
297
+ padding: "6px 8px",
298
+ borderRadius: "4px",
299
+ background: state.selectedOp === op.code ? "var(--el-color-primary-light-9)" : "transparent",
300
+ color: state.selectedOp === op.code ? "var(--el-color-primary)" : "inherit",
301
+ cursor: "pointer"
302
+ }),
303
+ onClick: ($event) => handleSelect(op)
304
+ }, [
305
+ createElementVNode(
306
+ "span",
307
+ null,
308
+ toDisplayString(op.label),
309
+ 1
310
+ /* TEXT */
311
+ ),
312
+ state.selectedOp === op.code ? (openBlock(), createElementBlock("span", _hoisted_5, "\u2713")) : createCommentVNode("v-if", true)
313
+ ], 12, _hoisted_4);
314
+ }),
315
+ 128
316
+ /* KEYED_FRAGMENT */
317
+ ))
318
+ ]),
319
+ createCommentVNode(" \u503C\u8F93\u5165 "),
320
+ needValueInput.value ? (openBlock(), createBlock(resolveDynamicComponent(renderValueField), { key: 0 })) : createCommentVNode("v-if", true),
321
+ createCommentVNode(" \u64CD\u4F5C\u6309\u94AE "),
322
+ createElementVNode("div", _hoisted_6, [
323
+ createVNode(unref(ElButton), { onClick: handleReset }, {
324
+ default: withCtx(() => [
325
+ createTextVNode("\u91CD\u7F6E")
326
+ ]),
327
+ _: 1
328
+ /* STABLE */
329
+ }),
330
+ createVNode(unref(ElButton), {
331
+ type: "primary",
332
+ onClick: handleConfirm
333
+ }, {
334
+ default: withCtx(() => [
335
+ createTextVNode("\u786E\u5B9A")
336
+ ]),
337
+ _: 1
338
+ /* STABLE */
339
+ })
340
+ ])
341
+ ])
342
+ ]),
343
+ _: 1
344
+ /* STABLE */
345
+ }, 8, ["visible"])) : createCommentVNode("v-if", true)
346
+ ],
347
+ 512
348
+ /* NEED_PATCH */
349
+ );
350
+ };
351
+ }
352
+ });
353
+
354
+ export { _sfc_main as default };