vbenjs / vue-vben-admin

A modern vue admin. It is based on Vue3, vite and TypeScript. It's fast!
https://vben.vvbin.cn/
MIT License
22.88k stars 6.24k forks source link

修复 ColumnSettings.vue 中 columnOptions 在设置label和value时 typeof lost #3941

Closed Allure-eve closed 1 day ago

Allure-eve commented 2 days ago

General

✏️ Mark the necessary items without changing the structure of the PR template.

Type

ℹ️ What types of changes does your code introduce?

👉 Put an x in the boxes that apply

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

👉 Put an x in the boxes that apply.

options.push({
  label:
    typeof col.title === "string"
      ? col.title
      : col.customTitle === "string" //  typeof丢失
        ? col.customTitle
        : "",
  value:
    typeof col.dataIndex === "string"
      ? col.dataIndex
      : col.title === "string" //  typeof丢失
        ? col.title
        : "",
  column: {
    defaultHidden: col.defaultHidden,
  },
  fixed: col.fixed,
});