Git Product home page Git Product logo

hackycy / sf-nest-admin Goto Github PK

View Code? Open in Web Editor NEW
163.0 7.0 33.0 651 KB

🚀 基于NestJs + TypeScript + TypeORM + Redis + MySql + Vue2 + Element-UI编写的一款简单高效的前后端分离的权限管理系统

Home Page: http://opensource.admin.si-yee.com

License: MIT License

JavaScript 0.26% TypeScript 91.57% PLpgSQL 7.95% Dockerfile 0.22%
nestjs typeorm mysql redis admin nestjs-typescript sf-nest-admin typeorm-mysql

sf-nest-admin's Introduction

Hi, I am hackycy! 👋

Want to be a full stack developer

  • 😄 Welcome to visit my open source projects.

🛠  Tech Stack

JavaScript TypeScript Vue Node.js Git Docker

🤝🏻  Contact with Me

Email

sf-nest-admin's People

Contributors

hackycy avatar kuizuo avatar znonymous29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sf-nest-admin's Issues

前端的侧栏菜单的文本可以被选中

Bug report(问题描述)

前端侧栏菜单的文本可以被选中, 用鼠标托选会选中侧栏菜单的文本, 影响外观

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • Mysql version:
  • Redis version:

sf-vue-admin issue 呢?关于table 封装的建议

目前实现代码
image

用户必须传递 promise。这里感觉不是特别优雅。

我的想法是尽量减少用户的感知,不管你怎么给我,只要是符合我要求的数据结构,我都能处理。

image

这样嵌套一层 promise ,给我一般数据,我也能处理。

小小建议哈。

特定账号开放多点登录

作者你好!我想问下怎么对特定的账号开放多点登录,刚接触nodejs后端,不是很懂要改哪里,希望作者指点一二,感谢🙏

serve端报错

Bug report(问题描述)

server端启动后 报
Generic type 'RemoteSocket<EmitEvents, SocketData>' requires 2 type argument(s).
我把这个错误修复后又报
ERROR [ApiExceptionFilter] TypeError: classTransformer.plainToClass is not a function
问下,是有什么依赖没有锁定么。

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

image

Other relevant information(格外信息)

  • Your mac:
  • Node.js v16.13.1:
  • nest 8.2.0

为什么要将菜单项放在后端呢?这样做有什么好处?

小弟是菜鸟全干工程师一枚,我去看了 vue-element-admin 这个项目,发现他的路由是写在前端的。但是此项目的菜单路由是写在后端的。如果这样做的话路由不是需要在后端加,真实页面得在前端加,这样不会有点奇怪吗? 或者有其它考量呢? 望大佬赐教,小弟不胜感激。

自定义了一个dto校验一直不通过,提示property id should not exist

controller

  @Authorize()
  @Post()
  async updateQuestion(@Body() dto: UpdateQuestionDto) {
    return await this.questionService.updateQuestion(dto);
  }

DTO

export class UpdateQuestionDto extends CreateQuestionDto {
  id: number;
}

export class CreateQuestionDto {
  @ApiProperty({
    required: true,
    description: '问题',
  })
  @IsString()
  question: string;

  @ApiProperty({
    required: false,
    description: '答案',
  })
  @IsString()
  @IsOptional()
  anwser?: string;

  @ApiProperty({
    description: '类型',
  })
  @IsInt()
  @IsOptional()
  type?: number;
}

访问这个接口参数都传了但是提示 property id should not exist
image
试了不传id也不行

为什么前后端js代码是两种风格呢

Feature request(新功能建议)

前端如果js代码都是不带分号的(代码结尾带分号会有警告)
后端你的js代码都是带分号的
建议统一前后端是js代码格式

sfadmin create后server无法加载

debian 11 nodejs 12或者14 用cli全新安装后
npn run dev后提示
[2:31:50 PM] Starting compilation in watch mode...

node_modules/@nestjs/typeorm/dist/common/typeorm.decorators.d.ts:2:10 - error TS2305: Module '"typeorm"' has no exported member 'DataSource'.

2 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/common/typeorm.decorators.d.ts:2:22 - error TS2305: Module '"typeorm"' has no exported member 'DataSourceOptions'.

2 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/common/typeorm.utils.d.ts:3:10 - error TS2305: Module '"typeorm"' has no exported member 'DataSource'.

3 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/common/typeorm.utils.d.ts:3:22 - error TS2305: Module '"typeorm"' has no exported member 'DataSourceOptions'.

3 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/interfaces/typeorm-options.interface.d.ts:2:10 - error TS2305: Module '"typeorm"' has no exported member 'DataSource'.

2 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/interfaces/typeorm-options.interface.d.ts:2:22 - error TS2305: Module '"typeorm"' has no exported member 'DataSourceOptions'.

2 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/typeorm.module.d.ts:2:10 - error TS2305: Module '"typeorm"' has no exported member 'DataSource'.

2 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~

node_modules/@nestjs/typeorm/dist/typeorm.module.d.ts:2:22 - error TS2305: Module '"typeorm"' has no exported member 'DataSourceOptions'.

2 import { DataSource, DataSourceOptions } from 'typeorm';
~~~~~~~~~~~~~~~~~

src/modules/admin/system/online/online.service.ts:63:49 - error TS2314: Generic type 'RemoteSocket<EmitEvents, SocketData>' requires 2 type argument(s).

63 async findSocketIdByUid(uid: number): Promise<RemoteSocket> {
~~~~~~~~~~~~~~~~~~~~~

[2:32:08 PM] Found 9 errors. Watching for file changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.