@policystudio/policy-studio-ui-vue 1.1.90-access.8 → 1.1.90-access.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-access.08",
3
+ "version": "1.1.90-access.09",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -70,7 +70,8 @@ const getComponentClass = computed(() => {
70
70
  })
71
71
 
72
72
  const instance = getCurrentInstance()
73
- const uniqueId = computed(() => `psui-switch-${instance.uid}`)
73
+ const uid = instance?.uid || Math.random().toString(36).slice(2)
74
+ const uniqueId = computed(() => `psui-switch-${uid}`)
74
75
 
75
76
  const change = () => {
76
77
  if (props.disabled) return
@@ -76,6 +76,7 @@
76
76
  <script setup>
77
77
  import PsRichTooltip from '../tooltip/PsRichTooltip.vue'
78
78
  import { ref, computed, useAttrs, getCurrentInstance } from 'vue'
79
+ import { useId } from 'vue'
79
80
 
80
81
  const props = defineProps({
81
82
  /**
@@ -195,7 +196,8 @@ const getComponentClass = computed(() => {
195
196
  })
196
197
 
197
198
  const instance = getCurrentInstance()
198
- const uniqueId = computed(() => `psui-input-${instance.uid}`)
199
+ const uid = instance?.uid || Math.random().toString(36).slice(2)
200
+ const uniqueId = computed(() => `psui-input-${uid}`)
199
201
 
200
202
  const onInputFocus = ($event) => {
201
203
  isFocus.value = true