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

做网站编辑前景包年seo和整站优化

做网站编辑前景,包年seo和整站优化,app研发的设计流程,济宁网站优化公司自定义主题 命令行主题工具 1.安装主题工具 首先安装「主题生成工具」#xff0c;可以全局安装或者安装在当前项目下#xff0c;推荐安装在项目里#xff0c;方便别人 clone 项目时能直接安装依赖并启动。 yarn add element-theme --dev 2.安装chalk主题 安装白垩主题…自定义主题 命令行主题工具 1.安装主题工具 首先安装「主题生成工具」可以全局安装或者安装在当前项目下推荐安装在项目里方便别人 clone 项目时能直接安装依赖并启动。 yarn add element-theme --dev 2.安装chalk主题 安装白垩主题可以从 npm 安装或者从 GitHub 拉取最新代码这里从 npm 安装。 yarn add element-theme-chalk -D 3.初始化变量文件  主题生成工具安装成功后如果全局安装可以在命令行里通过 et 调用工具如果安装在当前目录下需要通过 node_modules/.bin/et 访问到命令。执行 -i 初始化变量文件。默认输出到 element-variables.scss当然你可以传参数指定文件输出目录。 node_modules/.bin/et -i 执行命令 命令执行成功之后会在根目录生成 scss文件 element-variables.scss 。 4、修改主题色  在 element-variables.scss 文件里修改 $–color-primary:#4b5f6e即你想要的主题颜色 5、编译主题  执行主题编译命令生成主题根目录会生成一个theme的文件夹 。 node_modules/.bin/et 6、引入自定义主题  把生成的主题按颜色改名放置 src/theme 目录下。 在 main.js 中 import ‘所在路径/index.css’。 7、效果展示 重新加载后我们看到按钮颜色已经不是默认的蓝色了。 动态换肤器方式 1. 在下图位置添加封装的换肤组件。 index.vue templateel-color-pickerclasstheme-pickerpopper-classtheme-picker-dropdownv-modeltheme/el-color-picker /templatescriptconst version require(element-ui/package.json).version // element-ui version from node_modules const ORIGINAL_THEME #409EFF // default colorexport default {data() {return {chalk: , // content of theme-chalk csstheme: ORIGINAL_THEME}},watch: {theme(val, oldVal) {if (typeof val ! string) returnconst themeCluster this.getThemeCluster(val.replace(#, ))const originalCluster this.getThemeCluster(oldVal.replace(#, ))console.log(themeCluster, originalCluster)const getHandler (variable, id) {return () {const originalCluster this.getThemeCluster(ORIGINAL_THEME.replace(#, ))const newStyle this.updateStyle(this[variable], originalCluster, themeCluster)let styleTag document.getElementById(id)if (!styleTag) {styleTag document.createElement(style)styleTag.setAttribute(id, id)document.head.appendChild(styleTag)}styleTag.innerText newStyle}}const chalkHandler getHandler(chalk, chalk-style)if (!this.chalk) {const url https://unpkg.com/element-ui${version}/lib/theme-chalk/index.cssthis.getCSSString(url, chalkHandler, chalk)} else {chalkHandler()}const styles [].slice.call(document.querySelectorAll(style)).filter(style {const text style.innerTextreturn new RegExp(oldVal, i).test(text) !/Chalk Variables/.test(text)})styles.forEach(style {const { innerText } styleif (typeof innerText ! string) returnstyle.innerText this.updateStyle(innerText, originalCluster, themeCluster)})this.$message({message: 换肤成功,type: success})}},methods: {updateStyle(style, oldCluster, newCluster) {let newStyle styleoldCluster.forEach((color, index) {newStyle newStyle.replace(new RegExp(color, ig), newCluster[index])})return newStyle},getCSSString(url, callback, variable) {const xhr new XMLHttpRequest()xhr.onreadystatechange () {if (xhr.readyState 4 xhr.status 200) {this[variable] xhr.responseText.replace(/font-face{[^}]}/, )callback()}}xhr.open(GET, url)xhr.send()},getThemeCluster(theme) {const tintColor (color, tint) {let red parseInt(color.slice(0, 2), 16)let green parseInt(color.slice(2, 4), 16)let blue parseInt(color.slice(4, 6), 16)if (tint 0) { // when primary color is in its rgb spacereturn [red, green, blue].join(,)} else {red Math.round(tint * (255 - red))green Math.round(tint * (255 - green))blue Math.round(tint * (255 - blue))red red.toString(16)green green.toString(16)blue blue.toString(16)return #${red}${green}${blue}}}const shadeColor (color, shade) {let red parseInt(color.slice(0, 2), 16)let green parseInt(color.slice(2, 4), 16)let blue parseInt(color.slice(4, 6), 16)red Math.round((1 - shade) * red)green Math.round((1 - shade) * green)blue Math.round((1 - shade) * blue)red red.toString(16)green green.toString(16)blue blue.toString(16)return #${red}${green}${blue}}const clusters [theme]for (let i 0; i 9; i) {clusters.push(tintColor(theme, Number((i / 10).toFixed(2))))}clusters.push(shadeColor(theme, 0.1))return clusters}} } /scriptstyle .theme-picker .el-color-picker__trigger {vertical-align: middle; }.theme-picker-dropdown .el-color-dropdown__link-btn {display: none; } /style 2.直接在组件中引用 在 Home.vue 中引入 在语言切换左边添加换肤组件 3.换肤测试 点击组件选择一个颜色确定 我们看到相关主题颜色即刻生效 退回登录界面查看
http://www.huolong8.cn/news/264132/

相关文章:

  • 自己做网站要多少钱做网站公司-汉狮网络
  • 4a网站建设公司网站开发的英文文献
  • 个人网站上线流程软件开发上海
  • 网站建设三折页网页制作流程
  • 高端开发网站系统外链网
  • 网站建设 价格低做3D打印样品用什么外贸网站好
  • 咖啡网站开发背景怎么写天津公众号开发
  • 江门免费模板建站中国建设银行支付网站
  • 承德市建设局网站wordpress顶部菜单怎么删
  • ktv支付订房网站模板泉州网站建设方案详细
  • 主流网站 技术云主机和云服务器有什么区别
  • 做网站 蓝洋网站诊断seo当前数据是指
  • 东莞seo网站排名优化wordpress电影资源网站
  • 天津泰达建设集团有限公司网站个人网站的备案
  • 医疗网站不备案小制作图片
  • 哪些网站可以在线做动图网站留言板怎么做php
  • 网站开发需要多久wordpress 怎么添加网站备案信息
  • 有了网站源码如何做网页网站建设公司推荐乐云seo
  • 云之创网站建设好企业网站
  • 做视频网站视频文件都存放在哪成年培训班有哪些
  • 无锡市网站建设长春市
  • 怎么样网站速度快天元建设集团有限公司第六分公司
  • asp装饰公司网站源码酒店网站 asp.net
  • wordpress建站 图片上海环球金融中心造价
  • 网站设计评语兼职网站开发
  • 一流的天津网站建设英文网站设计
  • 网页中网站设计规划流程天津企悦在线网站建设
  • 网站图片调用无锡企业建设网站公司
  • 做网站一天忙吗温州市网站
  • 松岗怎么做企业网站设计share poine 户做网站