xrk-components 2.0.0-beta.96 → 2.0.0-beta.97

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/lib/index.css CHANGED
@@ -19811,7 +19811,7 @@
19811
19811
  }
19812
19812
  .xrk-search[data-v-a1781a06] > .xrk-form {
19813
19813
  display: grid;
19814
- grid-template-columns: repeat(4, 1fr);
19814
+ grid-template-columns: repeat(var(--column-num), 1fr);
19815
19815
  gap: 10px 16px;
19816
19816
  }
19817
19817
  .xrk-search[data-v-a1781a06] > .xrk-form .xrk-form-item {
@@ -19852,15 +19852,32 @@
19852
19852
  -webkit-align-items: center;
19853
19853
  -ms-flex-align: center;
19854
19854
  align-items: center;
19855
- -webkit-box-pack: justify;
19856
- -webkit-justify-content: space-between;
19857
- -ms-flex-pack: justify;
19858
- justify-content: space-between;
19855
+ gap: 12px;
19859
19856
  }
19860
- .xrk-search .btn-group .btn-group-left[data-v-a1781a06] {
19861
- -webkit-flex-shrink: 0;
19862
- -ms-flex-negative: 0;
19863
- flex-shrink: 0;
19857
+ .xrk-search.xrk-search-line[data-v-a1781a06] {
19858
+ display: -webkit-box;
19859
+ display: -webkit-flex;
19860
+ display: -ms-flexbox;
19861
+ display: flex;
19862
+ -webkit-flex-wrap: wrap;
19863
+ -ms-flex-wrap: wrap;
19864
+ flex-wrap: wrap;
19865
+ }
19866
+ .xrk-search.xrk-search-line[data-v-a1781a06] > .xrk-form {
19867
+ width: calc(var(--column-len) / var(--column-num) * 100%);
19868
+ grid-template-columns: repeat(var(--column-len), 1fr);
19869
+ margin-right: 16px;
19870
+ }
19871
+ .xrk-search.xrk-search-line .btn-group[data-v-a1781a06] {
19872
+ min-width: calc((var(--column-num) - var(--column-len)) / var(--column-num) * 100% - 16px);
19873
+ -webkit-box-align: end;
19874
+ -webkit-align-items: flex-end;
19875
+ -ms-flex-align: end;
19876
+ align-items: flex-end;
19877
+ -webkit-box-pack: end;
19878
+ -webkit-justify-content: flex-end;
19879
+ -ms-flex-pack: end;
19880
+ justify-content: flex-end;
19864
19881
  }
19865
19882
  .base_text_title {
19866
19883
  min-height: var(--base-text-title-min-height, 54px);
package/lib/index.esm.js CHANGED
@@ -74249,9 +74249,9 @@ var script$k = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$i
74249
74249
  script$k.__scopeId = "data-v-17eda5db";
74250
74250
  script$k.__file = "packages/base/form/form-item.vue";
74251
74251
 
74252
- var _hoisted_1$c = { class: "xrk-search" };
74253
- var _hoisted_2$8 = { class: "btn-group" };
74254
- var _hoisted_3$8 = { class: "btn-group-left" };
74252
+ var _hoisted_1$c = { class: "btn-group" };
74253
+ var _hoisted_2$8 = { class: "btn-group-left" };
74254
+ var _hoisted_3$8 = { class: "btn-group-right" };
74255
74255
  var __default__$h = {
74256
74256
  name: 'xrk-search'
74257
74257
  };
@@ -74277,6 +74277,11 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
74277
74277
  var searchFormRef = ref();
74278
74278
  var searchBtn = computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
74279
74279
  var resetBtn = computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
74280
+ var columnNum = ref(5);
74281
+ var searchStyle = ref({
74282
+ '--column-num': columnNum.value,
74283
+ '--column-len': props.columns.length
74284
+ });
74280
74285
  var isExpand = ref(false);
74281
74286
  var getCurrentColumns = computed(function () {
74282
74287
  var _a;
@@ -74284,7 +74289,7 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
74284
74289
  return props === null || props === void 0 ? void 0 : props.columns;
74285
74290
  }
74286
74291
  else {
74287
- return (_a = props === null || props === void 0 ? void 0 : props.columns) === null || _a === void 0 ? void 0 : _a.slice(0, 8);
74292
+ return (_a = props === null || props === void 0 ? void 0 : props.columns) === null || _a === void 0 ? void 0 : _a.slice(0, columnNum.value * 2);
74288
74293
  }
74289
74294
  });
74290
74295
  var _getPleaseText = function (type) {
@@ -74420,8 +74425,13 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
74420
74425
  handleResetClick: handleResetClick
74421
74426
  });
