// 权限辅助函数
export function hasPrivilege(privilege, required) {
  if (!privilege) return false;
  // lv-admin 拥有全部权限
  if (privilege.includes('lv-admin')) return true;
  const privArr = privilege.split(';');
  if (Array.isArray(required)) {
    return required.some(r => privArr.includes(r));
  }
  return privArr.includes(required);
} 