@ctzy-web-client/plugin-component-vue 1.0.33 → 1.0.35

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.
@@ -1,5 +1,5 @@
1
1
  import { ref, reactive, createApp, onMounted, withDirectives, h, unref, vShow, nextTick, onBeforeUnmount } from 'vue';
2
- import { useWindowSize, useElementBounding } from '../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/core/index.mjs';
2
+ import { useWindowSize, useElementBounding } from '../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/core/index.mjs';
3
3
  import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
4
4
  import Contextmenu from './contextmenu.mjs';
5
5
 
@@ -1,4 +1,4 @@
1
- import { defineComponent, useAttrs, ref, computed, unref, watch, provide, reactive, nextTick, onUnmounted, openBlock, createElementBlock, normalizeClass, renderSlot, createVNode, mergeProps, withCtx, createBlock, createElementVNode, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString, normalizeStyle } from 'vue';
1
+ import { defineComponent, useAttrs, ref, computed, unref, watch, provide, reactive, nextTick, onUnmounted, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createVNode, mergeProps, withCtx, createBlock, createElementVNode, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
2
2
  import { ElMessage, ElTable, ElTableColumn, ElPagination } from 'element-plus';
3
3
  import { useService, useGlobalConfig, dataTableKey, useNamespace, useEventDispatcher } from '@ctzy-web-client/web-base-client-vue';
4
4
  import DynamicComponent from './dynamic-component.mjs';
@@ -28,6 +28,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
28
28
  type: Boolean,
29
29
  default: true
30
30
  },
31
+ height: {
32
+ type: [String, Number],
33
+ default: "auto"
34
+ },
31
35
  showIndex: {
32
36
  type: Boolean,
33
37
  default: false
@@ -252,12 +256,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
252
256
  return openBlock(), createElementBlock("div", {
253
257
  class: normalizeClass(unref(ns).b()),
254
258
  ref_key: "dataTableEl",
255
- ref: dataTableEl
259
+ ref: dataTableEl,
260
+ style: normalizeStyle({
261
+ display: __props.height === "auto" ? "flex" : "block",
262
+ flexDirection: __props.height === "auto" ? "column" : "unset"
263
+ })
256
264
  }, [
257
265
  renderSlot(_ctx.$slots, "default", { dataTable: unref(dataTable) }, () => [
258
266
  createVNode(unref(ElTable), mergeProps({
259
267
  class: "content",
260
- height: "100%",
268
+ height: __props.height,
261
269
  ref_key: "elTable",
262
270
  ref: elTable,
263
271
  data: data.value,
@@ -342,7 +350,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
342
350
  renderSlot(_ctx.$slots, "column-append")
343
351
  ]),
344
352
  _: 3
345
- }, 16, ["data", "row-key", "onSelectionChange", "border"])
353
+ }, 16, ["height", "data", "row-key", "onSelectionChange", "border"])
346
354
  ]),
347
355
  __props.showPagination ? (openBlock(), createElementBlock("div", {
348
356
  key: 0,
@@ -372,7 +380,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
372
380
  height: unref(barRectangle).height + "px"
373
381
  })
374
382
  }, null, 6)) : createCommentVNode("v-if", true)
375
- ], 2);
383
+ ], 6);
376
384
  };
377
385
  }
378
386
  });
@@ -1,4 +1,4 @@
1
- import { useMouse, useElementBounding } from '../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/core/index.mjs';
1
+ import { useMouse, useElementBounding } from '../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/core/index.mjs';
2
2
  import { getCurrentInstance, ref, computed, unref } from 'vue';
3
3
 
4
4
  // Inject __name helper
@@ -1,5 +1,5 @@
1
- import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch as watchPausable, createEventHook, timestamp, pausableFilter, ignorableWatch as watchIgnorable, debounceFilter, bypassFilter, createFilterWrapper, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isNumber, isObject, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '../../../../@vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/shared/index.mjs';
2
- export { __onlyVue27Plus, __onlyVue3, assert, autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, pausableWatch, promiseTimeout, rand, createReactiveFn as reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, autoResetRef as refAutoReset, debouncedRef as refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, debouncedRef as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, debouncedWatch as watchDebounced, ignorableWatch as watchIgnorable, watchOnce, pausableWatch as watchPausable, throttledWatch as watchThrottled, watchTriggerable, watchWithFilter, whenever } from '../../../../@vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/shared/index.mjs';
1
+ import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch as watchPausable, createEventHook, timestamp, pausableFilter, ignorableWatch as watchIgnorable, debounceFilter, bypassFilter, createFilterWrapper, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isNumber, isObject, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '../../../../@vueuse_shared@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/shared/index.mjs';
2
+ export { __onlyVue27Plus, __onlyVue3, assert, autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, pausableWatch, promiseTimeout, rand, createReactiveFn as reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, autoResetRef as refAutoReset, debouncedRef as refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, debouncedRef as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, debouncedWatch as watchDebounced, ignorableWatch as watchIgnorable, watchOnce, pausableWatch as watchPausable, throttledWatch as watchThrottled, watchTriggerable, watchWithFilter, whenever } from '../../../../@vueuse_shared@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/shared/index.mjs';
3
3
  import { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, set, del, isVue2, isReadonly, onBeforeUpdate } from 'vue-demi';
4
4
 
5
5
  // Inject __name helper
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var index = require('../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/core/index.js');
6
+ var index = require('../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/core/index.js');
7
7
  var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
8
8
  var contextmenu = require('./contextmenu.js');
9
9
 
@@ -32,6 +32,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
32
32
  type: Boolean,
33
33
  default: true
34
34
  },
