Skip to content

device

NPM version

Platform Support

Platform Support

Platform Support

Platform Support

Introduction:

Device Information Plugin

Method

getUUID

Obtain the unique device identifier UUID

The application deletion will not change it.

ts
import { 
devicePlugin
} from "@plaoc/plugins";
await
devicePlugin
.
getUUID
();

Plugin Usage

vue
<script setup lang="ts">
import { 
devicePlugin
} from "@plaoc/plugins";
async function
getUUID
() {
const {
uuid
} = await
devicePlugin
.
getUUID
();
} </script>

WebComponent Usage

vue
<script setup lang="ts">
import { 
onMounted
,
ref
} from "vue";
import {
HTMLDeviceElement
} from "@plaoc/plugins";
const
$devicePlugin
=
ref
<
HTMLDeviceElement
>();
let
config
:
HTMLDeviceElement
;
onMounted
(async () => {
config
=
$devicePlugin
.
value
!;
}); async function
getUUID
() {
const {
uuid
} = await
config
.
getUUID
();
} </script> <template> <
dweb-device
ref
="
$devicePlugin
"></
dweb-device
>
</template>

Released under the MIT License.