74422
74427
  return function (_ctx, _cache) {
74423
- var _a;
74424
- return (openBlock(), createElementBlock("div", _hoisted_1$c, [
74428
+ var _a, _b;
74429
+ return (openBlock(), createElementBlock("div", {
74430
+ class: normalizeClass(["xrk-search", {
74431
+ 'xrk-search-line': ((_a = __props.columns) === null || _a === void 0 ? void 0 : _a.length) < columnNum.value
74432
+ }]),
74433
+ style: normalizeStyle(searchStyle.value)
74434
+ }, [
74425
74435
  createVNode(script$b, {
74426
74436
  model: searchValue,
74427
74437
  ref_key: "searchFormRef",
@@ -74456,8 +74466,8 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
74456
74466
  ]; }),
74457
74467
  _: 1 /* STABLE */
74458
74468
  }, 8 /* PROPS */, ["model"]),
74459
- createElementVNode("div", _hoisted_2$8, [
74460
- createElementVNode("div", _hoisted_3$8, [
74469
+ createElementVNode("div", _hoisted_1$c, [
74470
+ createElementVNode("div", _hoisted_2$8, [
74461
74471
  (unref(searchBtn).show)
74462
74472
  ? (openBlock(), createBlock(script$F, {
74463
74473
  key: 0,
@@ -74483,7 +74493,7 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
74483
74493
  _: 1 /* STABLE */
74484
74494
  }))
74485
74495
  : createCommentVNode("v-if", true),
74486
- (__props.columns && ((_a = __props.columns) === null || _a === void 0 ? void 0 : _a.length) >= 8)
74496
+ (__props.columns && ((_b = __props.columns) === null || _b === void 0 ? void 0 : _b.length) > columnNum.value * 2)
74487
74497
  ? (openBlock(), createBlock(script$F, {
74488
74498
  key: 2,
74489
74499
  type: "default",
@@ -74507,15 +74517,17 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
74507
74517
  }))
74508
74518
  : createCommentVNode("v-if", true)
74509
74519
  ]),
74510
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.otherComponents, function (_a, index) {
74511
- var render = _a.render;
74512
- return (openBlock(), createBlock(unref(BaseSearchRender), {
74513
- render: render,
74514
- key: index
74515
- }, null, 8 /* PROPS */, ["render"]));
74516
- }), 128 /* KEYED_FRAGMENT */))
74520
+ createElementVNode("div", _hoisted_3$8, [
74521
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.otherComponents, function (_a, index) {
74522
+ var render = _a.render;
74523
+ return (openBlock(), createBlock(unref(BaseSearchRender), {
74524
+ render: render,
74525
+ key: index
74526
+ }, null, 8 /* PROPS */, ["render"]));
74527
+ }), 128 /* KEYED_FRAGMENT */))
74528
+ ])
74517
74529
  ])
74518
- ]));
74530
+ ], 6 /* CLASS, STYLE */));
74519
74531
  };
74520
74532
  } }));
74521
74533
 
@@ -76464,7 +76476,7 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
76464
76476
  var _selectionAllLoading = ref(false);
76465
76477
  var _selectionRowLoading = ref(false);
76466
76478
  var getAlign = computed(function () {
76467
- if (props === null || props === void 0 ? void 0 : props.isBothEnds)
76479
+ if ((props === null || props === void 0 ? void 0 : props.isBothEnds) || (props === null || props === void 0 ? void 0 : props.type))
76468
76480
  return (props === null || props === void 0 ? void 0 : props.align) || 'center';
76469
76481
  return (props === null || props === void 0 ? void 0 : props.align) || 'left';
76470
76482
  });
@@ -77830,7 +77842,7 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
77830
77842
  clearSearchValues: function () { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.clearSearchValues) === null || _b === void 0 ? void 0 : _b.call(_a); },
77831
77843
  setSearchValue: function (key, value) { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.setSearchValue) === null || _b === void 0 ? void 0 : _b.call(_a, key, value); },
77832
77844
  getSearchValue: function () { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.getSearchValue) === null || _b === void 0 ? void 0 : _b.call(_a); },
