【Vue Shop】环境准备

Fork Me On Github

环境准备

项目语言选择

Typescript 本人最为熟悉,特别喜欢她的强类型,加入 vscode 这个开发工具的智能提示,简直不要太方便。

scss 喜欢她的嵌套

开发工具

node.js

vscode

插件

Paste JSON as Code 根据 json 生成 ts 代码

Vetur vue 的语言服务

Vue VSCode Snippets vue 代码块

安装环境

安装全局vue-cli脚手架

 
npm install --global @vue/cli
1

创建项目

 
vue create my-project-name
1

选择 Manually select features

选中(上下键+空格键) Babel TypeScript Router Vuex Linter / Formatter

输入三次 y

直接默认回车即可

安装 sass 支持

 
npm install -D sass-loader node-sass
1

运行

 
npm run serve
1

浏览器打开 http://localhost:8080

点击查看全文
0 185 0
42.1 ms
系统信息
Execution time42.1 ms
CPU usage user + system63 % + 7 %
Peak of allocated memory7.13 MB
Included files228
Classes + interfaces + traits142 + 29 + 26
Your IP3.137.151.130
Server IP172.21.0.9
HTTP method / response codeGET / 200
PHP8.4.2
Zodream5.1.0
Servernginx/1.27.3
运行信息
start0.0 ms
match route15.1 ms
controller response3.6 ms
db engine init6.6 ms
db engine end0.7 ms
db init end0.0 ms
view render5.4 ms
end42.4 ms
Queries(10)
[0.31ms] SELECT * FROM `blog` WHERE id = ? LIMIT 1
[0.25ms] SELECT * FROM `blog_term`
[0.59ms] SELECT term_id,COUNT(*) as count FROM `blog` WHERE parent_id = ? GROUP BY term_id
[0.43ms] SELECT id,language FROM `blog` WHERE parent_id = ?
[0.17ms] SELECT `tag_id` FROM `blog_tag_relationship` WHERE blog_id = ?
[0.21ms] SELECT `content`,`name` FROM `blog_meta` WHERE blog_id = ?
[0.21ms] SELECT id,name,avatar FROM `user` WHERE id in (?)
[0.3ms] SELECT id,title,thumb,parent_id,language,description,created_at FROM `blog` WHERE id < ? and language = ? and publish_status = ? ORDER BY id DESC LIMIT 1
[0.22ms] SELECT id,title,thumb,parent_id,language,description,created_at FROM `blog` WHERE id > ? and language = ? and publish_status = ? ORDER BY id ASC LIMIT 1
[0.21ms] SELECT * FROM `ad_position` WHERE code = ? and status = ? LIMIT 1
Views(5)
[Rendered] Module/Blog/UserInterface/layouts/header.php : 0.44ms
[Rendered] Module/Blog/UserInterface/Home/content.php : 3.27ms
[Rendered] Module/Blog/UserInterface/layouts/footer.php : 0.07ms
[Rendered] Module/Blog/UserInterface/Home/detail.php : 8.7ms
[Rendered] UserInterface/Home/layouts/main.php : 1.02ms