zhanghaijun ea71d1c564 屏蔽门 添加状态和控制源 před 2 roky
..
.vscode 84fa23fb14 fix 设备测试界面显示添加 před 2 roky
demo 15540d1af5 界面打包 před 2 roky
public 882ec1569a canvas画图 před 2 roky
src ea71d1c564 屏蔽门 添加状态和控制源 před 2 roky
.editorconfig 2ca4dcc45e fix 设备测试界面显示添加 před 2 roky
.env.dev 4e13ae24b9 添加多环境配置,方便打包 před 2 roky
.env.prod 4e13ae24b9 添加多环境配置,方便打包 před 2 roky
.gitignore 054ee17587 canvas画图 před 2 roky
README.md 2ca4dcc45e fix 设备测试界面显示添加 před 2 roky
canvas.md 5b9d05209a canvas 初始化 před 2 roky
index.html 59e0ffe217 update:重命名web před 2 roky
package.json 4e13ae24b9 添加多环境配置,方便打包 před 2 roky
pnpm-lock.yaml c03fb83b31 添加echarts před 2 roky
tsconfig.json 7ee6cc130f fix 调试修复 před 2 roky
tsconfig.node.json 59e0ffe217 update:重命名web před 2 roky
vite.config.ts 4e13ae24b9 添加多环境配置,方便打包 před 2 roky

README.md

项目介绍

技术栈

Vue 3 + TypeScript + Vite

  • canvas
  • vue3
  • vuex
  • vue-router
  • typescript
  • vite
  • axios
  • element-plus
  • vant
  • mockjs
  • echarts
  • dayjs
  • js-cookie
  • nprogress
  • vue-i18n
  • pinia
  • pinia-plugin-persistedstate
  • pinia-plugin-persist

参考地址

VUE3 参数模板

<!-- 子组件 -->
<template>
  <h1>ts sample</h1>
  <p>{{ msg }}</p>
</template>
<script setup lang="ts">
// 第一种方式:分离模式
interface Props {
  msg?: string | number | boolean;
  title?: string[];
}
withDefaults(defineProps<Props>(), {
  msg: "hello",
  title: () => ["one", "two"],
});

// 第二种方式:组合模式
withDefaults(defineProps<{ msg?: string | number | boolean; title?: string }>(), {
  msg: "hello vite",
  title: "默认标题",
});

// 第三种方式:利用接口声明类型
interface testType {
  name: string;
  age: number;
}
const props = withDefaults(
  defineProps<{
    text: testType;
  }>(),
  {
    text: {
      name: "flying_dark_feather",
      age: 20,
    },
  }
);
</script>