refactor: guid 通过 uni.$uv.guid() 调用

This commit is contained in:
菲鸽 2024-02-21 10:41:03 +08:00
parent a92b8dfedf
commit 6362422f5a

View File

@ -66,9 +66,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
// eslint-disable-next-line import/extensions
import { guid } from '@climblee/uv-ui/libs/function/index.js'
const list = ref([]) // const list = ref([]) //
const lists = reactive({ const lists = reactive({
list1: [], // list1: [], //
@ -126,7 +123,7 @@ const getData = (): Promise<{ data: any[] }> => {
const doFn = (i: number) => { const doFn = (i: number) => {
const randomIndex = Math.floor(Math.random() * 10) const randomIndex = Math.floor(Math.random() * 10)
return { return {
id: guid(), id: uni.$uv.guid(),
allowEdit: i === 0, allowEdit: i === 0,
image: imgs[randomIndex].url, image: imgs[randomIndex].url,
w: imgs[randomIndex].width, w: imgs[randomIndex].width,