You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
954 B
55 lines
954 B
<template>
|
|
<div>
|
|
<!-- <v-typical
|
|
class="blink"
|
|
:steps="['Hello', 1000, 'Hello World !', 500, 'Hello World ! 👋', 1000]"
|
|
:loop="Infinity"
|
|
:wrapper="'h2'"
|
|
></v-typical> -->
|
|
|
|
<p>
|
|
<span class="text">点击次数:</span>
|
|
<span>{{ count }}</span>
|
|
</p>
|
|
<button @click="onClick">count++</button>
|
|
<ps-tree :list="list"></ps-tree>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
// import VTypical from 'vue-typical'
|
|
import { convertTreeData } from "princess-ui/lib/tree"
|
|
|
|
const count = ref(0)
|
|
function onClick() {
|
|
count.value++
|
|
}
|
|
|
|
const list = ref(convertTreeData([
|
|
{
|
|
key: 1,
|
|
title: "1",
|
|
children: [
|
|
{
|
|
key: 5,
|
|
title: "5"
|
|
},
|
|
]
|
|
},
|
|
{
|
|
key: 2,
|
|
title: "2"
|
|
},
|
|
{
|
|
key: 3,
|
|
title: "3"
|
|
},
|
|
]))
|
|
</script>
|
|
|
|
<style>
|
|
.text {
|
|
font-size: 14px;
|
|
}
|
|
</style>
|
|
|