xrk-components 2.0.0-beta.22 → 2.0.0-beta.24

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
@@ -19657,8 +19657,8 @@
19657
19657
  background-color: #f0f0f0;
19658
19658
  }
19659
19659
  .xrk-custom-image-viewer[data-v-35819562] {
19660
- width: 500px;
19661
- height: 500px;
19660
+ width: 100%;
19661
+ height: 100%;
19662
19662
  position: relative;
19663
19663
  overflow: hidden;
19664
19664
  }
package/lib/index.esm.js CHANGED
@@ -71088,7 +71088,8 @@ var __default__$A = {
71088
71088
  var script$C = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$A), { props: {
71089
71089
  btns: { type: null, required: true },
71090
71090
  maxLine: { type: Number, required: false, default: 1 },
71091
- trigger: { type: String, required: false, default: 'click' }
71091
+ trigger: { type: String, required: false, default: 'click' },
71092
+ maxCount: { type: Number, required: false }
71092
71093
  }, setup: function (__props) {
71093
71094
  var props = __props;
71094
71095
  var popoverRef = ref();
@@ -71097,6 +71098,16 @@ var script$C = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$A
71097
71098
  onMounted(function () {
71098
71099
  var _a, _b;
71099
71100
  var btns = (_a = btnsRef.value) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.xrk-button');
71101
+ var maxCount = props.maxCount;
71102
+ if (maxCount) {
71103
+ if (((btns === null || btns === void 0 ? void 0 : btns.length) || 0) > maxCount) {
71104
+ btns === null || btns === void 0 ? void 0 : btns.forEach(function (btn, index) {
71105
+ index >= maxCount && (btn.style.display = 'none');
71106
+ });
71107
+ showMore.value = true;
71108
+ }
71109
+ return;
71110
+ }
71100
71111
  btns === null || btns === void 0 ? void 0 : btns.forEach(function (btn) { return (btn.style.display = 'none'); });
71101
71112
  var heightMap = new Map();
71102
71113
  var heightSet = new Set();
@@ -71271,7 +71282,10 @@ var script$B = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$z
71271
71282
 
71272
71283
  script$B.__file = "packages/base/image/image.vue";
71273
71284
 
71274
- var _hoisted_1$f = { key: 0 };
71285
+ var _hoisted_1$f = {
71286
+ key: 0,
71287
+ style: { "width": "100%", "height": "100%" }
71288
+ };
71275
71289
  var _hoisted_2$8 = {
71276
71290
  key: 0,
71277
71291
  style: { "position": "absolute", "width": "100%", "height": "100%", "left": "0", "top": "0" }
package/lib/index.umd.js CHANGED
@@ -71091,7 +71091,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
71091
71091
  var script$C = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$A), { props: {
71092
71092
  btns: { type: null, required: true },
71093
71093
  maxLine: { type: Number, required: false, default: 1 },
71094
- trigger: { type: String, required: false, default: 'click' }
71094
+ trigger: { type: String, required: false, default: 'click' },
71095
+ maxCount: { type: Number, required: false }
71095
71096
  }, setup: function (__props) {
71096
71097
  var props = __props;
71097
71098
  var popoverRef = vue.ref();
@@ -71100,6 +71101,16 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
71100
71101
  vue.onMounted(function () {
71101
71102
  var _a, _b;
71102
71103
  var btns = (_a = btnsRef.value) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.xrk-button');
71104
+ var maxCount = props.maxCount;
71105
+ if (maxCount) {
71106
+ if (((btns === null || btns === void 0 ? void 0 : btns.length) || 0) > maxCount) {
71107
+ btns === null || btns === void 0 ? void 0 : btns.forEach(function (btn, index) {
71108
+ index >= maxCount && (btn.style.display = 'none');
71109
+ });
71110
+ showMore.value = true;
71111
+ }
71112
+ return;
71113
+ }
71103
71114
  btns === null || btns === void 0 ? void 0 : btns.forEach(function (btn) { return (btn.style.display = 'none'); });
71104
71115
  var heightMap = new Map();
71105
71116
  var heightSet = new Set();
@@ -71274,7 +71285,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
71274
71285
 
71275
71286
  script$B.__file = "packages/base/image/image.vue";
71276
71287
 
71277
- var _hoisted_1$f = { key: 0 };
71288
+ var _hoisted_1$f = {
71289
+ key: 0,
71290
+ style: { "width": "100%", "height": "100%" }
71291
+ };
71278
71292
  var _hoisted_2$8 = {
71279
71293
  key: 0,
71280
71294
  style: { "position": "absolute", "width": "100%", "height": "100%", "left": "0", "top": "0" }
@@ -20,6 +20,10 @@ export declare type BaseButtonProps = {
20
20
  onClick?: Function;
21
21
  };
22
22
  export declare type BaseButtonMoreProps = {
23
+ /**
24
+ * 超过指定按钮数量后就显示为更多 传入后,maxLine就失效
25
+ */
26
+ maxCount?: number;
23
27
  /**
24
28
  * 最多显示多少行
25
29
  */
@@ -13,6 +13,10 @@ declare const _default: import("vue").DefineComponent<{
13
13
  required: false;
14
14
  default: string;
15
15
  };
16
+ maxCount: {
17
+ type: NumberConstructor;
18
+ required: false;
19
+ };
16
20
  }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
17
21
  [key: string]: any;
18
22
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -30,6 +34,10 @@ declare const _default: import("vue").DefineComponent<{
30
34
  required: false;
31
35
  default: string;
32
36
  };
37
+ maxCount: {
38
+ type: NumberConstructor;
39
+ required: false;
40
+ };
33
41
  }>>, {
34
42
  maxLine: number;
35
43
  trigger: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrk-components",
3
- "version": "2.0.0-beta.22",
3
+ "version": "2.0.0-beta.24",
4
4
  "description": "",
5
5
  "main": "lib/index.esm.js",
6
6
  "typings": "lib/packages/index.d.ts",