Skip to content
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

Merged
merged 5 commits into from
Apr 29, 2022

Conversation

jersonwei
Copy link
Contributor

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?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).

@netlify
Copy link

netlify bot commented Apr 29, 2022

Deploy Preview for vue-hbs-admin ready!

Name Link
🔨 Latest commit 174f7b5
🔍 Latest deploy log https://app.netlify.com/sites/vue-hbs-admin/deploys/626bf02ae762650009a8d872
😎 Deploy Preview https://deploy-preview-69--vue-hbs-admin.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

* Coonfigure and register global directives
*/

import { App } from 'vue'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import type ...

Copy link
Contributor Author

@jersonwei jersonwei Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我写的时候写了的,好像PrettierStandard自动保存给我优化掉了====,我换成了Prettier Eslint就可以了

app.directive('lazyImg', authDirective)
}

export default authDirective
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. authDirective 命名需要优化;
  2. 方法比较简单时,不用拆方法;
  3. 默认图片可以替换一下;

Copy link
Contributor Author

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

Copy link
Member

@Hongbusi Hongbusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档记得写一下

@Hongbusi Hongbusi merged commit 2cc91ea into developer-plus:master Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

全局图片懒加载指令及图片展示错误处理
2 participants