77833
- initCurrentList: function (customQuery) { return __awaiter(_this, void 0, void 0, function () {
77845
+ initCurrentList: function (customQuery, config) { return __awaiter(_this, void 0, void 0, function () {
77834
77846
  return __generator(this, function (_a) {
77835
77847
  switch (_a.label) {
77836
77848
  case 0:
@@ -77838,8 +77850,12 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
77838
77850
  return [4 /*yield*/, (getList === null || getList === void 0 ? void 0 : getList(__assign(__assign({}, (customQuery || {})), query.value)))];
77839
77851
  case 1:
77840
77852
  _a.sent();
77841
- tableToTop();
77842
- checkTableNeedScroll();
77853
+ if (!(config === null || config === void 0 ? void 0 : config.noChange)) {
77854
+ if (!(config === null || config === void 0 ? void 0 : config.noToTop))
77855
+ tableToTop();
77856
+ if (!(config === null || config === void 0 ? void 0 : config.noScroll))
77857
+ checkTableNeedScroll();
77858
+ }
77843
77859
  return [2 /*return*/];
77844
77860
  }
77845
77861
  });
package/lib/index.umd.js CHANGED
@@ -74252,9 +74252,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74252
74252
  script$k.__scopeId = "data-v-17eda5db";
74253
74253
  script$k.__file = "packages/base/form/form-item.vue";
74254
74254
 
74255
- var _hoisted_1$c = { class: "xrk-search" };
74256
- var _hoisted_2$8 = { class: "btn-group" };
74257
- var _hoisted_3$8 = { class: "btn-group-left" };
74255
+ var _hoisted_1$c = { class: "btn-group" };
74256
+ var _hoisted_2$8 = { class: "btn-group-left" };
74257
+ var _hoisted_3$8 = { class: "btn-group-right" };
74258
74258
  var __default__$h = {
74259
74259
  name: 'xrk-search'
74260
74260
  };
@@ -74280,6 +74280,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74280
74280
  var searchFormRef = vue.ref();
74281
74281
  var searchBtn = vue.computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
74282
74282
  var resetBtn = vue.computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
74283
+ var columnNum = vue.ref(5);
74284
+ var searchStyle = vue.ref({
74285
+ '--column-num': columnNum.value,
74286
+ '--column-len': props.columns.length
74287
+ });
74283
74288
  var isExpand = vue.ref(false);
74284
74289
  var getCurrentColumns = vue.computed(function () {
74285
74290
  var _a;
@@ -74287,7 +74292,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74287
74292
  return props === null || props === void 0 ? void 0 : props.columns;
74288
74293
  }
74289
74294
  else {
74290
- return (_a = props === null || props === void 0 ? void 0 : props.columns) === null || _a === void 0 ? void 0 : _a.slice(0, 8);
74295
+ return (_a = props === null || props === void 0 ? void 0 : props.columns) === null || _a === void 0 ? void 0 : _a.slice(0, columnNum.value * 2);
74291
74296
  }
74292
74297
  });
74293
74298
  var _getPleaseText = function (type) {
@@ -74423,8 +74428,13 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74423
74428
  handleResetClick: handleResetClick
74424
74429
  });
74425
74430
  return function (_ctx, _cache) {
74426
- var _a;
74427
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
74431
+ var _a, _b;
74432
+ return (vue.openBlock(), vue.createElementBlock("div", {
74433
+ class: vue.normalizeClass(["xrk-search", {
74434
+ 'xrk-search-line': ((_a = __props.columns) === null || _a === void 0 ? void 0 : _a.length) < columnNum.value
74435
+ }]),
74436
+ style: vue.normalizeStyle(searchStyle.value)
74437
+ }, [
74428
74438
  vue.createVNode(script$b, {
74429
74439
  model: searchValue,
74430
74440
  ref_key: "searchFormRef",
@@ -74459,8 +74469,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74459
74469
  ]; }),
74460
74470
  _: 1 /* STABLE */
74461
74471
  }, 8 /* PROPS */, ["model"]),
74462
- vue.createElementVNode("div", _hoisted_2$8, [
74463
- vue.createElementVNode("div", _hoisted_3$8, [
74472
+ vue.createElementVNode("div", _hoisted_1$c, [
74473
+ vue.createElementVNode("div", _hoisted_2$8, [
74464
74474
  (vue.unref(searchBtn).show)
74465
74475
  ? (vue.openBlock(), vue.createBlock(script$F, {
74466
74476
  key: 0,
@@ -74486,7 +74496,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74486
74496
  _: 1 /* STABLE */
74487
74497
  }))
74488
74498
  : vue.createCommentVNode("v-if", true),
74489
- (__props.columns && ((_a = __props.columns) === null || _a === void 0 ? void 0 : _a.length) >= 8)
74499
+ (__props.columns && ((_b = __props.columns) === null || _b === void 0 ? void 0 : _b.length) > columnNum.value * 2)
74490
74500
  ? (vue.openBlock(), vue.createBlock(script$F, {
74491
74501
  key: 2,
74492
74502
  type: "default",
@@ -74510,15 +74520,17 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74510
74520
  }))
74511
74521
  : vue.createCommentVNode("v-if", true)
74512
74522
  ]),
74513
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.otherComponents, function (_a, index) {
74514
- var render = _a.render;
74515
- return (vue.openBlock(), vue.createBlock(vue.unref(BaseSearchRender), {
74516
- render: render,
74517
- key: index
74518
- }, null, 8 /* PROPS */, ["render"]));
74519
- }), 128 /* KEYED_FRAGMENT */))
74523
+ vue.createElementVNode("div", _hoisted_3$8, [
74524
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.otherComponents, function (_a, index) {
74525
+ var render = _a.render;
74526
+ return (vue.openBlock(), vue.createBlock(vue.unref(BaseSearchRender), {
74527
+ render: render,
74528
+ key: index
74529
+ }, null, 8 /* PROPS */, ["render"]));
74530
+ }), 128 /* KEYED_FRAGMENT */))
74531
+ ])
74520
74532
  ])
74521
- ]));
74533
+ ], 6 /* CLASS, STYLE */));
74522
74534
  };
