Coder Social home page Coder Social logo

huajian123 / ng-ant-admin Goto Github PK

View Code? Open in Web Editor NEW
576.0 13.0 146.0 10.35 MB

Angular17 Standalone components 独立组件, 中后台管理系统模板,移动端适配 Mobile adaptation ng-zorro ant-design-pro front-end framework

Home Page: https://huajian123.github.io/ng-ant-admin/browser/

License: MIT License

JavaScript 1.26% TypeScript 66.77% HTML 28.03% Less 3.94%
typescript ant-design ant-design-pro angular ng-zorro admin standalone-components angular17 mswjs

ng-ant-admin's Introduction

Hi there 👋

大家好,我会写一点点代码🤔

ng-ant-admin's People

Contributors

37-james avatar fanbaolin666 avatar huajian123 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  avatar  avatar  avatar  avatar  avatar  avatar

ng-ant-admin's Issues

modal error when edit

I cloned from GitHub and tested the edit function at the "default/system/menu" path, and whether I press confirm or cancel, there's an error as shown in the picture. How can I fix it? I followed the guide to implement a similar function and encountered the same error. see error on image: https://i.imgur.com/rUz6NAM.png

this.modalDragService.confirm({nzTitle: 'Confirm', nzContent: '提示一下的内容'})拿不到返回值

弹出的确认框需要知道确认的结果,是点击了确定,还是取消

 const dialog=this.modalDragService.confirm({nzTitle: 'Confirm', nzContent: '提示一下的内容'})
 dialog.afterClose.subscribe(result => {
      console.log(result);})

这个返回的值是undefine,这样没法判断是点击了确定,还是取消,有什么办法可以确定弹出的模态框点击了什么按钮么?

下载后编译报错:node_modules/@antv/g2plot/lib/plots/venn/types.d.ts:10:18 - error TS2430: Interface 'VennOptions' incorrectly extends interface 'Options'

Error: node_modules/@antv/g2plot/lib/plots/venn/types.d.ts:10:18 - error TS2430: Interface 'VennOptions' incorrectly extends interface 'Options'.
Types of property 'color' are incompatible.
Type 'string | string[] | ((datum: Datum, defaultColor: string) => string) | undefined' is not assignable to type 'ColorAttr | undefined'.
Type '(datum: Datum, defaultColor: string) => string' is not assignable to type 'ColorAttr | undefined'.
Type '(datum: Datum, defaultColor: string) => string' is not assignable to type '(datum: Datum, defaultColor?: string | undefined) => string'.
Types of parameters 'defaultColor' and 'defaultColor' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.

看起来是包的问题,更新了版本也不行,是项目问题了?

作者大大好

我是vue转angular,看了您这个项目感觉很有学习价值,由于对angular不熟练,看完您的视频后,对项目中rxjs的用法还是不懂,您有时间可不可以录个项目中rxjs的教学视频,再次感谢

fnFlatDataHasParentToTree缺少排序,导致从后端返回的节点顺序错乱

`//增加Sort排序
const fnPermissionSort = (permessionA:any, permessionB:any) => {
if (permessionA.orderNum < permessionB.orderNum) {
return -1
}

if (permessionA.orderNum > permessionB.orderNum) {
return 1
}

return 0
}`

`const fnFlatDataHasParentToTree = function translateDataToTree(data: any[], fatherId = 'fatherId'): any {
//没有父节点的数据
let parents = data.filter(value => value[fatherId] === null || value[fatherId] === '');
parents.sort(fnPermissionSort);//增加父级节点的排序
//有父节点的数据
let children = data.filter(value => value[fatherId] !== null && value[fatherId] !== '');

//定义转换方法的具体实现
let translator = (parents: any[], children: any[]): any => {
//遍历父节点数据
parents.forEach(parent => {
//遍历子节点数据
children.forEach((current, index) => {
//此时找到父节点对应的一个子节点
if (current[fatherId] === parent.id) {
//对子节点数据进行深复制,这里只支持部分类型的数据深复制,对深复制不了解的童靴可以先去了解下深复制
let temp = JSON.parse(JSON.stringify(children));
//让当前子节点从temp中移除,temp作为新的子节点数据,这里是为了让递归时,子节点的遍历次数更少,如果父子关系的层级越多,越有利
temp.splice(index, 1);
//让当前子节点作为唯一的父节点,去递归查找其对应的子节点
translator([current], temp);
//把找到子节点放入父节点的children属性中
typeof parent.children !== 'undefined' ? parent.children.push(current) : (parent.children = [current]);
}
});
});
children.sort(fnPermissionSort);//增加子级排序
};
//调用转换方法
translator(parents, children);
return parents;
};`

Token的过期以及refresh问题

Token的过期是靠后端反馈(如果我没有看错的话),token是直接在前端可以判断出是否过期的,从请求后再去判断过期,不太合理。此外,也没有看到refresh token的操作

use of wrong pattern to get variable value

In src/app/core/services/common/reuse-strategy.ts

// 是否允许复用路由
shouldDetach(route: ActivatedRouteSnapshot): boolean {
// 是否展示多页签,如果不展示多页签,则不做路由复用
let isShowTab = false;
this.isShowTab$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(res => {
isShowTab = res.isShowTab;
});

return route.data['shouldDetach'] !== 'no' && isShowTab;
}

This is a pattern for synchronous execution, but using subscribe on an observable results in asynchronous execution. The value of the variable isShowTab when evaluating the condition (return route.data['shouldDetach'] !== 'no' && isShowTab;) may not be as expected

Consider using :

// 是否有多页签,没有多页签则不做路由缓存
isShowTab$ = inject(ThemeStoreService);
.
.
.
shouldDetach(route: ActivatedRouteSnapshot): boolean {
// 是否展示多页签,如果不展示多页签,则不做路由复用
let isShowTab = this.isShowTab$.getCurrentThemesMode().isShowTab;
return route.data['shouldDetach'] !== 'no' && isShowTab;
}
.
.
.
.
adding to theme-store.service :

getCurrentThemesMode(): SettingInterface {
return this.themesMode$.getValue();
}

[question] form modal validation

Can you tell me about the modal behavior? Is there a way to prevent the modal form from closing when a user enters an incorrect email format? It seems quite inconvenient to force users to reopen the modal and re-enter the information if they only made a mistake in the email field. https://i.imgur.com/v1QnSwY.png

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.