@weig_3078/cli-demo 0.1.1 → 0.1.2
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/app1/.eslintrc.cjs +42 -0
- package/app1/.prettierrc.json +8 -0
- package/app1/.vscode/extensions.json +7 -0
- package/app1/README.md +91 -0
- package/app1/cypress/e2e/example.cy.ts +8 -0
- package/app1/cypress/e2e/tsconfig.json +8 -0
- package/app1/cypress/fixtures/example.json +5 -0
- package/app1/cypress/support/commands.ts +39 -0
- package/app1/cypress/support/e2e.ts +20 -0
- package/app1/cypress.config.ts +8 -0
- package/app1/env.d.ts +1 -0
- package/app1/index.html +13 -0
- package/app1/package.json +48 -0
- package/app1/pnpm-lock.yaml +4438 -0
- package/app1/public/favicon.ico +0 -0
- package/app1/public/index.html +20 -0
- package/app1/public/vue.js +11909 -0
- package/app1/src/App.vue +63 -0
- package/app1/src/assets/base.css +86 -0
- package/app1/src/assets/logo.svg +1 -0
- package/app1/src/assets/main.css +32 -0
- package/app1/src/components/HelloWorld.vue +36 -0
- package/app1/src/components/Rate.vue +12 -0
- package/app1/src/components/Rate1.vue +23 -0
- package/app1/src/components/Rate2.vue +60 -0
- package/app1/src/components/TheWelcome.vue +88 -0
- package/app1/src/components/Watermark.vue +74 -0
- package/app1/src/components/WelcomeItem.vue +87 -0
- package/app1/src/components/__tests__/HelloWorld.spec.ts +11 -0
- package/app1/src/components/icons/IconCommunity.vue +7 -0
- package/app1/src/components/icons/IconDocumentation.vue +7 -0
- package/app1/src/components/icons/IconEcosystem.vue +7 -0
- package/app1/src/components/icons/IconSupport.vue +7 -0
- package/app1/src/components/icons/IconTooling.vue +19 -0
- package/app1/src/components/useWaterMarkBg.ts +32 -0
- package/app1/src/main.ts +14 -0
- package/app1/src/router/index.ts +35 -0
- package/app1/src/stores/counter.ts +12 -0
- package/app1/src/views/AboutView.vue +92 -0
- package/app1/src/views/ChunkView.vue +45 -0
- package/app1/src/views/HomeView.vue +13 -0
- package/app1/src/views/RateView.vue +24 -0
- package/app1/test/a.js +16 -0
- package/app1/tsconfig.app.json +14 -0
- package/app1/tsconfig.json +17 -0
- package/app1/tsconfig.node.json +19 -0
- package/app1/tsconfig.vitest.json +11 -0
- package/app1/vite.config.ts +16 -0
- package/app1/vitest.config.ts +14 -0
- package/app1/z/346/226/207/346/241/243//345/255/246/344/271/240/347/274/226/347/250/213/346/234/254/350/264/250.md +129 -0
- package/app1/z/346/226/207/346/241/243//346/235/203/351/231/220/346/216/247/345/210/266.md +342 -0
- package/package.json +5 -3
package/app1/src/main.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './assets/main.css'
|
|
2
|
+
|
|
3
|
+
import { createApp } from 'vue'
|
|
4
|
+
import { createPinia } from 'pinia'
|
|
5
|
+
|
|
6
|
+
import App from './App.vue'
|
|
7
|
+
import router from './router'
|
|
8
|
+
|
|
9
|
+
const app = createApp(App)
|
|
10
|
+
|
|
11
|
+
app.use(createPinia())
|
|
12
|
+
app.use(router)
|
|
13
|
+
|
|
14
|
+
app.mount('#app')
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
+
import HomeView from '../views/HomeView.vue'
|
|
3
|
+
import ChunkView from '../views/ChunkView.vue';
|
|
4
|
+
import RateView from '../views/RateView.vue';
|
|
5
|
+
|
|
6
|
+
const router = createRouter({
|
|
7
|
+
history: createWebHistory(import.meta.env.BASE_URL),
|
|
8
|
+
routes: [
|
|
9
|
+
{
|
|
10
|
+
path: '/',
|
|
11
|
+
name: 'home',
|
|
12
|
+
component: HomeView
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
path: '/rate',
|
|
16
|
+
name: 'rate',
|
|
17
|
+
component: RateView
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
path: '/chunk',
|
|
21
|
+
name: 'chunk',
|
|
22
|
+
component: ChunkView
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
path: '/about',
|
|
26
|
+
name: 'about',
|
|
27
|
+
// route level code-splitting
|
|
28
|
+
// this generates a separate chunk (About.[hash].js) for this route
|
|
29
|
+
// which is lazy-loaded when the route is visited.
|
|
30
|
+
component: () => import('../views/AboutView.vue')
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export default router
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ref, computed } from 'vue'
|
|
2
|
+
import { defineStore } from 'pinia'
|
|
3
|
+
|
|
4
|
+
export const useCounterStore = defineStore('counter', () => {
|
|
5
|
+
const count = ref(0)
|
|
6
|
+
const doubleCount = computed(() => count.value * 2)
|
|
7
|
+
function increment() {
|
|
8
|
+
count.value++
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return { count, doubleCount, increment }
|
|
12
|
+
})
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="about">
|
|
3
|
+
<table>
|
|
4
|
+
<thead>
|
|
5
|
+
<td><input type="checkbox" @change="checkAll" />全选</td>
|
|
6
|
+
<td>ID</td>
|
|
7
|
+
<td>名字</td>
|
|
8
|
+
<td>年龄</td>
|
|
9
|
+
</thead>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr v-for="item in arrs" :key="item.id">
|
|
12
|
+
<td><input type="checkbox" :checked="checkedList.indexOf(item.id) !== -1 " :value="item.id" /></td>
|
|
13
|
+
<td>{{ item.id }}</td>
|
|
14
|
+
<td>{{ item.name }}</td>
|
|
15
|
+
<td>{{ item.age }}</td>
|
|
16
|
+
</tr>
|
|
17
|
+
</tbody>
|
|
18
|
+
</table>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { reactive, ref } from 'vue';
|
|
23
|
+
interface IUser {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
checked: boolean;
|
|
27
|
+
age: number;
|
|
28
|
+
}
|
|
29
|
+
let checkedList = reactive<number[]>([])
|
|
30
|
+
let arrs = reactive<IUser[]>([]);
|
|
31
|
+
// for (let i = 0; i < 3000; i++) {
|
|
32
|
+
// arrs.push({
|
|
33
|
+
// id: i,
|
|
34
|
+
// name: `大伟${i}`,
|
|
35
|
+
// checked: false,
|
|
36
|
+
// age: Math.floor(Math.random() * 18)
|
|
37
|
+
// });
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
let index = 0;
|
|
43
|
+
function sliceTask() {
|
|
44
|
+
requestAnimationFrame(() => {
|
|
45
|
+
let target = index + 300;
|
|
46
|
+
for (; index < target; index++) {
|
|
47
|
+
arrs.push({
|
|
48
|
+
id: index,
|
|
49
|
+
name: `大伟${index}`,
|
|
50
|
+
checked: false,
|
|
51
|
+
age: Math.floor(Math.random() * 18)
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (index < 3000) {
|
|
55
|
+
sliceTask();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
sliceTask();
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
function checkAll() {
|
|
64
|
+
// for (let i = 0; i < arrs.length; i++) {
|
|
65
|
+
// checkedList.push(arrs[i].id);
|
|
66
|
+
// }
|
|
67
|
+
let index = 0;
|
|
68
|
+
function sliceCheck() {
|
|
69
|
+
requestAnimationFrame(() => {
|
|
70
|
+
let target = index + 300;
|
|
71
|
+
for(; index < target; index++) {
|
|
72
|
+
checkedList.push(arrs[index]?.id);
|
|
73
|
+
}
|
|
74
|
+
if (index < arrs.length) {
|
|
75
|
+
sliceCheck();
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
sliceCheck();
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
82
|
+
<style>
|
|
83
|
+
@media (min-width: 1024px) {
|
|
84
|
+
.about {
|
|
85
|
+
/* min-height: 100vh; */
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
91
|
+
|
|
92
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h1>chunk data</h1>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
async function loadText() {
|
|
8
|
+
const url = 'https://dawei-test-110.oss-cn-beijing.aliyuncs.com/test.txt?Expires=1720715989&OSSAccessKeyId=TMP.3KdbmjMMEpcCwJVjgYZUCwSqt36ujP2gF9tRxe68MAWSNFeWTHk5SK7XwMmHQxQUr3soXiK3T3N19j2FBXhd7YTHgXrfAR&Signature=UUO9FBM7tXZOUjw2GL3Hn24zKlI%3D&response-content-type=text%2Fplain%3Bcharset%3Dutf-8%3B';
|
|
9
|
+
const res = await fetch(url);
|
|
10
|
+
const reader = res?.body?.getReader();
|
|
11
|
+
// const { value, done } = await reader.read();
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// 新建一个文本解码器
|
|
15
|
+
const decoder = new TextDecoder();
|
|
16
|
+
// 使用 decoder.decode 将读取的切片数据传入进去,就会得到文本数据
|
|
17
|
+
// const text = decoder.decode(value);
|
|
18
|
+
// 打印一下 text,看看是否转化文本数据
|
|
19
|
+
// console.log("text >>> ", text);
|
|
20
|
+
|
|
21
|
+
// console.log(value, done);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// 为方便测试,我们声明一个变量,代表第几次读取 text 的值
|
|
25
|
+
let num = 0;
|
|
26
|
+
// for 无限定条件永远循环
|
|
27
|
+
for (;;) {
|
|
28
|
+
// 每一次循环都读取一次数据
|
|
29
|
+
const { value, done } = await reader!.read();
|
|
30
|
+
// 如果完成了直接退出
|
|
31
|
+
if (done) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
// 为完成读取文本
|
|
35
|
+
const text = decoder.decode(value);
|
|
36
|
+
// 输出 text
|
|
37
|
+
console.log(`${num++} text >>> `, text);
|
|
38
|
+
|
|
39
|
+
// const text = await res.text();
|
|
40
|
+
// console.log(text);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
loadText();
|
|
44
|
+
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Watermark from '../components/Watermark.vue';
|
|
3
|
+
</script>
|
|
4
|
+
<template>
|
|
5
|
+
<div>
|
|
6
|
+
<Watermark text="大伟">
|
|
7
|
+
<div class="content">
|
|
8
|
+
文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容
|
|
9
|
+
文本内容文本内容文本内容文本内容文本内容文本内容文本内容文本内容
|
|
10
|
+
</div>
|
|
11
|
+
</Watermark>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="rate">
|
|
3
|
+
<Rate :value="5" />
|
|
4
|
+
<Rate :value="4" />
|
|
5
|
+
<Rate :value="3" />
|
|
6
|
+
<Rate1 :value="2" theme="blue" />
|
|
7
|
+
<Rate2 :value="score" theme="red" @update-rate="update" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { ref } from 'vue';
|
|
12
|
+
import Rate from '../components/Rate.vue';
|
|
13
|
+
import Rate1 from '../components/Rate1.vue';
|
|
14
|
+
import Rate2 from '../components/Rate2.vue';
|
|
15
|
+
let score = ref(2);
|
|
16
|
+
const update = (value: number) => {
|
|
17
|
+
score.value = value;
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
<style scoped>
|
|
21
|
+
.rate {
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
package/app1/test/a.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
+
"exclude": ["src/**/__tests__/*"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"composite": true,
|
|
7
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
8
|
+
|
|
9
|
+
"baseUrl": ".",
|
|
10
|
+
"paths": {
|
|
11
|
+
"@/*": ["./src/*"]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@tsconfig/node20/tsconfig.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"vite.config.*",
|
|
5
|
+
"vitest.config.*",
|
|
6
|
+
"cypress.config.*",
|
|
7
|
+
"nightwatch.conf.*",
|
|
8
|
+
"playwright.config.*"
|
|
9
|
+
],
|
|
10
|
+
"compilerOptions": {
|
|
11
|
+
"composite": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
14
|
+
|
|
15
|
+
"module": "ESNext",
|
|
16
|
+
"moduleResolution": "Bundler",
|
|
17
|
+
"types": ["node"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url'
|
|
2
|
+
import { defineConfig } from 'vite'
|
|
3
|
+
import vue from '@vitejs/plugin-vue'
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
vue(),
|
|
9
|
+
],
|
|
10
|
+
resolve: {
|
|
11
|
+
alias: {
|
|
12
|
+
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
13
|
+
replacement: fileURLToPath(new URL('./src/components', import.meta.url))
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
|
|
3
|
+
import viteConfig from './vite.config'
|
|
4
|
+
|
|
5
|
+
export default mergeConfig(
|
|
6
|
+
viteConfig,
|
|
7
|
+
defineConfig({
|
|
8
|
+
test: {
|
|
9
|
+
environment: 'jsdom',
|
|
10
|
+
exclude: [...configDefaults.exclude, 'e2e/**'],
|
|
11
|
+
root: fileURLToPath(new URL('./', import.meta.url))
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
学习前端 框架
|
|
2
|
+
最重要的是不要把重心放到 html css js vue react 上
|
|
3
|
+
如果说
|
|
4
|
+
|
|
5
|
+
你觉得学框架 就是学他的各种api的使用
|
|
6
|
+
那太简单了
|
|
7
|
+
直接看他的官方api就完事了
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
你会发现你把官方的api看完了,或者类似的视频课程手把手带你写代码,你实现了一遍
|
|
11
|
+
|
|
12
|
+
让你自己独立去做其他的功能,你还是自己做不出来
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
所以我讲课也是一样, 视频教程,不可能把所有的功能都讲完,
|
|
18
|
+
|
|
19
|
+
这个是讲不完的, 也是学不完的
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
更重要的是 让你体验到
|
|
23
|
+
一个程序是怎么开发出来的,
|
|
24
|
+
也就是说要让你触碰到写代码编程的 的本质
|
|
25
|
+
|
|
26
|
+
什么是编程,代码
|
|
27
|
+
本质到底是啥
|
|
28
|
+
|
|
29
|
+
编程的本质其实就是交流
|
|
30
|
+
|
|
31
|
+
是人和计算机之间的交流的过程
|
|
32
|
+
|
|
33
|
+
提升编程能力,编码水平,
|
|
34
|
+
其实
|
|
35
|
+
就是提升与计算机之间的 交流沟通能力
|
|
36
|
+
|
|
37
|
+
交流沟通 思维就是 编码 思维
|
|
38
|
+
|
|
39
|
+
而沟通结果的好坏
|
|
40
|
+
不在乎你迟早用的多华丽
|
|
41
|
+
字眼有多生僻
|
|
42
|
+
句子有多长多复杂
|
|
43
|
+
|
|
44
|
+
你看那些框架的源码
|
|
45
|
+
每一行都平平无奇
|
|
46
|
+
|
|
47
|
+
但是把这些单个的代码组合起来,就能实现一个很牛的功能,或者框架,或者库
|
|
48
|
+
|
|
49
|
+
提升自己的技术水平,编码思维,
|
|
50
|
+
并没想象的那么复杂
|
|
51
|
+
|
|
52
|
+
你只需要知道关键点是什么
|
|
53
|
+
是你要深刻的理解对方是吧
|
|
54
|
+
|
|
55
|
+
学前端你要理解浏览器语言框架
|
|
56
|
+
|
|
57
|
+
你理解的越深刻
|
|
58
|
+
沟通的效果就会越好
|
|
59
|
+
沟通的成本就会越低
|
|
60
|
+
而不在乎你 学了多少语法规则
|
|
61
|
+
不是说这些东西不重要
|
|
62
|
+
但他们绝对不是最关键的
|
|
63
|
+
|
|
64
|
+
如果你不能充分的理解对方
|
|
65
|
+
你学再多的词汇也组织不起来
|
|
66
|
+
还是不知道该怎么去表达
|
|
67
|
+
|
|
68
|
+
这就是为什么我们的课程
|
|
69
|
+
特别强调原理的原因
|
|
70
|
+
你只有懂了浏览器是如何来看待你的
|
|
71
|
+
代码的框架是如何来运作的
|
|
72
|
+
|
|
73
|
+
你才能真正的消除
|
|
74
|
+
跟他们之间的沟通障碍
|
|
75
|
+
|
|
76
|
+
我们杜英呢
|
|
77
|
+
是专门做前端就业和再次体系的机构
|
|
78
|
+
我们培养过数万的学员
|
|
79
|
+
在此呢
|
|
80
|
+
借这个机会宣传一下我们的产品
|
|
81
|
+
我们的整个课程是袁老师主讲的
|
|
82
|
+
也就是我本人
|
|
83
|
+
|
|
84
|
+
内容的深度广度
|
|
85
|
+
授课能力
|
|
86
|
+
技术水平都在这摆着了
|
|
87
|
+
|
|
88
|
+
你自行判断
|
|
89
|
+
无论你是0基础到就业
|
|
90
|
+
还是在职提薪
|
|
91
|
+
|
|
92
|
+
袁老师都能够帮到你
|
|
93
|
+
至少能够省下你几年的功夫
|
|
94
|
+
还能够确保你高薪就业
|
|
95
|
+
|
|
96
|
+
我培养的学员里边
|
|
97
|
+
最高的是在美国
|
|
98
|
+
年薪18万
|
|
99
|
+
换算成人民币的话就是100多万
|
|
100
|
+
|
|
101
|
+
但这个是个例哈
|
|
102
|
+
在我们这学的比较优秀的话
|
|
103
|
+
基本上是在30万到50万之间
|
|
104
|
+
中等一点的话基本上就是二三十万就
|
|
105
|
+
|
|
106
|
+
这么个情况呃
|
|
107
|
+
我不太清楚你具体是什么情况啊
|
|
108
|
+
但是给你提升个10万20万的年薪
|
|
109
|
+
不是什么复杂的问题
|
|
110
|
+
|
|
111
|
+
你说句嚣张的话
|
|
112
|
+
在咱们it这个行业里边
|
|
113
|
+
但凡是出了名的企业
|
|
114
|
+
一定有我们陆一的学员
|
|
115
|
+
|
|
116
|
+
如果没有
|
|
117
|
+
|
|
118
|
+
那一定是这家企业还不够出名
|
|
119
|
+
而且呢我们本身的课程呢
|
|
120
|
+
并不贵其实买不买无所谓的
|
|
121
|
+
你可以多来了解了解
|
|
122
|
+
|
|
123
|
+
跟着袁老师学
|
|
124
|
+
你可以说半只脚已经踏入了一线大厂
|
|
125
|
+
就在我们这个行业里面
|
|
126
|
+
知识就是你的核心竞争力
|
|
127
|
+
我们这有你需要的一切
|
|
128
|
+
欢迎随时来找我们
|
|
129
|
+
|