mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 15:27:30 +08:00
Attributes initialization refactoring (#19)
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
import Grammar from "../serialization/Grammar.js"
|
||||
import AttributeInfo from "./AttributeInfo.js"
|
||||
import IEntity from "./IEntity.js"
|
||||
|
||||
var crypto
|
||||
if (typeof window === "undefined") {
|
||||
import("crypto").then(mod => crypto = mod.default).catch()
|
||||
} else {
|
||||
crypto = window.crypto
|
||||
}
|
||||
|
||||
export default class GuidEntity extends IEntity {
|
||||
|
||||
static attributes = {
|
||||
...super.attributes,
|
||||
value: {
|
||||
default: "",
|
||||
},
|
||||
}
|
||||
static {
|
||||
this.cleanupAttributes(this.attributes)
|
||||
value: AttributeInfo.createValue(""),
|
||||
}
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user