-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: .add directives folder and add lazyimg dir fearture #69
Conversation
✅ Deploy Preview for vue-hbs-admin ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
src/directives/index.ts
Outdated
* Coonfigure and register global directives | ||
*/ | ||
|
||
import { App } from 'vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我写的时候写了的,好像PrettierStandard自动保存给我优化掉了====,我换成了Prettier Eslint就可以了
src/directives/lazyImg.ts
Outdated
app.directive('lazyImg', authDirective) | ||
} | ||
|
||
export default authDirective |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- authDirective 命名需要优化;
- 方法比较简单时,不用拆方法;
- 默认图片可以替换一下;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.命名可以改一下,
2.方法这个我看了下主要是因为嵌套函数,另外步骤更加细致和语义化的问题,这个问题应该不大
3.图片的话我就用test那张吧,名字还是default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档记得写一下
Description
Create directives folder and add a lazyImg_dir by vueuse/core API;in this folder, you can add any dir_fearture; you just need to add a 'v-dir' instruction on the correspoding HTML when you want to get the correspoding effect
close #34
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).