乙巳🐍年

acc8226 的博客

Vue.js 是什么

Vue (读音 /vjuː/,类似于 view) 是一套用于构建用户界面的渐进式框架。与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用。Vue 的核心库只关注视图层,不仅易于上手,还便于与第三方库或既有项目整合。另一方面,当与现代化的工具链以及各种支持类库结合使用时,Vue 也完全能够为复杂的单页应用提供驱动。

安装 之 命令行工具 (CLI)

注:Vue CLI 现已处于维护模式! 现在官方推荐使用 create-vue 来创建基于 Vite 的新项目。

安装:

1
2
3
npm install -g @vue/cli --registry=https://registry.npmmirror.com
# OR
yarn global add @vue/cli
阅读全文 »

创建项目

1
npm create vue@latest

运行

1
2
3
cd <your-project-name>
npm install
npm run dev
阅读全文 »

开始

JQuery 是一个快速、小型和功能丰富的 JavaScript 库。它使 HTML 文档遍历和操作、事件处理、动画和 Ajax 之类的事情变得更加简单,并且提供了一个跨多种浏览器的易于使用的 API。通过多功能性和可扩展性的结合,jQuery 改变了数百万人编写 JavaScript 的方式。

ready 方法

当 DOM(文档对象模型) 已经加载,并且页面(包括图像)已经完全呈现时,会发生 ready 事件。

由于该事件在文档就绪后发生,因此把所有其他的 jQuery 事件和函数置于该事件中是非常好的做法。正如上面的例子中那样。

简写:

1
2
3
$(document).ready(function(){});
$().ready(function(){});
$(function(){});
阅读全文 »

新建流水线。

1
2
3
4
5
6
7
8
9
10
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
version: '1.0'
name: pipeline-20220806
displayName: pipeline-20220806
triggers:
trigger: auto
push:
branches:
prefix:
- ''
variables:
global:
- accessToken
- hostName
- repoPath
- userName
stages:
- name: stage-a8ac94d3
displayName: 未命名
strategy: naturally
trigger: auto
executor: []
steps:
- step: build@nodejs
name: build_nodejs
displayName: Nodejs 构建
nodeVersion: 17.8.0
commands:
- '# 设置NPM源,提升安装速度'
- npm config set registry https://registry.npmmirror.com
- '# 执行编译命令'
- npm install hexo-cli -g
- npm install
- hexo clean
- hexo g
- git config --global user.name "giteego"
- git config --global user.email "giteego@feipig.fun"
- git clone "https://$userName:$accessToken@$hostName/$userName/$repoPath"
- cd $userName/
- git rm -rf .
- cp -r ../public/* ./
- cp ./404/index.html ./404.html
- git add .
- git commit -m "committed by gitee go"
- git push origin master
caches:
- ~/.npm
- ~/.yarn
notify: []
strategy:
retry: '0'
阅读全文 »
0%