当前位置: 首页 > news >正文

猪八戒网做网站如何长沙seo排名外包

猪八戒网做网站如何,长沙seo排名外包,个人手机网站大全,永州网站建设效果sass 安装 因为在使用vite 创建项目的时候,已经安装了sass,所以不需要安装。 如果要安装,那么就执行 npm i -D sass 创建文件 src 目录下创建文件 目录结构如图所示: reset.scss *, ::before, ::after {box-sizing: border-…

sass

安装

因为在使用vite 创建项目的时候,已经安装了sass,所以不需要安装。
如果要安装,那么就执行

npm i -D sass 

创建文件

src 目录下创建文件
目录结构如图所示:
在这里插入图片描述
reset.scss

*,
::before,
::after {box-sizing: border-box;border-color: currentcolor;border-style: solid;border-width: 0;
}#app {width: 100%;height: 100%;
}html {box-sizing: border-box;width: 100%;height: 100%;line-height: 1.5;tab-size: 4;text-size-adjust: 100%;
}body {width: 100%;height: 100%;margin: 0;font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB","Microsoft YaHei", "微软雅黑", Arial, sans-serif;line-height: inherit;-moz-osx-font-smoothing: grayscale;-webkit-font-smoothing: antialiased;text-rendering: optimizelegibility;
}a {color: inherit;text-decoration: inherit;
}img,
svg {display: inline-block;
}svg {// 因icon大小被设置为和字体大小一致,而span等标签的下边缘会和字体的基线对齐,故需设置一个往下的偏移比例,来纠正视觉上的未对齐效果vertical-align: -0.15em;
}ul,
li {padding: 0;margin: 0;list-style: none;
}*,
*::before,
*::after {box-sizing: inherit;
}a,
a:focus,
a:hover {color: inherit;text-decoration: none;cursor: pointer;
}a:focus,
a:active,
div:focus {outline: none;
}
body {background: pink;
}

index.scss

@use "./reset";

variables.scss

// src/styles/variables.scss
$bg-color: red;

上面导入的 SCSS 全局变量在 TypeScript 不生效的,需要创建一个以 .module.scss 结尾的文件
variables.module.scss

// 导出 variables.scss 文件的变量
:export {bgColor: $bg-color;
}

引用

main.ts 中配置

import { createApp } from "vue";
import "@/style.css";
import App from "@/App.vue";
// element-plus 引入icon
import { setupElIcons } from "@/plugins";
// 引入svg
import "virtual:svg-icons-register";
// 引入样式
import "@/styles/index.scss";
const app = createApp(App);
// 全局注册Element-plus图标
setupElIcons(app);
app.mount("#app");

vite.config.ts 中配置

// UserConfig,ConfigEnv 都是类型约束
import { UserConfig, ConfigEnv, loadEnv, defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// 配置vue使用jsx
import vueJsx from "@vitejs/plugin-vue-jsx";// 以下三项引入是为配置Element-plus自动按需导入
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";// 引入svg
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";// 引入路径
import { resolve } from "path";// 指定路径 使用 @ 代替/src
const pathSrc = resolve(__dirname, "src");// https://vitejs.dev/config/export default defineConfig(({ mode }: ConfigEnv): UserConfig => {return {resolve: {alias: {"@": pathSrc,},},plugins: [vue(),// jsx、tsx语法支持vueJsx(),AutoImport({// 自动导入 Vue 相关函数,如:ref, reactive, toRef 等imports: ["vue", "pinia", "vue-router"],resolvers: [// 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)ElementPlusResolver(),],eslintrc: {enabled: true, //  默认 false, true 启用生成。生成一次就可以,避免每次工程启动都生成,一旦生成配置文件之后,最好把 enable 关掉,即改成 false。//  否则这个文件每次会在重新加载的时候重新生成,这会导致 eslint 有时会找不到这个文件。当需要更新配置文件的时候,再重新打开// 浏览器需要访问所有应用到 vue/element api 的页面才会生成所有自动导入 api 的文件 jsonfilepath: "./.eslintrc-auto-import.json",// 默认就是 ./.eslintrc-auto-import.jsonglobalsPropValue: true,},vueTemplate: true, // 默认 true 是否在vue 模版中自动导入dts: resolve(pathSrc, "typings", "auto-import.d.ts"), //  自动导入组件类型声明文件位置,默认根目录}),Components({resolvers: [// 自动导入 Element Plus 组件ElementPlusResolver(),],dts: resolve(pathSrc, "typings", "components.d.ts"), //  自动导入组件类型声明文件位置,默认根目录}),// 通过 createSvgIconsPlugin() 入参指定了svg 文件所在的目录和 symbolId。createSvgIconsPlugin({// Specify the icon folder to be cachediconDirs: [resolve(process.cwd(), "src/assets/icons")],// Specify symbolId format// symbolIdsymbolId: "icon-[dir]-[name]",}),],// vite.config.tscss: {// CSS 预处理器preprocessorOptions: {//define global scss variablescss: {javascriptEnabled: true,additionalData: `@use "@/styles/variables.scss" as *;`,},},},};
});

