@blueking/ediatable 0.0.1-beta.2 → 0.0.1-beta.4

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.
@@ -5489,7 +5489,7 @@ lodash.exports;
5489
5489
  var lodashExports = lodash.exports;
5490
5490
  const _ = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports);
5491
5491
  !function() {
5492
- var svgCode = '<svg xmlns="http://www.w3.org/2000/svg" data-name="ediatable" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden"><symbol id="icon-exclamation-fill" viewBox="0 0 64 64"><path fill="#737987" d="M32 4C16.5 4 4 16.5 4 32s12.5 28 28 28 28-12.5 28-28S47.5 4 32 4zm0 44c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3zm3-28.7L34 38c0 1.1-.9 2-2 2s-2-.9-2-2l-1-18.7V19c0-1.7 1.3-3 3-3s3 1.3 3 3v.3z"/></symbol><symbol id="icon-minus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H288v-64h448v64z"/></symbol><symbol id="icon-plus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H544v192h-64V544H288v-64h192V288h64v192h192v64z"/></symbol></svg>';
5492
+ var svgCode = '<svg xmlns="http://www.w3.org/2000/svg" data-name="ediatable" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden"><symbol id="icon-exclamation-fill" viewBox="0 0 64 64"><path fill="#737987" d="M32 4C16.5 4 4 16.5 4 32s12.5 28 28 28 28-12.5 28-28S47.5 4 32 4zm0 44c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3zm3-28.7L34 38c0 1.1-.9 2-2 2s-2-.9-2-2l-1-18.7V19c0-1.7 1.3-3 3-3s3 1.3 3 3v.3z"/></symbol><symbol id="icon-copy" viewBox="0 0 1024 1024"><path d="M864 128H288c-17.6 0-32 14.4-32 32v96h-96c-17.6 0-32 14.4-32 32v576c0 17.6 14.4 32 32 32h576c17.6 0 32-14.4 32-32v-96h96c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32zM704 704v128H192V320h512v384zm128 0h-64V288c0-17.6-14.4-32-32-32H320v-64h512v512z"/><path d="M275.2 419.2h336v64h-336zM272 544h336v64H272zM272 672h336v64H272z"/></symbol><symbol id="icon-minus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H288v-64h448v64z"/></symbol><symbol id="icon-plus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H544v192h-64V544H288v-64h192V288h64v192h192v64z"/></symbol></svg>';
5493
5493
  if (document.body) {
5494
5494
  document.body.insertAdjacentHTML("afterbegin", svgCode);
5495
5495
  } else {
@@ -5628,8 +5628,6 @@ const renderTablekey = Symbol("renderTable");
5628
5628
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5629
5629
  __name: "ediatable",
5630
5630
  setup(__props) {
5631
- import("./tippy-DVU4Re0T.mjs");
5632
- import("./light-B2nZX324.mjs");
5633
5631
  const checkTableScroll = () => {
5634
5632
  rowWidth.value = tableRef.value.clientWidth;
5635
5633
  isOverflow.value = tableOuterRef.value.clientWidth < tableRef.value.clientWidth;
@@ -5900,7 +5898,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5900
5898
  type: { default: "text" },
5901
5899
  min: { default: Number.MIN_SAFE_INTEGER },
5902
5900
  max: { default: Number.MAX_SAFE_INTEGER },
5903
- isShowBlur: { type: Boolean, default: false }
5901
+ isShowBlur: { type: Boolean, default: false },
5902
+ precision: { default: 0 }
5904
5903
  }, {
5905
5904
  "modelValue": {
5906
5905
  default: ""
@@ -5992,25 +5991,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5992
5991
  }])
5993
5992
  },
5994
5993
  [
5995
- createVNode(unref(Input), {
5994
+ createVNode(unref(Input), mergeProps({
5996
5995
  class: "input-box",
5997
5996
  disabled: _ctx.disabled,
5998
5997
  max: _ctx.max,
5999
5998
  min: _ctx.min,
6000
5999
  "model-value": modelValue.value,
6001
6000
  placeholder: _ctx.placeholder,
6002
- type: _ctx.type,
6001
+ type: _ctx.type
6002
+ }, _ctx.$attrs, {
6003
+ precision: _ctx.precision,
6003
6004
  onBlur: handleBlur,
6004
6005
  onChange: handleInput,
6005
6006
  onFocus: _cache[0] || (_cache[0] = () => isBlur.value = false),
6006
6007
  onInput: handleInput,
6007
6008
  onKeydown: handleKeydown,
6008
6009
  onPaste: handlePaste
6009
- }, {
6010
+ }), {
6010
6011
  suffix: withCtx(() => []),
6011
6012
  _: 1
6012
6013
  /* STABLE */
6013
- }, 8, ["disabled", "max", "min", "model-value", "placeholder", "type"]),
6014
+ }, 16, ["disabled", "max", "min", "model-value", "placeholder", "type", "precision"]),
6014
6015
  unref(errorMessage) ? withDirectives((openBlock(), createBlock(
6015
6016
  unref(DbIcon),
6016
6017
  {
@@ -6250,14 +6251,18 @@ const _hoisted_1$3 = { class: "bk-ediatable-operation" };
6250
6251
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6251
6252
  __name: "operation",
6252
6253
  props: {
6254
+ showCopy: { type: Boolean, default: false },
6253
6255
  showAdd: { type: Boolean, default: true },
6254
6256
  showRemove: { type: Boolean, default: true },
6255
6257
  removeable: { type: Boolean, default: true }
6256
6258
  },
6257
- emits: ["add", "remove"],
6259
+ emits: ["copy", "add", "remove"],
6258
6260
  setup(__props, { emit: __emit }) {
6259
6261
  const props = __props;
6260
6262
  const emits = __emit;
6263
+ const handleCopy = () => {
6264
+ emits("copy");
6265
+ };
6261
6266
  const handleAppend = () => {
6262
6267
  emits("add");
6263
6268
  };
@@ -6271,9 +6276,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6271
6276
  return openBlock(), createBlock(_sfc_main$5, null, {
6272
6277
  default: withCtx(() => [
6273
6278
  createElementVNode("div", _hoisted_1$3, [
6274
- _ctx.showAdd ? (openBlock(), createElementBlock("div", {
6279
+ _ctx.showCopy ? (openBlock(), createElementBlock("div", {
6275
6280
  key: 0,
6276
6281
  class: "action-btn",
6282
+ onClick: handleCopy
6283
+ }, [
6284
+ createVNode(unref(DbIcon), { type: "copy" })
6285
+ ])) : createCommentVNode("v-if", true),
6286
+ _ctx.showAdd ? (openBlock(), createElementBlock("div", {
6287
+ key: 1,
6288
+ class: "action-btn",
6277
6289
  onClick: handleAppend
6278
6290
  }, [
6279
6291
  createVNode(unref(DbIcon), { type: "plus-fill" })
@@ -6281,7 +6293,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6281
6293
  _ctx.showRemove ? (openBlock(), createElementBlock(
6282
6294
  "div",
6283
6295
  {
6284
- key: 1,
6296
+ key: 2,
6285
6297
  class: normalizeClass(["action-btn", {
6286
6298
  disabled: _ctx.removeable
6287
6299
  }]),
@@ -6385,7 +6397,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6385
6397
  style: normalizeStyle({ height: rootHeight.value + "px" })
6386
6398
  },
6387
6399
  [
6388
- createVNode(unref(Select), {
6400
+ createVNode(unref(Select), mergeProps(_ctx.$attrs, {
6389
6401
  "model-value": localValue.value,
6390
6402
  "auto-focus": "",
6391
6403
  class: "select-box",
@@ -6398,7 +6410,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6398
6410
  "show-select-all": _ctx.showSelectAll,
6399
6411
  onChange: handleSelect,
6400
6412
  onClear: handleRemove
6401
- }, {
6413
+ }), {
6402
6414
  default: withCtx(() => [
6403
6415
  (openBlock(true), createElementBlock(
6404
6416
  Fragment,
@@ -6416,7 +6428,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6416
6428
  ]),
6417
6429
  _: 1
6418
6430
  /* STABLE */
6419
- }, 8, ["model-value", "disabled", "multiple", "placeholder", "show-select-all"]),
6431
+ }, 16, ["model-value", "disabled", "multiple", "placeholder", "show-select-all"]),
6420
6432
  unref(errorMessage) ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
6421
6433
  withDirectives(createVNode(
6422
6434
  unref(DbIcon),
@@ -9042,8 +9054,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
9042
9054
  class: normalizeClass(["bk-ediatable-tag-input", { ["is-error"]: Boolean(unref(errorMessage)) }])
9043
9055
  },
9044
9056
  [
9045
- createVNode(unref(TagInput), {
9046
- "model-value": modelValue.value,
9057
+ createVNode(unref(TagInput), mergeProps({ "model-value": modelValue.value }, _ctx.$attrs, {
9047
9058
  "allow-auto-match": "",
9048
9059
  "allow-create": "",
9049
9060
  clearable: false,
@@ -9055,7 +9066,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
9055
9066
  onBlur: handleBlur,
9056
9067
  onChange: handleChange,
9057
9068
  onFocus: handleFocus
9058
- }, null, 8, ["model-value", "max-data", "placeholder"]),
9069
+ }), null, 16, ["model-value", "max-data", "placeholder"]),
9059
9070
  unref(errorMessage) ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
9060
9071
  withDirectives(createVNode(
9061
9072
  unref(DbIcon),