react-toolkits 2.13.31 → 2.13.32

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.13.32
4
+
5
+ ### Patch Changes
6
+
7
+ - 575bb87: feat: display user search only when current permission is v3
8
+
3
9
  ## 2.13.31
4
10
 
5
11
  ### Patch Changes
package/lib/index.js CHANGED
@@ -2562,6 +2562,7 @@ var init_userList = __esm({
2562
2562
  const remove = useRemoveUser();
2563
2563
  const { mutate: mutate2, refetch } = useQueryListStore();
2564
2564
  const { permissionVersion } = useToolkitsStore((s) => s);
2565
+ const isV3 = permissionVersion === "v3" /* V3 */;
2565
2566
  const { show: showCreateModal, modal: createModal } = useCreateUserModal({
2566
2567
  onSuccess() {
2567
2568
  refetch(url2, { page: 1 });
@@ -2592,7 +2593,7 @@ var init_userList = __esm({
2592
2593
  dataIndex: "name",
2593
2594
  key: "name",
2594
2595
  render(value, record) {
2595
- if (permissionVersion === "v3" /* V3 */) {
2596
+ if (isV3) {
2596
2597
  return /* @__PURE__ */ jsx(Link, { to: `./${record.id}`, children: value });
2597
2598
  }
2598
2599
  return value;
@@ -2603,7 +2604,7 @@ var init_userList = __esm({
2603
2604
  dataIndex: "id",
2604
2605
  key: "id"
2605
2606
  },
2606
- permissionVersion !== "v3" /* V3 */ && {
2607
+ isV3 && {
2607
2608
  title: t("global.role"),
2608
2609
  dataIndex: "roles",
2609
2610
  key: "roles",
@@ -2631,7 +2632,7 @@ var init_userList = __esm({
2631
2632
  type: "link",
2632
2633
  code: "100003",
2633
2634
  onClick: () => {
2634
- if (permissionVersion === "v3" /* V3 */) {
2635
+ if (isV3) {
2635
2636
  showUpdateModalV2({
2636
2637
  initialValues: {
2637
2638
  name,
@@ -2703,7 +2704,7 @@ var init_userList = __esm({
2703
2704
  icon: /* @__PURE__ */ jsx(UserAddOutlined, {}),
2704
2705
  code: "100002",
2705
2706
  onClick: () => {
2706
- if (permissionVersion === "v3" /* V3 */) {
2707
+ if (isV3) {
2707
2708
  showCreateModalV2();
2708
2709
  } else {
2709
2710
  showCreateModal();
@@ -2721,7 +2722,7 @@ var init_userList = __esm({
2721
2722
  columns,
2722
2723
  getTotal: (data) => data?.data.Total,
2723
2724
  getDataSource: (data) => data?.data.List,
2724
- renderForm: (form) => /* @__PURE__ */ jsx(Form, { form, children: /* @__PURE__ */ jsx(Form.Item, { label: "\u540D\u79F0", name: "name", children: /* @__PURE__ */ jsx(Input, {}) }) })
2725
+ renderForm: isV3 ? (form) => /* @__PURE__ */ jsx(Form, { form, children: /* @__PURE__ */ jsx(Form.Item, { label: "\u540D\u79F0", name: "name", children: /* @__PURE__ */ jsx(Input, {}) }) }) : void 0
2725
2726
  }
2726
2727
  )
2727
2728
  }