mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	types: fix some types
This commit is contained in:
		
							parent
							
								
									80328d2e20
								
							
						
					
					
						commit
						b87183cb75
					
				@ -1,6 +1,6 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { ref } from "vue";
 | 
			
		||||
const lists = ref<ForDataType<undefined>>([
 | 
			
		||||
const lists = ref([
 | 
			
		||||
  { type: "", label: "善良" },
 | 
			
		||||
  { type: "success", label: "好学" },
 | 
			
		||||
  { type: "info", label: "幽默" },
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ import SeamlessScroll from "/@/components/ReSeamlessScroll";
 | 
			
		||||
 | 
			
		||||
const scroll = templateRef<ElRef | null>("scroll", null);
 | 
			
		||||
 | 
			
		||||
let listData = ref<ForDataType<undefined>>([
 | 
			
		||||
let listData = ref([
 | 
			
		||||
  {
 | 
			
		||||
    date: "2021-09-01",
 | 
			
		||||
    name: "vue-pure-admin",
 | 
			
		||||
 | 
			
		||||
@ -85,6 +85,7 @@ function backHome() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function handleResize() {
 | 
			
		||||
  // @ts-ignore
 | 
			
		||||
  menuRef.value.handleResize();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@ let lists = ref<Array<Object>>([
 | 
			
		||||
  { people: "cn", id: 4, name: "www.google.com" }
 | 
			
		||||
]);
 | 
			
		||||
 | 
			
		||||
let cutLists = ref<Array<Object>>([
 | 
			
		||||
let cutLists = ref([
 | 
			
		||||
  { people: "cn", id: 1, name: "cut1" },
 | 
			
		||||
  { people: "cn", id: 2, name: "cut2" },
 | 
			
		||||
  { people: "cn", id: 3, name: "cut3" },
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@ import SeamlessScroll from "/@/components/ReSeamlessScroll";
 | 
			
		||||
// eslint-disable-next-line no-undef
 | 
			
		||||
const scroll = templateRef<ElRef | null>("scroll", null);
 | 
			
		||||
 | 
			
		||||
let listData = ref<ForDataType<undefined>>([
 | 
			
		||||
let listData = ref([
 | 
			
		||||
  {
 | 
			
		||||
    title: "无缝滚动第一行无缝滚动第一行!!!!!!!!!!"
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@ import { ref } from "vue";
 | 
			
		||||
import Selector from "/@/components/ReSelector";
 | 
			
		||||
 | 
			
		||||
let selectRange = ref<string>("");
 | 
			
		||||
let dataLists = ref<ForDataType<undefined>>([
 | 
			
		||||
let dataLists = ref([
 | 
			
		||||
  {
 | 
			
		||||
    title: "基本使用",
 | 
			
		||||
    echo: [],
 | 
			
		||||
 | 
			
		||||
@ -1,16 +1,17 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { reactive, onBeforeMount } from "vue";
 | 
			
		||||
import info, { ContextProps } from "../components/ReInfo/index.vue";
 | 
			
		||||
import { getVerify, getLogin } from "/@/api/user";
 | 
			
		||||
import { infoType } from "./type";
 | 
			
		||||
import { useRouter } from "vue-router";
 | 
			
		||||
import { reactive, onBeforeMount } from "vue";
 | 
			
		||||
import { getVerify, getLogin } from "/@/api/user";
 | 
			
		||||
import { storageSession } from "/@/utils/storage";
 | 
			
		||||
import { warnMessage, successMessage } from "/@/utils/message";
 | 
			
		||||
import info, { ContextProps } from "../components/ReInfo/index.vue";
 | 
			
		||||
 | 
			
		||||
const router = useRouter();
 | 
			
		||||
 | 
			
		||||
// 刷新验证码
 | 
			
		||||
const refreshGetVerify = async () => {
 | 
			
		||||
  let { svg } = await getVerify();
 | 
			
		||||
  let { svg }: infoType = await getVerify();
 | 
			
		||||
  contextInfo.svg = svg;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -29,7 +30,7 @@ const toPage = (info: Object): void => {
 | 
			
		||||
// 登录
 | 
			
		||||
const onLogin = async () => {
 | 
			
		||||
  let { userName, passWord, verify } = contextInfo;
 | 
			
		||||
  let { code, info, accessToken } = await getLogin({
 | 
			
		||||
  let { code, info, accessToken }: infoType = await getLogin({
 | 
			
		||||
    username: userName,
 | 
			
		||||
    password: passWord,
 | 
			
		||||
    verify: verify
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
import { ref } from "vue";
 | 
			
		||||
import { storageSession } from "/@/utils/storage";
 | 
			
		||||
 | 
			
		||||
const auth = ref<Boolean>(storageSession.getItem("info").username || "admin");
 | 
			
		||||
const auth = ref<boolean>(storageSession.getItem("info").username || "admin");
 | 
			
		||||
 | 
			
		||||
function changRole(value) {
 | 
			
		||||
  storageSession.setItem("info", {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										6
									
								
								src/views/type.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/views/type.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
export type infoType = {
 | 
			
		||||
  svg?: string;
 | 
			
		||||
  code?: number;
 | 
			
		||||
  info?: string;
 | 
			
		||||
  accessToken?: string;
 | 
			
		||||
};
 | 
			
		||||
@ -1,6 +1,4 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { ref, shallowRef, computed, onBeforeMount } from "vue";
 | 
			
		||||
import { useAppStoreHook } from "/@/store/modules/app";
 | 
			
		||||
import {
 | 
			
		||||
  ReGithub,
 | 
			
		||||
  ReInfinite,
 | 
			
		||||
@ -8,10 +6,12 @@ import {
 | 
			
		||||
  ReLine,
 | 
			
		||||
  ReBar
 | 
			
		||||
} from "/@/components/ReCharts/index";
 | 
			
		||||
import { useAppStoreHook } from "/@/store/modules/app";
 | 
			
		||||
import { ref, shallowRef, computed, onBeforeMount } from "vue";
 | 
			
		||||
 | 
			
		||||
const date: Date = new Date();
 | 
			
		||||
let loading = ref<boolean>(true);
 | 
			
		||||
const componentList = shallowRef<ForDataType<undefined>>([]);
 | 
			
		||||
const componentList = shallowRef([]);
 | 
			
		||||
 | 
			
		||||
setTimeout(() => {
 | 
			
		||||
  loading.value = !loading.value;
 | 
			
		||||
@ -89,7 +89,6 @@ const openDepot = (): void => {
 | 
			
		||||
        <img
 | 
			
		||||
          src="https://avatars.githubusercontent.com/u/44761321?s=400&u=30907819abd29bb3779bc247910873e7c7f7c12f&v=4"
 | 
			
		||||
          title="直达仓库地址"
 | 
			
		||||
          alt
 | 
			
		||||
          @click="openDepot"
 | 
			
		||||
        />
 | 
			
		||||
        <span>{{ greetings }}</span>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user