We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5db365 commit 11f56adCopy full SHA for 11f56ad
src/mixins/safeId.js
@@ -1,15 +1,15 @@
1
export default{
2
computed: {
3
safeId () {
4
- if(this.id || this.$attrs.id)
+ if (this.id || this.$attrs.id) {
5
return this.id || this.$attrs.id
6
+ }
7
return generateSafeId()
8
}
9
10
11
12
function generateSafeId () {
- const key = Math.random().toString(36).replace('0.', '') +
13
- (new Date()).getTime().toString(36)
14
- return '__safe_id__' + key
+ const key = Math.random().toString(36).replace('0.', '')
+ return '_safe_id_' + key
15
0 commit comments