74523
74535
  } }));
74524
74536
 
@@ -76467,7 +76479,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
76467
76479
  var _selectionAllLoading = vue.ref(false);
76468
76480
  var _selectionRowLoading = vue.ref(false);
76469
76481
  var getAlign = vue.computed(function () {
76470
- if (props === null || props === void 0 ? void 0 : props.isBothEnds)
76482
+ if ((props === null || props === void 0 ? void 0 : props.isBothEnds) || (props === null || props === void 0 ? void 0 : props.type))
76471
76483
  return (props === null || props === void 0 ? void 0 : props.align) || 'center';
76472
76484
  return (props === null || props === void 0 ? void 0 : props.align) || 'left';
76473
76485
  });
@@ -77833,7 +77845,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
77833
77845
  clearSearchValues: function () { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.clearSearchValues) === null || _b === void 0 ? void 0 : _b.call(_a); },
77834
77846
  setSearchValue: function (key, value) { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.setSearchValue) === null || _b === void 0 ? void 0 : _b.call(_a, key, value); },
77835
77847
  getSearchValue: function () { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.getSearchValue) === null || _b === void 0 ? void 0 : _b.call(_a); },
77836
- initCurrentList: function (customQuery) { return __awaiter(_this, void 0, void 0, function () {
77848
+ initCurrentList: function (customQuery, config) { return __awaiter(_this, void 0, void 0, function () {
77837
77849
  return __generator(this, function (_a) {
77838
77850
  switch (_a.label) {
77839
77851
  case 0:
@@ -77841,8 +77853,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
77841
77853
  return [4 /*yield*/, (getList === null || getList === void 0 ? void 0 : getList(__assign(__assign({}, (customQuery || {})), query.value)))];
77842
77854
  case 1:
77843
77855
  _a.sent();
77844
- tableToTop();
77845
- checkTableNeedScroll();
77856
+ if (!(config === null || config === void 0 ? void 0 : config.noChange)) {
77857
+ if (!(config === null || config === void 0 ? void 0 : config.noToTop))
77858
+ tableToTop();
77859
+ if (!(config === null || config === void 0 ? void 0 : config.noScroll))
77860
+ checkTableNeedScroll();
77861
+ }
77846
77862
  return [2 /*return*/];
77847
77863
  }
77848
77864
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrk-components",
3
- "version": "2.0.0-beta.96",
3
+ "version": "2.0.0-beta.97",
4
4
  "description": "",
5
5
  "main": "lib/index.esm.js",
6
6
  "typings": "lib/packages/index.d.ts",