keli-ui 0.1.0 → 0.1.2

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/keli-ui.js CHANGED
@@ -36648,18 +36648,20 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
36648
36648
  value: row[column.field],
36649
36649
  "onUpdate:value": ($event) => row[column.field] = $event,
36650
36650
  detail: column,
36651
+ disabled: column.disabled !== false,
36651
36652
  "row-data": row,
36652
36653
  onValueChange: fieldValueChanged
36653
- }, null, 40, ["value", "onUpdate:value", "detail", "row-data"]))
36654
+ }, null, 40, ["value", "onUpdate:value", "detail", "disabled", "row-data"]))
36654
36655
  ]),
36655
36656
  renderAsyncCell: withCtx(({ row, column }) => [
36656
36657
  (openBlock(), createBlock(resolveDynamicComponent(column.editRender.name), {
36657
36658
  value: row[column.field],
36658
36659
  "onUpdate:value": ($event) => row[column.field] = $event,
36659
36660
  detail: column,
36661
+ disabled: column.disabled !== false,
36660
36662
  "row-data": row,
36661
36663
  onValueChange: fieldValueChanged
36662
- }, null, 40, ["value", "onUpdate:value", "detail", "row-data"]))
36664
+ }, null, 40, ["value", "onUpdate:value", "detail", "disabled", "row-data"]))
36663
36665
  ]),
36664
36666
  tableButtonOperate: withCtx(({ row, rowIndex }) => [
36665
36667
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tableRowButtons, (btn) => {
@@ -36690,12 +36692,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
36690
36692
  "onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => pagination.value.currentPage = $event),
36691
36693
  "page-size": pagination.value.pageSize,
36692
36694
  "onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pagination.value.pageSize = $event),
36693
- total: __props.tablePagination.total,
36695
+ total: __props.tablePagination.total || __props.tableData.length,
36694
36696
  background: "",
36695
- layout: "total, prev, pager, next, jumper",
36697
+ layout: pagination.value.pageSize > 0 ? "total, prev, pager, next, jumper" : "total",
36696
36698
  size: "small",
36697
36699
  onCurrentChange: paginationChange
36698
- }, null, 8, ["current-page", "page-size", "total"])
36700
+ }, null, 8, ["current-page", "page-size", "total", "layout"])
36699
36701
  ])) : createCommentVNode("", true)
36700
36702
  ]);
36701
36703
  };
@@ -40940,6 +40942,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
40940
40942
  }
40941
40943
  );