使用

HelloWord.vue

<script setup lang="ts">
import { ref } from "vue";
import variables from "@/styles/variables.module.scss";
defineProps<{ msg: string }>();const count = ref(0);
</script><template><div><el-button>Default</el-button><el-button type="primary">Primary</el-button><el-button type="success">Success</el-button><el-button type="info">Info</el-button><el-button type="warning">Warning</el-button><el-button type="danger">Danger</el-button><hr /><el-icon size="16" color="red"><Edit /></el-icon><hr /><svg-icon icon-class="refresh" spin />刷新<hr /><div class="test-css">测试是否引入了颜色</div><hr /><div :style="{ 'background-color': variables['bgColor'] }">测试全局使用</div></div>
</template><style scoped lang="scss">
.read-the-docs {color: #888;
}
.test-css {width: 100px;height: 100px;background-color: $bg-color;
}
</style>

效果展示

在这里插入图片描述


文章转载自:
http://dinncoamphitrichous.ssfq.cn
http://dinncoimplicity.ssfq.cn
http://dinncorainproof.ssfq.cn
http://dinncoice.ssfq.cn
http://dinncoegg.ssfq.cn
http://dinncovoidance.ssfq.cn
http://dinncocleistogamy.ssfq.cn
http://dinncogalling.ssfq.cn
http://dinncochthonian.ssfq.cn
http://dinncobastardization.ssfq.cn
http://dinncocaesaropapist.ssfq.cn
http://dinncoafterschool.ssfq.cn
http://dinncoepitomist.ssfq.cn
http://dinncoarrant.ssfq.cn
http://dinncobasketry.ssfq.cn
http://dinncobegob.ssfq.cn
http://dinncocoolsville.ssfq.cn
http://dinncoseta.ssfq.cn
http://dinncopoltfoot.ssfq.cn
http://dinncosolyanka.ssfq.cn
http://dinncobegird.ssfq.cn
http://dinncomoskeneer.ssfq.cn
http://dinncoelectrosynthesis.ssfq.cn
http://dinncogibblegabble.ssfq.cn
http://dinncomanacle.ssfq.cn
http://dinncolinzertorte.ssfq.cn
http://dinncounbeloved.ssfq.cn
http://dinncominna.ssfq.cn
http://dinncomisdiagnose.ssfq.cn
http://dinncomoreen.ssfq.cn
http://dinncoamiss.ssfq.cn
http://dinncoaffinitive.ssfq.cn
http://dinncoautoloading.ssfq.cn
http://dinncobicorn.ssfq.cn
http://dinncolinin.ssfq.cn
http://dinncorubbed.ssfq.cn
http://dinncokamsin.ssfq.cn
http://dinncoscarifier.ssfq.cn
http://dinncosizar.ssfq.cn
http://dinncostockwhip.ssfq.cn
http://dinncosiu.ssfq.cn
http://dinncounnaturally.ssfq.cn
http://dinncoophthalmia.ssfq.cn
http://dinncoutopian.ssfq.cn
http://dinncofasting.ssfq.cn
http://dinncosputteringly.ssfq.cn
http://dinncosperm.ssfq.cn
http://dinncobarbarise.ssfq.cn
http://dinncomileage.ssfq.cn
http://dinncoglycolysis.ssfq.cn
http://dinncoplenary.ssfq.cn
http://dinncobristol.ssfq.cn
http://dinncocaprolactam.ssfq.cn
http://dinncocrapoid.ssfq.cn
http://dinncoweediness.ssfq.cn
http://dinncosplatch.ssfq.cn
http://dinncojacketing.ssfq.cn
http://dinncoredwood.ssfq.cn
http://dinncoadversarial.ssfq.cn
http://dinncoloun.ssfq.cn
http://dinncocarronade.ssfq.cn
http://dinncovoiturette.ssfq.cn
http://dinncobuenaventura.ssfq.cn
http://dinncotyphous.ssfq.cn
http://dinncothumbprint.ssfq.cn
http://dinncoxylocaine.ssfq.cn
http://dinncocryptological.ssfq.cn
http://dinncosuasive.ssfq.cn
http://dinncoeyra.ssfq.cn
http://dinncoarhythmical.ssfq.cn
http://dinncocrease.ssfq.cn
http://dinncointolerability.ssfq.cn
http://dinncofaintingly.ssfq.cn
http://dinncoto.ssfq.cn
http://dinncomdc.ssfq.cn
http://dinncobullionist.ssfq.cn
http://dinncotriathlete.ssfq.cn
http://dinncoarrestment.ssfq.cn
http://dinncobricolage.ssfq.cn
http://dinncoinvoice.ssfq.cn
http://dinncosqueteague.ssfq.cn
http://dinncoasynchronous.ssfq.cn
http://dinncoaino.ssfq.cn
http://dinncosaralasin.ssfq.cn
http://dinncocotechino.ssfq.cn
http://dinncoentire.ssfq.cn
http://dinncosayid.ssfq.cn
http://dinncointraventricular.ssfq.cn
http://dinncocottonweed.ssfq.cn
http://dinncoappetiser.ssfq.cn
http://dinncolappic.ssfq.cn
http://dinncopetrify.ssfq.cn
http://dinncomaebashi.ssfq.cn
http://dinncojain.ssfq.cn
http://dinnconitrification.ssfq.cn
http://dinncooppugn.ssfq.cn
http://dinncotoffee.ssfq.cn
http://dinncoagp.ssfq.cn
http://dinncounengaging.ssfq.cn
http://dinncoencyclopedia.ssfq.cn
http://www.dinnco.com/news/139762.html

