@ftjs/antd 3.1.1 → 3.2.0

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getField, useFormItem, useLocale, unrefs, useFormInject, toValueWithForm, useForm, set, useTable, get } from "@ftjs/core";
2
2
  import { computed, toValue, createVNode, mergeProps, unref, createTextVNode, isVNode, defineComponent, createBlock, openBlock, resolveDynamicComponent, createElementBlock, Fragment, renderList, normalizeClass, ref, useId, withCtx, renderSlot, createCommentVNode, toDisplayString, createElementVNode, onMounted, h, useTemplateRef, normalizeStyle, createSlots, normalizeProps } from "vue";
3
- import { FormItem, Input, Select, DatePicker, RangePicker, Radio, Textarea, Upload, Cascader, AutoComplete, CheckboxGroup, InputNumber, Mentions, Rate, Slider, Switch, TreeSelect, Form, Button, Modal, Tree, Divider, Spin, Pagination } from "ant-design-vue";
3
+ import { FormItem, Input, Select, DatePicker, RangePicker, Radio, Textarea, Upload, Cascader, AutoComplete, CheckboxGroup, InputNumber, Mentions, Rate, Slider, Switch, TreeSelect, Form, Button, Modal, Tree, Badge, Divider, Spin, Pagination } from "ant-design-vue";
4
4
  import dayjs from "dayjs";
5
5
  import { SwapOutlined, SettingOutlined } from "@ant-design/icons-vue";
6
6
  import { VxeGrid } from "vxe-table";
@@ -787,6 +787,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
787
787
  list.splice(fromIndex, 1);
788
788
  list.splice(toIndex, 0, dragNode);
789
789
  };
790
+ const hideCountNum = computed(() => {
791
+ return props.cache ? props.columns.length - columnsChecked.value.length : 0;
792
+ });
790
793
  __expose({
791
794
  formInstance: formRef,
792
795
  formData: form,
@@ -876,18 +879,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
876
879
  createVNode(unref(FormItem), { style: { "--ft-form-control-width": "220px" } }, {
877
880
  default: withCtx(() => [
878
881
  createElementVNode("div", _hoisted_4, [
879
- _ctx.cache ? (openBlock(), createBlock(unref(Button), {
882
+ _ctx.cache ? (openBlock(), createBlock(unref(Badge), {
880
883
  key: 0,
881
- onClick: setting
884
+ count: hideCountNum.value
882
885
  }, {
883
- icon: withCtx(() => [
884
- createVNode(unref(SettingOutlined))
885
- ]),
886
886
  default: withCtx(() => [
887
- createTextVNode(" " + toDisplayString(unref(locale).form.settings), 1)
887
+ createVNode(unref(Button), { onClick: setting }, {
888
+ icon: withCtx(() => [
889
+ createVNode(unref(SettingOutlined))
890
+ ]),
891
+ default: withCtx(() => [
892
+ createTextVNode(" " + toDisplayString(unref(locale).form.settings), 1)
893
+ ]),
894
+ _: 1
895
+ })
888
896
  ]),
889
897
  _: 1
890
- })) : createCommentVNode("", true),
898
+ }, 8, ["count"])) : createCommentVNode("", true),
891
899
  createVNode(unref(Button), {
892
900
  type: "primary",
893
901
  htmlType: "submit"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftjs/antd",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "keywords": [],
5
5
  "author": "",
6
6
  "license": "MIT",