40942
40944
  return (_ctx, _cache) => {
40945
+ var _a;
40943
40946
  const _component_el_button = resolveComponent("el-button");
40944
40947
  const _component_el_dialog = resolveComponent("el-dialog");
40945
40948
  return openBlock(), createElementBlock("div", null, [
@@ -40954,7 +40957,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
40954
40957
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modalOpen.value = $event),
40955
40958
  "close-on-click-modal": false,
40956
40959
  "show-close": false,
40957
- "append-to-body": ""
40960
+ "append-to-body": "",
40961
+ width: ((_a = __props.detail.componentParams) == null ? void 0 : _a.width) || "90%"
40958
40962
  }, {
40959
40963
  footer: withCtx(() => [
40960
40964
  createVNode(_component_el_button, {
@@ -40984,7 +40988,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
40984
40988
  target: ".el-table__body-wrapper tbody"
40985
40989
  }, {
40986
40990
  default: withCtx(() => {
40987
- var _a, _b;
40991
+ var _a2, _b;
40988
40992
  return [
40989
40993
  props.detail.column && props.detail.column.length > 0 ? (openBlock(), createBlock(unref(ElTable), {
40990
40994
  key: 0,
@@ -41044,16 +41048,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
41044
41048
  })
41045
41049
  ]),
41046
41050
  _: 1
41047
- }, 8, ["data"])) : ((_a = props.detail.componentParams) == null ? void 0 : _a.column) && Array.isArray((_b = props.detail.componentParams) == null ? void 0 : _b.column) ? (openBlock(), createBlock(unref(ElTable), {
41051
+ }, 8, ["data"])) : ((_a2 = props.detail.componentParams) == null ? void 0 : _a2.column) && Array.isArray((_b = props.detail.componentParams) == null ? void 0 : _b.column) ? (openBlock(), createBlock(unref(ElTable), {
41048
41052
  key: 1,
41049
41053
  data: state.value,
41050
41054
  "max-height": "380",
41051
41055
  style: { "width": "100%" }
41052
41056
  }, {
41053
41057
  default: withCtx(() => {
41054
- var _a2;
41058
+ var _a3;
41055
41059
  return [
41056
- (openBlock(true), createElementBlock(Fragment, null, renderList((_a2 = __props.detail.componentParams) == null ? void 0 : _a2.column, (item, index2) => {
41060
+ (openBlock(true), createElementBlock(Fragment, null, renderList((_a3 = __props.detail.componentParams) == null ? void 0 : _a3.column, (item, index2) => {
41057
41061
  return openBlock(), createBlock(unref(ElTableColumn), {
41058
41062
  key: index2,
41059
41063
  label: item.title,
@@ -41110,7 +41114,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
41110
41114
  }, 8, ["modelValue"])
41111
41115
  ]),
41112
41116
  _: 1
41113
- }, 8, ["modelValue"])
41117
+ }, 8, ["modelValue", "width"])
41114
41118
  ]);
41115
41119
  };
41116
41120
  }
@@ -41155,19 +41159,26 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
41155
41159
  }
41156
41160
  };
41157
41161
  return (_ctx, _cache) => {
41158
- var _a, _b, _c;
41162
+ var _a, _b;
41159
41163
  const _component_el_input = resolveComponent("el-input");
41160
41164
  return openBlock(), createBlock(_component_el_input, mergeProps({
41161
41165
  modelValue: inputValue.value,
41162
41166
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
41163
- placeholder: ((_a = props.detail) == null ? void 0 : _a.placeholder) ? props.detail.placeholder : `请输入${(_b = props.detail) == null ? void 0 : _b.title}`
41164
- }, ((_c = props.detail) == null ? void 0 : _c.componentParams) ? props.detail.componentParams : {}, { onChange: change }), createSlots({ _: 2 }, [
41165
- __props.detail.componentParams && __props.detail.componentParams.suffix ? {
41166
- name: "suffix",
41167
+ placeholder: (_a = props.detail) == null ? void 0 : _a.placeholder
41168
+ }, ((_b = props.detail) == null ? void 0 : _b.componentParams) ? props.detail.componentParams : {}, { onChange: change }), createSlots({ _: 2 }, [
41169
+ __props.detail.componentParams && __props.detail.componentParams.prepend ? {
41170
+ name: "prepend",
41167
41171
  fn: withCtx(() => [
41168
- createElementVNode("span", null, toDisplayString(__props.detail.componentParams.suffix), 1)
41172
+ createElementVNode("span", null, toDisplayString(__props.detail.componentParams.prepend), 1)
41169
41173
  ]),
41170
41174
  key: "0"
41175
+ } : void 0,
41176
+ __props.detail.componentParams && __props.detail.componentParams.append ? {
41177
+ name: "append",
41178
+ fn: withCtx(() => [
41179
+ createElementVNode("span", null, toDisplayString(__props.detail.componentParams.append), 1)
41180
+ ]),
41181
+ key: "1"
41171
41182
  } : void 0
41172
41183
  ]), 1040, ["modelValue", "placeholder"]);
41173
41184
  };
@@ -41263,18 +41274,25 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
41263
41274
  placeholder: __props.detail.placeholder,
41264
41275
  class: "full"
41265
41276
  }, props.detail.componentParams ? props.detail.componentParams : {}, { onChange: handleChange }), createSlots({ _: 2 }, [
41277
+ __props.detail.componentParams && __props.detail.componentParams.prefix ? {
41278
+ name: "prefix",
41279
+ fn: withCtx(() => [
41280
+ createElementVNode("span", null, toDisplayString(__props.detail.componentParams.prefix), 1)
41281
+ ]),
41282
+ key: "0"
41283
+ } : void 0,
41266
41284
  __props.detail.componentParams && __props.detail.componentParams.suffix ? {
41267
41285
  name: "suffix",
41268
41286
  fn: withCtx(() => [
41269
41287
  createElementVNode("span", null, toDisplayString(__props.detail.componentParams.suffix), 1)
41270
41288
  ]),
41271
- key: "0"
41289
+ key: "1"
41272
41290
  } : void 0
41273
41291
  ]), 1040, ["modelValue", "placeholder"]);
41274
41292
  };
41275
41293
  }
41276
41294
  });
41277
- const KeFormInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-cd436c2a"]]);
41295
+ const KeFormInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-0eea7341"]]);
41278
41296
  KeFormInputNumber.install = (app) => {
41279
41297
  app.component(KeFormInputNumber.__name, KeFormInputNumber);
41280
41298
  };