35
+ height: {
36
+ type: [String, Number],
37
+ default: "auto"
38
+ },
35
39
  showIndex: {
36
40
  type: Boolean,
37
41
  default: false
@@ -256,12 +260,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
256
260
  return vue.openBlock(), vue.createElementBlock("div", {
257
261
  class: vue.normalizeClass(vue.unref(ns).b()),
258
262
  ref_key: "dataTableEl",
259
- ref: dataTableEl
263
+ ref: dataTableEl,
264
+ style: vue.normalizeStyle({
265
+ display: __props.height === "auto" ? "flex" : "block",
266
+ flexDirection: __props.height === "auto" ? "column" : "unset"
267
+ })
260
268
  }, [
261
269
  vue.renderSlot(_ctx.$slots, "default", { dataTable: vue.unref(dataTable) }, () => [
262
270
  vue.createVNode(vue.unref(ElementPlus.ElTable), vue.mergeProps({
263
271
  class: "content",
264
- height: "100%",
272
+ height: __props.height,
265
273
  ref_key: "elTable",
266
274
  ref: elTable,
267
275
  data: data.value,
@@ -346,7 +354,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
346
354
  vue.renderSlot(_ctx.$slots, "column-append")
347
355
  ]),
348
356
  _: 3
349
- }, 16, ["data", "row-key", "onSelectionChange", "border"])
357
+ }, 16, ["height", "data", "row-key", "onSelectionChange", "border"])
350
358
  ]),
351
359
  __props.showPagination ? (vue.openBlock(), vue.createElementBlock("div", {
352
360
  key: 0,
@@ -376,7 +384,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
376
384
  height: vue.unref(barRectangle).height + "px"
377
385
  })
378
386
  }, null, 6)) : vue.createCommentVNode("v-if", true)
379
- ], 2);
387
+ ], 6);
380
388
  };
381
389
  }
382
390
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/core/index.js');
5
+ var index = require('../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/core/index.js');
6
6
  var vue = require('vue');
7
7
 
8
8
  // Inject __name helper
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../../../@vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/shared/index.js');
5
+ var index = require('../../../../@vueuse_shared@9.13.0_vue@3.5.31_typescript@4.9.5_/node_modules/@vueuse/shared/index.js');
6
6
  var vueDemi = require('vue-demi');
7
7
 
8
8
  // Inject __name helper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzy-web-client/plugin-component-vue",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <ElTableColumn
3
- :align="align"
3
+ :align="align"
4
4
  :show-overflow-tooltip="showOverflowTooltip"
5
5
  v-bind="attrs"
6
6
  >
@@ -1,9 +1,11 @@
1
1
  <template>
2
- <div :class="ns.b()" ref="dataTableEl">
2
+ <div :class="ns.b()" ref="dataTableEl" :style="{display: height === 'auto' ? 'flex' : 'block',
3
+ flexDirection: height === 'auto' ? 'column' : 'unset'}">
3
4
  <slot :dataTable="dataTable">
4
5
  <ElTable
5
6
  class="content"
6
- height="100%"
7
+ :height="height"
8
+
7
9
  ref="elTable"
8
10
  :data="data"
9
11
  :row-key="dataTable.primaryKey"
@@ -145,6 +147,10 @@ const props = defineProps({
145
147
  type: Boolean,
146
148
  default: true,
147
149
  },
150
+ height: {
151
+ type: [String, Number],
152
+ default: "auto",
153
+ },
148
154
  showIndex: {
149
155
  type: Boolean,
150
156
  default: false,
@@ -1 +1 @@
1
- .bwa-datatable{--bwa-datatable-pagination-padding-top:20px;--bwa-datatable-pagination-line-height:36px;--bwa-datatable-pagination-info-margin-right:16px;--bwa-datatable-pagination-info-font-size:12px;--bwa-datatable-pagination-info-text-color:#547781;display:flex;flex-direction:column;height:100%;width:100%}.bwa-datatable__pagination{display:flex;line-height:var(--bwa-datatable-pagination-line-height)}.bwa-datatable__pagination::before{content:"";position:relative;flex:1}.bwa-datatable__pagination{padding-top:var(--bwa-datatable-pagination-padding-top)}.bwa-datatable__pagination-info{margin-right:var(--bwa-datatable-pagination-info-margin-right);font-size:var(--bwa-datatable-pagination-info-font-size);color:var(--bwa-datatable-pagination-info-text-color);white-space:nowrap}.bwa-datatable>.el-table{flex:1;height:0}.bwa-datatable__drag{text-align:center;cursor:grab}.bwa-datatable__dragbar{position:fixed;background-color:var(--bwa-color-primary);z-index:99}.bwa-column-view{text-overflow:ellipsis;overflow:hidden}
1
+ .bwa-datatable{--bwa-datatable-pagination-padding-top:20px;--bwa-datatable-pagination-line-height:36px;--bwa-datatable-pagination-info-margin-right:16px;--bwa-datatable-pagination-info-font-size:12px;--bwa-datatable-pagination-info-text-color:#547781;height:100%;width:100%}.bwa-datatable__pagination{display:flex;line-height:var(--bwa-datatable-pagination-line-height)}.bwa-datatable__pagination::before{content:"";position:relative;flex:1}.bwa-datatable__pagination{padding-top:var(--bwa-datatable-pagination-padding-top)}.bwa-datatable__pagination-info{margin-right:var(--bwa-datatable-pagination-info-margin-right);font-size:var(--bwa-datatable-pagination-info-font-size);color:var(--bwa-datatable-pagination-info-text-color);white-space:nowrap}.bwa-datatable>.el-table{flex:1;height:0}.bwa-datatable__drag{text-align:center;cursor:grab}.bwa-datatable__dragbar{position:fixed;background-color:var(--bwa-color-primary);z-index:99}.bwa-column-view{text-overflow:ellipsis;overflow:hidden}