mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
refactor(Util): convert methods to static for better accessibility and usage
This commit is contained in:
@@ -120,7 +120,7 @@ FixIt/
|
||||
```javascript
|
||||
// 使用 ES6 类
|
||||
export default class Util {
|
||||
copyText(text) {
|
||||
static copyText(text) {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export default class Util {
|
||||
class FixIt {
|
||||
constructor() {
|
||||
this.config = window.config
|
||||
this.util = new Util()
|
||||
this.scrollTop = Util.getScrollTop()
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
Reference in New Issue
Block a user