Showing
1 changed file
with
21 additions
and
21 deletions
| ... | ... | @@ -12,31 +12,31 @@ |
| 12 | 12 | </div> |
| 13 | 13 | </template> |
| 14 | 14 | <script lang="ts"> |
| 15 | -import {defineComponent, onMounted, ref} from 'vue'; | |
| 15 | + import { defineComponent, onMounted, ref } from 'vue'; | |
| 16 | 16 | |
| 17 | -import {BasicTree, TreeItem} from '/@/components/Tree'; | |
| 18 | -import {getOrganizationList} from '/@/api/system/system'; | |
| 17 | + import { BasicTree, TreeItem } from '/@/components/Tree'; | |
| 18 | + import { getOrganizationList } from '/@/api/system/system'; | |
| 19 | 19 | |
| 20 | -export default defineComponent({ | |
| 21 | - name: 'OrganizationIdTree', | |
| 22 | - components: {BasicTree}, | |
| 20 | + export default defineComponent({ | |
| 21 | + name: 'OrganizationIdTree', | |
| 22 | + components: { BasicTree }, | |
| 23 | 23 | |
| 24 | - emits: ['select'], | |
| 25 | - setup(_, {emit}) { | |
| 26 | - const treeData = ref<TreeItem[]>([]); | |
| 24 | + emits: ['select'], | |
| 25 | + setup(_, { emit }) { | |
| 26 | + const treeData = ref<TreeItem[]>([]); | |
| 27 | 27 | |
| 28 | - async function fetch() { | |
| 29 | - treeData.value = (await getOrganizationList()) as unknown as TreeItem[]; | |
| 30 | - } | |
| 28 | + async function fetch() { | |
| 29 | + treeData.value = (await getOrganizationList()) as unknown as TreeItem[]; | |
| 30 | + } | |
| 31 | 31 | |
| 32 | - function handleSelect(keys) { | |
| 33 | - emit('select', keys[0]); | |
| 34 | - } | |
| 32 | + function handleSelect(keys) { | |
| 33 | + emit('select', keys[0]); | |
| 34 | + } | |
| 35 | 35 | |
| 36 | - onMounted(() => { | |
| 37 | - fetch(); | |
| 38 | - }); | |
| 39 | - return {treeData, handleSelect}; | |
| 40 | - }, | |
| 41 | -}); | |
| 36 | + onMounted(() => { | |
| 37 | + fetch(); | |
| 38 | + }); | |
| 39 | + return { treeData, handleSelect }; | |
| 40 | + }, | |
| 41 | + }); | |
| 42 | 42 | </script> | ... | ... |