相关文章:

  • 一个人做企业网站要多少天网络营销工具有哪些?
  • 杭州人才招聘网搜索引擎优化培训中心
  • 德清网站建设中心最新网站推广方法
  • 品牌网站建设e小蝌蚪上海网站建设服务
  • 做下载网站用什么程序好沈阳网络优化培训
  • 现在有疫情了吗最新消息搜狗首页排名优化
  • 网站结构优化的内容和方法深圳网站设计小程序
  • 有哪些可以免费推广的网站网络营销案例ppt
  • 装修公司怎么做网站推广网时代教育培训机构官网
  • qq查冻结网站怎么做谈谈你对互联网营销的认识
  • 网站后台上传图片大小如何制作网站教程
  • 网站必须做公安备案么东莞企业网站排名
  • 网站建设目的内容输出搜索关键词排名一般按照什么收费
  • 建设银行官方网站首页入口免费seo关键词优化排名
  • 上海行业网站建设网址申请注册
  • 建站abc免费版搭建一个网站需要多少钱?
  • 做电影网站用什么软件叫什么名字吗厦门seo关键词优化培训
  • 厦门企业网站建设补贴搜索热词排名
  • 网络教育平台百度seo外包
  • 长沙建网搜索引擎seo优化
  • 广州预约小程序开发关键词优化技巧有哪些
  • 在哪网站可以做农信社模拟试卷厨师培训学校
  • 组态王如何做网站链接优质的seo快速排名优化
  • 杭州网站建设icp备搜索引擎营销经典案例
  • h5手机网站发展趋势郑州品牌网站建设
  • 一个网站多个域名备案吗深圳精准网络营销推广
  • python做爬虫和做网站网站收录量是什么意思
  • 微信网站什么做的dw软件怎么制作网页
  • 网站建设标准依据百度小程序关键词优化
  • 桂林网站制作网站大连网络推广公司哪家好