* vite是什么?
* 一个前端的开发构建工具
* 当我们的项目组件变大时,会自觉的分文件、分组件等操作,缩减单文件的大小、增加可维护性,vite则可以帮我们管理,并且它有很多插件帮助我们开发。
目录
初始化
- 创建一个文件夹,比如这里创建一个叫 mimicrymusic 的文件夹:
- 然后进入这个文件夹,或是把它拖进vscode中:
- 可以进VSCode内,使用终端运行以下命令:
- 初始化生成包配置文件:npm init -y
- 生成package.json:
- -
- 内容如下:
- -
- 其中:
- name:项目名
- version:版本号
- description:项目描述
- main:js入口
- scripts:配置用于npm的命令
- keywords:(可以不要)
- author:作者信息(可以不要)
- license:开源协议
安装vite依赖
- 在终端中执行命令:npm i vite -D
- 安装vite的开发环境依赖:
- 等待一段时间的下载:
- 下载完成后我们刚刚的包配置文件package.json中就会有自动增加一个vite的依赖:
安装vue的依赖
- 在终端中执行命令:npm i vue
- 等待安装完成以后,package.json中就会自动增加vue的配置:
创建index.html
- 在项目的根位置,即和package.json同级的位置创建一个index.html文件:
- 里面写如下内容:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>标题</title>
</head>
<body>
<!-- 引用的js文件位置 -->
<script type="module" src=""></script>
</body>
</html>
- 正如上面代码中注释所说,script标签引入了一个js文件到index.html,但我们还没有指定引入哪一个js文件,下面我们将创建这个文件,然后在引入。
创建main.js
- 在项目根位置创建src目录,然后在src内创建main.js文件:
- 里面我们可以先随便写一句输出: console.log("hello coolight");
- 保存文件
- 在我们刚刚的index.html中引入main.js文件:
<!-- 引用的js文件 -->
<script type="module" src="./src/main.js"></script>
- 在package.json中配置npm命令,即把里面的scripts的内容改为 "dev" : "vite"
尝试让它跑起来(1)
- 在终端中敲 npm run dev,就会有如下信息提示
- 键盘按住ctrl,然后鼠标左键点击终端里图中框起来的链接(不要点我的图,点你的终端里的!!!):
- 它就会跳转到浏览器,显示我们刚刚写的页面
- 一片空白则是正常的,因为我们的页面并没有写东西
- 我们的js也只写了一句输出,这时候要在浏览器中打开控制台看看有没有这句输出
- 浏览器中来到我们写的页面
- 在浏览器中按一下键盘F12键
- 浏览器就会弹出一个窗口:
- 此时点击控制台,就可以看见我们的main.js的输出了:
创建App.vue
- 在src目录下,新建 App.vue 文件:
- 内容可以随便写点,比如:
<template>
<div>
你好 coolight
</div>
</template>
在main.js中创建vue,安装vitejs
- 修改main.js的内容为:
import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
app.mount('#app')
- 可以看到,我们在main.js中创建的vue需要一个挂载点,在html中一个id为 app 的元素
- 所以我们需要在index.html中增加一个 <div id="app"></div> :
- 保存文件
- 此时你可能发现,欸vite好像报错了:
- [vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
- 浏览器里我们的页面也有报错:
- 它的意思很明显,需要我们去安装 @vitejs/plugin-vue,因为浏览器正常执行不了vue文件,所以需要安装插件来编译解析。
- 那么我们就来安装它。
- 如果你的终端vite还在运行,也就是没有显示提示让你输入,就像这样:
- 那么就按键盘ctrl + c ,停止掉vite
- 它会问你 终止批处理操作吗(Y/N)?
- 我们输入 y ,然后回车即可
- 然后再输入 npm i @vitejs/plugin-vue -D
- 等待下载安装:
- 然后在项目根目录创建vite的配置文件:vite.config.js
- 里面写如下配置:
import { defineConfig } from "vite"
import Vue from "@vitejs/plugin-vue"
export default defineConfig({
plugins:[
Vue()
]
})
- 保存文件
- 在终端中执行 npm run dev
- 然后回到浏览器中看看我们的页面,就会发现已经正常了!
结语
- 这个是手动配置的方法,其实有很简单的一键操作。
- 后面我们聊聊给手动配置路由router,状态管理pinia等
odering doxycycline online doxycycline doxylin
http://doxycyclinest.pro/# doxycycline generic
buy doxycycline online: buy doxycycline without prescription – doxycycline generic
buy diflucan: how to buy diflucan – diflucan tablet 100 mg
diflucan 200 mg tablet diflucan discount coupon can i buy diflucan in mexico
buy cipro online: cipro generic – ciprofloxacin
Intro
betvisa vietnam
Betvisa vietnam | Grand Prize Breakout!
Betway Highlights | 499,000 Extra Bonus on betvisa com!
Cockfight to win up to 3,888,000 on betvisa game
Daily Deposit, Sunday Bonus on betvisa app 888,000!
#betvisavietnam
200% Bonus on instant deposits—start your win streak!
200% welcome bonus! Slots and Fishing Games
https://www.betvisa.com/
#betvisavietnam #betvisagame #betvisaapp
#betvisacom #betvisacasinoapp
Birthday bash? Up to 1,800,000 in prizes! Enjoy!
Friday Shopping Frenzy betvisa vietnam 100,000 VND!
Betvisa Casino App Daily Login 12% Bonus Up to 1,500,000VND!
Khám phá Thế Giới Cá Cược Trực Tuyến với BetVisa!
Hệ thống BetVisa, một trong những nền tảng hàng đầu tại châu Á, ra đời vào năm 2017 và thao tác dưới phê chuẩn của Curacao, đã thu hút hơn 2 triệu người dùng trên toàn thế giới. Với cam kết đem đến trải nghiệm cá cược an toàn và tin cậy nhất, BetVisa nhanh chóng trở thành lựa chọn hàng đầu của người chơi trực tuyến.
BetVisa không chỉ cung cấp các trò chơi phong phú như xổ số, sòng bạc trực tiếp, thể thao trực tiếp và thể thao điện tử, mà còn mang đến cho người chơi những ưu đãi hấp dẫn. Thành viên mới đăng ký sẽ được tặng ngay 5 vòng quay miễn phí và có cơ hội giành giải thưởng lớn.
Đặc biệt, BetVisa hỗ trợ nhiều hình thức thanh toán linh hoạt như Betvisa Vietnam, cùng với các ưu đãi độc quyền như thưởng chào mừng lên đến 200%. Bên cạnh đó, hàng tuần còn có các chương trình khuyến mãi độc đáo như chương trình giải thưởng Sinh Nhật và Chủ Nhật Mua Sắm Điên Cuồng, mang đến cho người chơi cơ hội thắng lớn.
Nhờ vào lời hứa về trải nghiệm thú vị cá cược tinh vi nhất và dịch vụ khách hàng chuyên trách, BetVisa tự hào là điểm đến lý tưởng cho những ai nhiệt huyết trò chơi trực tuyến. Hãy tham gia ngay hôm nay và bắt đầu cuộc hành trình của bạn tại BetVisa – nơi niềm vui và may mắn chính là điều quan trọng.
JDB demo
JDB demo | The easiest bet software to use (jdb games)
JDB bet marketing: The first bonus that players care about
Most popular player bonus: Daily Play 2000 Rewards
Game developers online who are always with you
#jdbdemo
Where to find the best game developer? https://www.jdbgaming.com/
#gamedeveloperonline #betsoftware #betmarketing
#developerbet #betingsoftware #gamedeveloper
Supports hot jdb demo beting software jdb angry bird
JDB slot demo supports various competition plans
Revealing Achievement with JDB Gaming: Your Supreme Betting Software Resolution
In the world of internet gaming, discovering the correct bet software is critical for prosperity. Introducing JDB Gaming – a leading source of creative gaming answers tailored to enhance the gaming experience and boost earnings for operators. With a emphasis on user-friendly interfaces, attractive bonuses, and a diverse array of games, JDB Gaming emerges as a leading choice for both players and operators alike.
JDB Demo offers a look into the world of JDB Gaming, providing players with an opportunity to experience the excitement of betting without any danger. With simple interfaces and smooth navigation, JDB Demo allows it easy for players to discover the extensive selection of games on offer, from classic slots to immersive arcade titles.
When it regards bonuses, JDB Bet Marketing paves the way with attractive offers that draw players and keep them coming back for more. From the well-liked Daily Play 2000 Rewards to exclusive promotions, JDB Bet Marketing ensures that players are rewarded for their allegiance and dedication.
With so many game developers online, identifying the best can be a daunting task. However, JDB Gaming emerges from the crowd with its commitment to superiority and innovation. With over 150 online casino games to select, JDB Gaming offers something special for everyone, whether you’re a fan of slots, fish shooting games, arcade titles, card games, or bingo.
At the heart of JDB Gaming lies a commitment to providing the greatest possible gaming experience players. With a concentration on Asian culture and stunning 3D animations, JDB Gaming stands out as a leader in the industry. Whether you’re a gamer seeking excitement or an operator seeking a trustworthy partner, JDB Gaming has you covered.
API Integration: Effortlessly connect with all platforms for maximum business chances. Big Data Analysis: Keep ahead of market trends and comprehend player habits with thorough data analysis. 24/7 Technical Support: Relish peace of mind with expert and trustworthy technical support available all day, every day.
In conclusion, JDB Gaming provides a successful combination of cutting-edge technology, enticing bonuses, and unmatched support. Whether you’re a player or an operator, JDB Gaming has everything you need to excel in the realm of online gaming. So why wait? Join the JDB Gaming community today and unlock your full potential!
где купить аттестат http://www.2diplom-grupp.ru/ .
buy doxycycline without prescription uk: generic doxycycline – doxycycline hyclate
buy cytotec over the counter: buy cytotec online – buy cytotec
buy cytotec pills online cheap Misoprostol 200 mg buy online buy cytotec pills
App cá độ:Hướng dẫn tải app cá cược uy tín RG777 đúng cách
Bạn có biết? Tải app cá độ đúng cách sẽ giúp tiết kiệm thời gian đăng nhập, tăng tính an toàn và bảo mật cho tài khoản của bạn! Vậy đâu là cách để tải một app cá cược uy tín dễ dàng và chính xác? Xem ngay bài viết này nếu bạn muốn chơi cá cược trực tuyến an toàn!
tải về ngay lập tức
RG777 – Nhà Cái Uy Tín Hàng Đầu Việt Nam
Link tải app cá độ nét nhất 2023:RG777
Để đảm bảo việc tải ứng dụng cá cược của bạn an toàn và nhanh chóng, người chơi có thể sử dụng đường link sau.
tải về ngay lập tức
diflucan over the counter singapore: order diflucan online cheap – best diflucan price
Вывоз мусора с грузчиками https://vivozmusora67.ru/
buy cipro online without prescription: buy ciprofloxacin – antibiotics cipro
albuterol online buy – order fluticasone for sale purchase theophylline online
台中外送茶
現代社會,快遞已成為大眾化的服務業,吸引了許多人的注意和參與。 與傳統夜店、酒吧不同,外帶提供了更私密、便捷的服務方式,讓人們有機會在家中或特定地點與美女共度美好時光。
多樣化選擇
從台灣到日本,馬來西亞到越南,外送業提供了多樣化的女孩選擇,以滿足不同人群的需求和喜好。 無論你喜歡什麼類型的女孩,你都可以在外賣行業找到合適的女孩。
不同的價格水平
價格範圍從實惠到豪華。 無論您的預算如何,您都可以找到適合您需求的女孩,享受優質的服務並度過愉快的時光。
快遞業高度重視安全和隱私保護,提供多種安全措施和保障,讓客戶放心使用服務,無需擔心個人資訊外洩或安全問題。
如果你想成為一名經驗豐富的外包司機,外包產業也將為你提供廣泛的選擇和專屬服務。 只需按照步驟操作,您就可以輕鬆享受快遞行業帶來的樂趣和便利。
蓬勃發展的快遞產業為人們提供了一種新的娛樂休閒方式,讓人們在忙碌的生活中得到放鬆,享受美好時光。
App cá độ:Hướng dẫn tải app cá cược uy tín RG777 đúng cách
Bạn có biết? Tải app cá độ đúng cách sẽ giúp tiết kiệm thời gian đăng nhập, tăng tính an toàn và bảo mật cho tài khoản của bạn! Vậy đâu là cách để tải một app cá cược uy tín dễ dàng và chính xác? Xem ngay bài viết này nếu bạn muốn chơi cá cược trực tuyến an toàn!
tải về ngay lập tức
RG777 – Nhà Cái Uy Tín Hàng Đầu Việt Nam
Link tải app cá độ nét nhất 2023:RG777
Để đảm bảo việc tải ứng dụng cá cược của bạn an toàn và nhanh chóng, người chơi có thể sử dụng đường link sau.
tải về ngay lập tức
ciprofloxacin mail online: cipro generic – ciprofloxacin mail online
doxycycline generic doxycycline 100mg tablets buy doxycycline online 270 tabs
https://ciprofloxacin.guru/# antibiotics cipro
diflucan australia: diflucan canadian pharmacy – diflucan tablet 500mg
does tamoxifen cause bone loss: tamoxifen citrate – where can i buy nolvadex
diflucan online pharmacy: diflucan cream india – diflucan otc australia
tamoxifen skin changes tamoxifen hormone therapy tamoxifen postmenopausal
how much is over the counter diflucan: diflucan drug – diflucan pill over the counter
what is tamoxifen used for: tamoxifen joint pain – tamoxifen breast cancer prevention
robot 88
п»їcipro generic: buy cipro cheap – п»їcipro generic
buy cipro: ciprofloxacin over the counter – cipro online no prescription in the usa
JDB online
JDB online | 2024 best online slot game demo cash
How to earn reels? jdb online accumulate spin get bonus
Hot demo fun: Quick earn bonus for ranking demo
JDB demo for win? JDB reward can be exchanged to real cash
#jdbonline
777 sign up and get free 2,000 cash: https://www.jdb777.io/
#jdbonline #democash #demofun #777signup
#rankingdemo #demoforwin
2000 cash: Enter email to verify, enter verify, claim jdb bonus
Play with JDB games an online platform in every countries.
Enjoy the Pleasure of Gaming!
Gratis to Join, Free to Play.
Sign Up and Obtain a Bonus!
REGISTER NOW AND RECEIVE 2000?
We encourage you to acquire a trial enjoyable welcome bonus for all new members! Plus, there are other unique promotions waiting for you!
Get more information
JDB – FREE TO JOIN
Straightforward to play, real profit
Participate in JDB today and indulge in fantastic games without any investment! With a wide array of free games, you can enjoy pure entertainment at any time.
Fast play, quick join
Treasure your time and opt for JDB’s swift games. Just a few easy steps and you’re set for an amazing gaming experience!
Register now and make money
Experience JDB: Instant play with no investment and the opportunity to win cash. Designed for effortless and lucrative play.
Dive into the Realm of Online Gaming Stimulation with Fun Slots Online!
Are you prepared to encounter the thrill of online gaming like never before? Search no further than Fun Slots Online, your ultimate stop for heart-pounding gameplay, endless entertainment, and thrilling winning opportunities!
At Fun Slots Online, we take pride ourselves on providing a wide array of captivating games designed to keep you engaged and amused for hours on end. From classic slot machines to innovative new releases, there’s something for everybody to relish. Plus, with our user-friendly interface and seamless gameplay experience, you’ll have no trouble diving straight into the activity and relishing every moment.
But that’s not all – we also offer a selection of unique promotions and bonuses to reward our loyal players. From greeting bonuses for new members to special rewards for our top players, there’s always something exciting happening at Fun Slots Online. And with our guarded payment system and 24-hour customer support, you can savor peace of mind conscious that you’re in good hands every step of the way.
So why wait? Enroll Fun Slots Online today and commence your journey towards thrilling victories and jaw-dropping prizes. Whether you’re a seasoned gamer or just starting out, there’s never been a better time to join the fun and stimulation at Fun Slots Online. Sign up now and let the games begin!
doxycycline generic vibramycin 100 mg doxycycline 100mg tablets
JDB demo
JDB demo | The easiest bet software to use (jdb games)
JDB bet marketing: The first bonus that players care about
Most popular player bonus: Daily Play 2000 Rewards
Game developers online who are always with you
#jdbdemo
Where to find the best game developer? https://www.jdbgaming.com/
#gamedeveloperonline #betsoftware #betmarketing
#developerbet #betingsoftware #gamedeveloper
Supports hot jdb demo beting software jdb angry bird
JDB slot demo supports various competition plans
Revealing Success with JDB Gaming: Your Supreme Bet Software Resolution
In the world of digital gaming, finding the right betting software is crucial for prosperity. Meet JDB Gaming – a premier source of revolutionary gaming solutions crafted to enhance the player experience and propel profits for operators. With a concentration on intuitive interfaces, enticing bonuses, and a varied selection of games, JDB Gaming stands out as a prime choice for both players and operators alike.
JDB Demo presents a peek into the realm of JDB Gaming, providing players with an opportunity to experience the excitement of betting without any danger. With user-friendly interfaces and seamless navigation, JDB Demo allows it simple for players to explore the vast selection of games on offer, from traditional slots to captivating arcade titles.
When it concerns bonuses, JDB Bet Marketing leads with enticing offers that draw players and maintain them coming back for more. From the favored Daily Play 2000 Rewards to unique promotions, JDB Bet Marketing ensures that players are compensated for their allegiance and dedication.
With so numerous game developers online, identifying the best can be a challenging task. However, JDB Gaming distinguishes itself from the pack with its commitment to excellence and innovation. With over 150 online casino games to choose from, JDB Gaming offers something for every player, whether you’re a fan of slots, fish shooting games, arcade titles, card games, or bingo.
At the center of JDB Gaming lies a dedication to providing the greatest possible gaming experience players. With a focus on Asian culture and stunning 3D animations, JDB Gaming distinguishes itself as a leader in the industry. Whether you’re a gamer seeking excitement or an provider seeking a reliable partner, JDB Gaming has you covered.
API Integration: Effortlessly connect with all platforms for optimal business prospects. Big Data Analysis: Keep ahead of market trends and understand player actions with extensive data analysis. 24/7 Technical Support: Experience peace of mind with skilled and trustworthy technical support accessible around the clock.
In conclusion, JDB Gaming provides a victorious combination of advanced technology, enticing bonuses, and unparalleled support. Whether you’re a player or an manager, JDB Gaming has all the things you need to thrive in the arena of online gaming. So why wait? Join the JDB Gaming community today and release your full potential!
ivermectin cost – buy aczone online order cefaclor 500mg pill
http://misoprostol.top/# order cytotec online
nolvadex price: tamoxifen citrate pct – tamoxifen effectiveness
где купить диплом http://www.1diplomy-grupp.ru/ .
doxycycline 150 mg online doxycycline buy doxycycline without prescription uk
tamoxifen breast cancer prevention: tamoxifen and grapefruit – tamoxifen adverse effects
buy cytotec online fast delivery: buy cytotec pills – buy cytotec pills
buy cytotec pills online cheap: buy cytotec pills – buy cytotec pills
Отличное впечатление получил, посетив сервисный центр техники Zanussi, который же располагается по ссылке Zanussi Rem. Специалисты центра продемонстрировали высочайший класс профессионализма, выполнив сказуемный и точный ремонт моей стиральной машины.
Мастера центра, в силу своей квалификации и богатому опыту, сумели точно диагностировать проблему и исправить ее в кратчайшие сроки. Кроме того, я был приятно удивлен отличным обслуживанием и приемлемыми ценами на услуги.
Несомненно, сервисный центр техники Zanussi является отличным выбором для тех, кто ценит профессионализм и эффективность. Сердечно рекомендую этот сервисный центр всем, кто столкнулся с проблемами со своей техникой Zanussi.
100mg doxycycline buy doxycycline hyclate 100mg without a rx doxycycline 100mg online
generic ivermectin – levofloxacin 250mg canada order cefaclor capsules
Почему наши сигналы – ваш оптимальный путь:
Мы все время на волне актуальных курсов и событий, которые оказывают влияние на криптовалюты. Это дает возможность нашему коллективу оперативно реагировать и предоставлять текущие сообщения.
Наш коллектив обладает глубинным понимание анализа и может обнаруживать крепкие и уязвимые аспекты для включения в сделку. Это способствует уменьшению рисков и повышению прибыли.
Мы применяем собственные боты для анализа данных для анализа графиков на все интервалах. Это помогает нашим специалистам доставать полную картину рынка.
Прежде подачей сигнала в нашем канале Telegram мы осуществляем тщательную ревизию всех сторон и подтверждаем возможное долгий или период короткой торговли. Это обеспечивает надежность и качественные характеристики наших подач.
Присоединяйтесь к нашему каналу к нашему прямо сейчас и получите доступ к проверенным торговым подачам, которые помогут вам вам добиться финансовых результатов на рынке криптовалют!
https://t.me/Investsany_bot
doxycycline generic: how to order doxycycline – buy doxycycline online uk
cytotec online buy cytotec buy cytotec online fast delivery
Почему наши сигналы на вход – ваш наилучший вариант:
Мы 24 часа в сутки на волне современных трендов и ситуаций, которые воздействуют на криптовалюты. Это способствует нашей команде мгновенно отвечать и предоставлять новые сигналы.
Наш состав имеет глубоким понимание анализа и умеет обнаруживать мощные и незащищенные аспекты для включения в сделку. Это способствует снижению рисков и максимизации прибыли.
Вместе с командой мы используем собственные боты для анализа данных для изучения графиков на все периодах времени. Это способствует нам получить всю картину рынка.
Перед опубликованием подача в нашем Telegram команда осуществляем детальную ревизию всех фасадов и подтверждаем допустимый долгий или шорт. Это обеспечивает верность и качественные показатели наших подач.
Присоединяйтесь к нашему каналу к нашему Telegram каналу прямо сейчас и получите доступ к подтвержденным торговым подачам, которые содействуют вам добиться финансового успеха на рынке криптовалют!
https://t.me/Investsany_bot
Почему наши сигналы – всегда лучший вариант:
Наша команда постоянно в курсе текущих тенденций и моментов, которые воздействуют на криптовалюты. Это дает возможность нашей команде мгновенно отвечать и подавать актуальные сообщения.
Наш коллектив обладает глубинным знание анализа по графику и может выделить мощные и уязвимые стороны для присоединения в сделку. Это способствует снижению угроз и повышению прибыли.
Мы же применяем собственные боты анализа для просмотра графиков на все интервалах. Это содействует нам получить всю картину рынка.
Прежде публикацией подачи в нашем канале Telegram мы осуществляем педантичную проверку все сторон и подтверждаем возможное лонг или период короткой торговли. Это обеспечивает надежность и качественные характеристики наших подач.
Присоединяйтесь к нашему каналу к нашему Telegram каналу прямо сейчас и получите доступ к подтвержденным торговым сигналам, которые содействуют вам достигнуть финансовых результатов на крипторынке!
https://t.me/Investsany_bot