knt-shared 1.8.5 → 1.8.7

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/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance, inject, defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, useCssVars, createCommentVNode, createVNode, unref, createBlock, reactive, Fragment, renderList, withModifiers, ref, watch, onMounted, onUnmounted, withDirectives, vModelText, vShow, toDisplayString, withCtx, createTextVNode, nextTick, renderSlot, mergeProps, createSlots, onBeforeUnmount, toRef, normalizeProps, guardReactiveProps, h, resolveDynamicComponent, isVNode, useSlots, Teleport, createApp } from "vue";
1
+ import { getCurrentInstance, inject, defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createCommentVNode, createVNode, unref, createBlock, reactive, Fragment, renderList, withModifiers, ref, watch, onMounted, onUnmounted, withDirectives, vModelText, vShow, toDisplayString, withCtx, createTextVNode, useCssVars, nextTick, renderSlot, mergeProps, createSlots, onBeforeUnmount, toRef, normalizeProps, guardReactiveProps, h, resolveDynamicComponent, isVNode, useSlots, Teleport, createApp } from "vue";
2
2
  import ArcoVue, { Progress, Spin, Dropdown, Doption, Modal, Upload, Button, Image as Image$1, Message, Select, Cascader, Transfer, Mention, Rate, Slider, Switch, RangePicker, TimePicker, DatePicker, TreeSelect, CheckboxGroup, Checkbox, RadioGroup, Radio, AutoComplete, Textarea, InputPassword, InputNumber, Input, ImagePreviewGroup, Form, Row, Col, FormItem, Tooltip, Space, Divider, Popover, Table, Popconfirm, Link, Descriptions, DescriptionsItem } from "@arco-design/web-vue";
3
3
  const configProviderInjectionKey = Symbol("ArcoConfigProvider");
4
4
  const CLASS_PREFIX = "arco";
@@ -2303,9 +2303,6 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2303
2303
  },
2304
2304
  emits: ["dragstart", "dragend", "preview", "remove"],
2305
2305
  setup(__props, { emit: __emit }) {
2306
- useCssVars((_ctx) => ({
2307
- "v6adf0568": _ctx.cardSize + 10 + "px"
2308
- }));
2309
2306
  const props = __props;
2310
2307
  const emit = __emit;
2311
2308
  const isVideoFile = (file) => {
@@ -2354,7 +2351,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2354
2351
  draggable: !__props.disabled,
2355
2352
  style: normalizeStyle({
2356
2353
  width: `${__props.cardSize}px`,
2357
- height: `${__props.cardSize}px`
2354
+ height: `${__props.cardSize}px`,
2355
+ "--indicator-height": `${__props.cardSize + 10}px`
2358
2356
  }),
2359
2357
  onDragstart: handleDragStart,
2360
2358
  onDragend: handleDragEnd
@@ -2398,7 +2396,7 @@ const _export_sfc = (sfc, props) => {
2398
2396
  }
2399
2397
  return target;
2400
2398
  };
2401
- const SortableFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-c8377d24"]]);
2399
+ const SortableFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-b7fe69e3"]]);
2402
2400
  const _hoisted_1$b = { class: "sortable-file-list" };
2403
2401
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
2404
2402
  ...{
@@ -6982,6 +6980,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6982
6980
  []
6983
6981
  );
6984
6982
  const checkedColumns = ref(storedColumns.value);
6983
+ const isColumnSettingReady = ref(false);
6985
6984
  watch(checkedColumns, (newValue) => {
6986
6985
  if (getStorageKey()) {
6987
6986
  setStoredColumns(newValue);
@@ -7246,7 +7245,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
7246
7245
  const indexColumn = {
7247
7246
  title: "序号",
7248
7247
  dataIndex: "__index__",
7249
- width: 60,
7248
+ width: 70,
7250
7249
  align: "center",
7251
7250
  fixed: "left",
7252
7251
  slotName: "__index__",
@@ -7265,7 +7264,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
7265
7264
  };
7266
7265
  columns.push(actionColumn);
7267
7266
  }
7268
- if (getToolbarConfig.value.showColumnSetting && checkedColumns.value.length > 0) {
7267
+ if (getToolbarConfig.value.showColumnSetting && isColumnSettingReady.value) {
7269
7268
  columns = columns.filter((col) => {
7270
7269
  if (col.dataIndex === "__index__" || col.dataIndex === "action") {
7271
7270
  return true;
@@ -7299,6 +7298,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
7299
7298
  return col.ifShow !== false && col.dataIndex;
7300
7299
  });
7301
7300
  });
7301
+ watch(settingColumns, (newCols) => {
7302
+ if (!isColumnSettingReady.value) return;
7303
+ const currentKeys = new Set(checkedColumns.value);
7304
+ const newKeys = newCols.filter((col) => col.dataIndex && !currentKeys.has(col.dataIndex)).map((col) => col.dataIndex);
7305
+ if (newKeys.length > 0) {
7306
+ checkedColumns.value = [...checkedColumns.value, ...newKeys];
7307
+ }
7308
+ });
7302
7309
  const getBindValues = computed(() => {
7303
7310
  const mergedProps = getMergedProps.value;
7304
7311
  const {
@@ -7722,6 +7729,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
7722
7729
  } else {
7723
7730
  checkedColumns.value = settingColumns.value.filter((col) => !col.defaultHidden).map((col) => col.dataIndex);
7724
7731
  }
7732
+ isColumnSettingReady.value = true;
7725
7733
  };
7726
7734
  const getDataSource = () => dataSource.value;
7727
7735
  const setDataSource = async (data) => {
@@ -8336,7 +8344,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8336
8344
  };
8337
8345
  }
8338
8346
  });
8339
- const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-84dbe67a"]]);
8347
+ const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f752ab5b"]]);
8340
8348
  function useTable(options = {}) {
8341
8349
  const tableRef = ref(null);
8342
8350
  const formRef = ref(null);