Skip to content

Commit

Permalink
feat: ua-parser-js升级
Browse files Browse the repository at this point in the history
  • Loading branch information
ZvonimirSun committed Feb 27, 2025
1 parent d8b36d2 commit 9cd7cfb
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"relationship.js": "^1.2.7",
"three": "^0.173.0",
"tldraw": "^3.8.1",
"ua-parser-js": "^1.0.39",
"ua-parser-js": "^2.0.2",
"uuid": "^11.1.0",
"vanilla-jsoneditor": "^0.23.8",
"veaury": "^2.6.2",
Expand Down
72 changes: 67 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/tools/userAgent.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script>
import UAParser from 'ua-parser-js'
const parser = new UAParser()
import { UAParser } from 'ua-parser-js'
export default {
name: 'UserAgent',
Expand All @@ -10,8 +8,7 @@ export default {
}),
computed: {
result() {
parser.setUA(this.data)
return parser.getResult()
return UAParser(this.data)
},
},
mounted() {
Expand Down

0 comments on commit 9cd7cfb

Please sign in to comment.