create-young-proj 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/package.json +1 -1
- package/template-nuxt-admin/nuxt.config.ts +4 -2
- package/template-nuxt-website/README.md +4 -0
- package/template-nuxt-website/composables/utils.ts +0 -4
- package/template-nuxt-website/nuxt.config.ts +3 -2
- package/template-nuxt-website/package.json +4 -5
- package/template-nuxt-website/server/api/get_footer_info.get.ts +3 -3
- package/template-nuxt-website/server/api/get_gray_status.get.ts +1 -0
- package/template-nuxt-website/server/api/get_head_nav.get.ts +1 -1
- package/template-nuxt-website/server/api/get_home_banner.get.ts +2 -2
- package/template-nuxt-website/server/routes/get/env.ts +13 -0
- package/template-nuxt-website/yarn.lock +1173 -1599
- package/template-uni-app/.vscode/vue-html.code-snippets +2 -7
- package/template-uni-app/README.md +2 -0
- package/template-uni-app/auto-imports.d.ts +718 -1
- package/template-uni-app/eslint.config.js +3 -1
- package/template-uni-app/package.json +11 -9
- package/template-uni-app/pnpm-lock.yaml +531 -866
- package/template-uni-app/src/manifest.json +1 -1
- package/template-uni-app/src/pages/index.vue +12 -9
- package/template-uni-app/src/pages/my.vue +6 -9
- package/template-uni-app/src/pages.json +1 -1
- package/template-uni-app/uni-pages.d.ts +24 -0
- package/template-uni-app/vite.config.ts +6 -3
- package/template-uni-app/.eslintignore +0 -1
- package/template-uni-app/.eslintrc +0 -16
@@ -1,17 +1,14 @@
|
|
1
1
|
<!--
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-18 11:23:36
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-11-15 11:04:49
|
5
5
|
* @Description:
|
6
6
|
-->
|
7
|
-
<route lang="
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"isback": false
|
13
|
-
}
|
14
|
-
}
|
7
|
+
<route lang="yaml">
|
8
|
+
needLogin: true
|
9
|
+
layout: tabbar
|
10
|
+
navbar:
|
11
|
+
isback: false
|
15
12
|
</route>
|
16
13
|
|
17
14
|
<script lang="ts" setup>
|
@@ -27,6 +24,8 @@ async function testPost() {
|
|
27
24
|
const { fullscreenLoading } = storeToRefs(useHttpLoading())
|
28
25
|
fullscreenLoading.value = true
|
29
26
|
|
27
|
+
const netWorkStatus = useNetwork()
|
28
|
+
|
30
29
|
setTimeout(() => {
|
31
30
|
fullscreenLoading.value = false
|
32
31
|
}, 3e3)
|
@@ -56,6 +55,10 @@ setTimeout(() => {
|
|
56
55
|
点我测试 Post 请求
|
57
56
|
</button>
|
58
57
|
|
58
|
+
{{
|
59
|
+
netWorkStatus
|
60
|
+
}}
|
61
|
+
|
59
62
|
<uni-card
|
60
63
|
title="基础卡片" sub-title="副标题" extra="额外信息"
|
61
64
|
thumbnail="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" @click="to(Pages.测试子页面)"
|
@@ -1,17 +1,14 @@
|
|
1
1
|
<!--
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-18 17:53:43
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-11-13 12:13:47
|
5
5
|
* @Description:
|
6
6
|
-->
|
7
|
-
<route lang="
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"isback": false
|
13
|
-
}
|
14
|
-
}
|
7
|
+
<route lang="yaml">
|
8
|
+
needLogin: true
|
9
|
+
layout: tabbar
|
10
|
+
navbar:
|
11
|
+
isback: false
|
15
12
|
</route>
|
16
13
|
|
17
14
|
<script lang="ts" setup>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
/* prettier-ignore */
|
3
|
+
// @ts-nocheck
|
4
|
+
// Generated by vite-plugin-uni-pages
|
5
|
+
|
6
|
+
interface NavigateToOptions {
|
7
|
+
url: "pages/index" |
|
8
|
+
"pages/my" |
|
9
|
+
"pages/demo/index";
|
10
|
+
}
|
11
|
+
interface RedirectToOptions extends NavigateToOptions {}
|
12
|
+
|
13
|
+
interface SwitchTabOptions {
|
14
|
+
url: "pages/index" | "pages/my"
|
15
|
+
}
|
16
|
+
|
17
|
+
type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
|
18
|
+
|
19
|
+
declare interface Uni {
|
20
|
+
navigateTo(options: UniNamespace.NavigateToOptions & NavigateToOptions): void;
|
21
|
+
redirectTo(options: UniNamespace.RedirectToOptions & RedirectToOptions): void;
|
22
|
+
switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
|
23
|
+
reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
|
24
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-18 11:03:01
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-11-15 11:08:28
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
7
|
import { resolve } from 'node:path'
|
@@ -15,6 +15,7 @@ import UniManifest from '@uni-helper/vite-plugin-uni-manifest'
|
|
15
15
|
import Unocss from 'unocss/vite'
|
16
16
|
import AutoImport from 'unplugin-auto-import/vite'
|
17
17
|
import AutoComponents from 'unplugin-vue-components/vite'
|
18
|
+
import { UniUseAutoImports } from '@uni-helper/uni-use'
|
18
19
|
import { multiConf } from './custom-plugins'
|
19
20
|
|
20
21
|
// https://vitejs.dev/config/
|
@@ -40,13 +41,15 @@ export default ({ command, mode }: ConfigEnv) => {
|
|
40
41
|
UniLayouts(),
|
41
42
|
// https://uni-helper.js.org/vite-plugin-uni-manifest
|
42
43
|
UniManifest(),
|
43
|
-
|
44
|
+
// hack
|
45
|
+
// @ts-expect-error packages.json 中 type: "module" 会造成这里解析的不同
|
46
|
+
Uni.default(),
|
44
47
|
// https://github.com/antfu/unocss
|
45
48
|
Unocss(),
|
46
49
|
|
47
50
|
// https://github.com/antfu/unplugin-auto-import
|
48
51
|
AutoImport({
|
49
|
-
imports: ['vue', 'uni-app', 'pinia'],
|
52
|
+
imports: ['vue', 'uni-app', 'pinia', '@vueuse/core', UniUseAutoImports],
|
50
53
|
dts: true,
|
51
54
|
vueTemplate: true,
|
52
55
|
dirs: [
|
@@ -1 +0,0 @@
|
|
1
|
-
src/uni_modules
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"root": true,
|
3
|
-
"extends": "@antfu",
|
4
|
-
"rules": {
|
5
|
-
"@typescript-eslint/no-use-before-define": "off",
|
6
|
-
"no-console": "off",
|
7
|
-
"n/prefer-global/process": "off",
|
8
|
-
"unused-imports/no-unused-vars": "off",
|
9
|
-
"@typescript-eslint/ban-types": "off",
|
10
|
-
"vue/valid-v-model": "off",
|
11
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
12
|
-
"no-throw-literal": "off",
|
13
|
-
"prefer-promise-reject-errors": "off",
|
14
|
-
"no-async-promise-executor": "off"
|
15
|
-
}
|
16
|
-
}
|