yc-pro-components 0.0.64 → 0.0.66

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! yc-pro-components v0.0.64 */
1
+ /*! yc-pro-components v0.0.66 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus'], factory) :
@@ -18360,7 +18360,7 @@
18360
18360
  /* HOISTED */
18361
18361
  );
18362
18362
  const _hoisted_6$7 = { class: "plus-table-checkbox-checkAll" };
18363
- const _hoisted_7$6 = {
18363
+ const _hoisted_7$5 = {
18364
18364
  key: 0,
18365
18365
  class: "plus-table-checkbox-handle"
18366
18366
  };
@@ -18718,7 +18718,7 @@
18718
18718
  key: item.prop,
18719
18719
  class: "plus-table-checkbox-item"
18720
18720
  }, [
18721
- ((_a3 = columnSetting.value) == null ? void 0 : _a3.dragSort) !== false ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$6, [
18721
+ ((_a3 = columnSetting.value) == null ? void 0 : _a3.dragSort) !== false ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$5, [
18722
18722
  vue.renderSlot(_ctx.$slots, "drag-sort-icon", {}, () => [
18723
18723
  vue.createTextVNode("\u2637")
18724
18724
  ])
@@ -22051,7 +22051,7 @@
22051
22051
  );
22052
22052
  const _hoisted_5$8 = { class: "plus-header__right" };
22053
22053
  const _hoisted_6$6 = { class: "plus-header__dropdown-area" };
22054
- const _hoisted_7$5 = ["src"];
22054
+ const _hoisted_7$4 = ["src"];
22055
22055
  const _hoisted_8$3 = { class: "plus-header__username" };
22056
22056
  const _hoisted_9$3 = {
22057
22057
  key: 0,
@@ -22193,7 +22193,7 @@
22193
22193
  src: _ctx.userInfo.avatar,
22194
22194
  alt: "",
22195
22195
  class: "plus-header__avatar"
22196
- }, null, 8, _hoisted_7$5)) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
22196
+ }, null, 8, _hoisted_7$4)) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
22197
22197
  key: 1,
22198
22198
  size: 20,
22199
22199
  class: "plus-header__avatar"
@@ -32522,7 +32522,7 @@
32522
32522
  const showCheckAll = fp.showCheckAll !== false;
32523
32523
  const showInvert = fp.showInvert !== false;
32524
32524
  const checkAllText = fp.checkAllText || "\u5168\u9009";
32525
- return vue.h("div", { class: "header-filter-checkbox-group", style: "max-height: 250px; overflow-y: auto; padding: 4px;" }, [
32525
+ return vue.h("div", { class: "header-filter-checkbox-group", style: "max-height: 250px; overflow-y: auto;" }, [
32526
32526
  showCheckAll && options.length > 0 ? vue.h("div", { style: "display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--el-border-color-lighter);" }, [
32527
32527
  vue.h(elementPlus.ElCheckbox, {
32528
32528
  modelValue: checkAll,
@@ -32545,7 +32545,7 @@
32545
32545
  ...fp,
32546
32546
  modelValue: parsedValue,
32547
32547
  "onUpdate:modelValue": (v) => setInputVal(fromArrayValue(v)),
32548
- style: "display: flex; flex-direction: column;"
32548
+ style: "display: flex; flex-direction: column;gap:4px;"
32549
32549
  }, {
32550
32550
  default: () => options.map(
32551
32551
  (opt) => vue.h(
@@ -32635,24 +32635,16 @@
32635
32635
  style: {
32636
32636
  display: "flex",
32637
32637
  flexDirection: "column",
32638
- padding: "8px",
32639
32638
  minWidth: "180px",
32640
32639
  gap: "4px"
32641
32640
  }
32642
32641
  };
32643
32642
  const _hoisted_4$6 = {
32644
- class: "yc-header-filter-cell__actions",
32645
- style: {
32646
- display: "flex",
32647
- justifyContent: "flex-end"
32648
- }
32649
- };
32650
- const _hoisted_5$6 = {
32651
32643
  key: 0,
32652
32644
  class: "yc-header-filter-cell__operators"
32653
32645
  };
32654
- const _hoisted_6$5 = ["onClick"];
32655
- const _hoisted_7$4 = { key: 0 };
32646
+ const _hoisted_5$6 = ["onClick"];
32647
+ const _hoisted_6$5 = { key: 0 };
32656
32648
  var _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
32657
32649
  ...{
32658
32650
  name: "YcTableHeaderFilterCell"
@@ -32748,29 +32740,6 @@
32748
32740
  const handleSelect = (op) => {
32749
32741
  state.selectedOp = op.code;
32750
32742
  };
32751
- const handleReset = () => {
32752
- state.inputVal = "";
32753
- const payload = { column: props.column, op: state.selectedOp };
32754
- const customConfig = getHeaderFilterObject();
32755
- if (customConfig.onReset) {
32756
- customConfig.onReset(payload);
32757
- }
32758
- emit("reset", payload);
32759
- popVisible.value = false;
32760
- };
32761
- const handleConfirm = () => {
32762
- const payload = {
32763
- column: props.column,
32764
- op: state.selectedOp,
32765
- value: state.inputVal
32766
- };
32767
- const customConfig = getHeaderFilterObject();
32768
- if (customConfig.onConfirm) {
32769
- customConfig.onConfirm(payload);
32770
- }
32771
- emit("confirm", payload);
32772
- popVisible.value = false;
32773
- };
32774
32743
  const cycleSort = () => {
32775
32744
  const field = fieldRef.value;
32776
32745
  if (!field) return;
@@ -32836,19 +32805,31 @@
32836
32805
  return false;
32837
32806
  });
32838
32807
  const popoverWidth = vue.computed(() => hideOperatorList.value ? 320 : 220);
32839
- vue.watch(popVisible, (visible) => {
32808
+ vue.watch(popVisible, (visible, prevVisible) => {
32840
32809
  var _a, _b;
32841
- if (!visible) return;
32842
- const t = resolvedInteractionType.value;
32843
- const customConfig = getHeaderFilterObject();
32844
- const fp = {
32845
- ...fieldPropsForFilter.value,
32846
- ...customConfig.props || {}
32847
- };
32848
- if (t === "date-picker" && isRangeType(fp.type)) {
32849
- if (state.selectedOp !== "between") state.selectedOp = "between";
32850
- } else if (t === "checkbox" || t === "select" && ((_a = customConfig.props) == null ? void 0 : _a.multiple) || t === "tree-select" && ((_b = customConfig.props) == null ? void 0 : _b.multiple)) {
32851
- if (state.selectedOp !== "in") state.selectedOp = "in";
32810
+ if (visible) {
32811
+ const t = resolvedInteractionType.value;
32812
+ const customConfig = getHeaderFilterObject();
32813
+ const fp = {
32814
+ ...fieldPropsForFilter.value,
32815
+ ...customConfig.props || {}
32816
+ };
32817
+ if (t === "date-picker" && isRangeType(fp.type)) {
32818
+ if (state.selectedOp !== "between") state.selectedOp = "between";
32819
+ } else if (t === "checkbox" || t === "select" && ((_a = customConfig.props) == null ? void 0 : _a.multiple) || t === "tree-select" && ((_b = customConfig.props) == null ? void 0 : _b.multiple)) {
32820
+ if (state.selectedOp !== "in") state.selectedOp = "in";
32821
+ }
32822
+ } else if (prevVisible) {
32823
+ const payload = {
32824
+ column: props.column,
32825
+ op: state.selectedOp,
32826
+ value: state.inputVal
32827
+ };
32828
+ const customConfig = getHeaderFilterObject();
32829
+ if (customConfig.onConfirm) {
32830
+ customConfig.onConfirm(payload);
32831
+ }
32832
+ emit("confirm", payload);
32852
32833
  }
32853
32834
  });
32854
32835
  const renderValueField = () => {
@@ -33067,28 +33048,8 @@
33067
33048
  ]),
33068
33049
  default: vue.withCtx(() => [
33069
33050
  vue.createElementVNode("div", _hoisted_3$8, [
33070
- vue.createCommentVNode(" \u64CD\u4F5C\u6309\u94AE\uFF08\u7F6E\u9876\u53F3\u4FA7\uFF0C\u907F\u514D\u4E0B\u62C9\u9009\u62E9\u5668\u906E\u6321\uFF09 "),
33071
- vue.createElementVNode("div", _hoisted_4$6, [
33072
- vue.createVNode(vue.unref(elementPlus.ElButton), { onClick: handleReset }, {
33073
- default: vue.withCtx(() => [
33074
- vue.createTextVNode("\u91CD\u7F6E")
33075
- ]),
33076
- _: 1
33077
- /* STABLE */
33078
- }),
33079
- vue.createVNode(vue.unref(elementPlus.ElButton), {
33080
- type: "primary",
33081
- onClick: handleConfirm
33082
- }, {
33083
- default: vue.withCtx(() => [
33084
- vue.createTextVNode("\u786E\u5B9A")
33085
- ]),
33086
- _: 1
33087
- /* STABLE */
33088
- })
33089
- ]),
33090
33051
  vue.createCommentVNode(" \u64CD\u4F5C\u7B26\u5217\u8868\uFF08\u591A\u9009/\u65E5\u671F\u533A\u95F4\u7B49\u7531 hideOperatorList \u9690\u85CF\uFF0C\u9ED8\u8BA4 in / between\uFF09 "),
33091
- !hideOperatorList.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$6, [
33052
+ !hideOperatorList.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$6, [
33092
33053
  (vue.openBlock(true), vue.createElementBlock(
33093
33054
  vue.Fragment,
33094
33055
  null,
@@ -33115,8 +33076,8 @@
33115
33076
  1
33116
33077
  /* TEXT */
33117
33078
  ),
33118
- state.selectedOp === op.code ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$4, "\u2713")) : vue.createCommentVNode("v-if", true)
33119
- ], 12, _hoisted_6$5);
33079
+ state.selectedOp === op.code ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$5, "\u2713")) : vue.createCommentVNode("v-if", true)
33080
+ ], 12, _hoisted_5$6);
33120
33081
  }),
33121
33082
  128
33122
33083
  /* KEYED_FRAGMENT */
@@ -33137,7 +33098,7 @@
33137
33098
  }
33138
33099
  });
33139
33100
 
33140
- var YcTableHeaderFilterCellComponent = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-218b6c5c"], ["__file", "header-filter-cell.vue"]]);
33101
+ var YcTableHeaderFilterCellComponent = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ce1588fc"], ["__file", "header-filter-cell.vue"]]);
33141
33102
 
33142
33103
  const DEFAULT_PAGE_SIZE = 20;
33143
33104
  const COLUMN_CACHE_PREFIX = "yc-column-settings:";
package/index.min.css CHANGED
@@ -1,6 +1,6 @@
1
1
  .plus-virtual-table{display:flex;flex-direction:column;height:100%;min-height:0;width:100%}.plus-virtual-table__title-bar{justify-content:space-between;padding:12px 0}.plus-virtual-table__title-bar,.plus-virtual-table__title-bar__left{align-items:center;display:flex}.plus-virtual-table__title-bar__right{align-items:center;display:flex;gap:8px}.plus-virtual-table__title-bar__text{font-size:16px;font-weight:500}.plus-virtual-table__title-bar__refresh{color:#606266;cursor:pointer;transition:color .2s}.plus-virtual-table__title-bar__refresh:hover{color:var(--el-color-primary)}.plus-virtual-table__body{flex:1;max-height:calc(100vh - 280px);min-height:0;overflow:hidden}.plus-virtual-table__header,.plus-virtual-table__header .el-table-v2__header-cell{background-color:var(--el-fill-color-light)!important}.plus-virtual-table__pagination{padding:12px 0}.plus-virtual-table-action-bar{align-items:center;display:flex;gap:4px;justify-content:center}.plus-table-column-status{align-items:center;display:inline-flex;gap:6px}.plus-table-column-status__dot{border-radius:50%;display:inline-block;height:8px;width:8px}.plus-table-column-empty{color:#c0c4cc}.plus-virtual-table--striped .plus-virtual-table__row--striped .el-table-v2__row-cell{background-color:var(--el-fill-color-lighter,#fafafa)}.plus-virtual-table--border .plus-virtual-table__body{border:1px solid var(--el-border-color-lighter,#ebeef5)}.plus-virtual-table--border .el-table-v2__header-cell,.plus-virtual-table--border .el-table-v2__row-cell{border-right:1px solid var(--el-border-color-lighter,#ebeef5)}.plus-virtual-table--border .el-table-v2__header-cell:last-child,.plus-virtual-table--border .el-table-v2__row-cell:last-child{border-right:none}.plus-virtual-table--border .el-table-v2__header-row,.plus-virtual-table--border .el-table-v2__row{border-bottom:1px solid var(--el-border-color-lighter,#ebeef5)}
2
2
  .yc-svg-icon[data-v-34e1f2f7]{display:inline-block;-webkit-mask-size:contain;mask-size:contain;vertical-align:middle}.yc-svg-icon--original[data-v-34e1f2f7]{-o-object-fit:contain;object-fit:contain}
3
- .yc-header-filter-cell[data-v-218b6c5c]{width:100%}.yc-header-filter-cell__label--ellipsis[data-v-218b6c5c]{flex:1 1 0;min-width:0;overflow:hidden}.yc-header-filter-cell__label--ellipsis[data-v-218b6c5c] .yc-header-filter-cell__label-text[data-v-218b6c5c]{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.yc-header-filter-cell__label--active[data-v-218b6c5c]{color:var(--el-color-primary)}[data-v-218b6c5c] .yc-header-filter-cell__sort-icon--asc,[data-v-218b6c5c] .yc-header-filter-cell__sort-icon--desc{background-color:var(--el-color-primary)!important}[data-v-218b6c5c] .yc-header-filter-cell__filter-icon--active{background-color:var(--el-color-primary)!important}
3
+ .yc-header-filter-cell[data-v-ce1588fc]{width:100%}.yc-header-filter-cell__label--ellipsis[data-v-ce1588fc]{flex:1 1 0;min-width:0;overflow:hidden}.yc-header-filter-cell__label--ellipsis[data-v-ce1588fc] .yc-header-filter-cell__label-text[data-v-ce1588fc]{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.yc-header-filter-cell__label--active[data-v-ce1588fc]{color:var(--el-color-primary)}[data-v-ce1588fc] .yc-header-filter-cell__sort-icon--asc,[data-v-ce1588fc] .yc-header-filter-cell__sort-icon--desc{background-color:var(--el-color-primary)!important}[data-v-ce1588fc] .yc-header-filter-cell__filter-icon--active{background-color:var(--el-color-primary)!important}
4
4
  .yc-header-filter-inner-dropdown{z-index:4100!important}
5
5
  .yc-plus-page[data-v-53b16de1]{height:100%}.yc-plus-page[data-v-53b16de1] [data-v-53b16de1] .plus-page>.el-card{border-radius:8px}[data-v-53b16de1] .yc-search-card-body{padding-right:0}[data-v-53b16de1] .plus-table-title-bar__toolbar__icon{font-size:16px!important;position:relative;top:-2px}.column-settings-wrapper[data-v-53b16de1]{align-items:center;cursor:pointer;display:flex;gap:4px;margin-left:8px}.column-settings-text[data-v-53b16de1]{font-size:14px}
6
6
  .yc-select-v2-loading.el-select-dropdown__item{color:#909399;cursor:default;font-size:13px;pointer-events:none;text-align:center}.yc-select-v2-loading.el-select-dropdown__item.is-disabled{color:#909399;cursor:default}