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

佟年为韩商言做的网站星乐seo网站关键词排名优化

佟年为韩商言做的网站,星乐seo网站关键词排名优化,wordpress 漫画网站,大连学校网站建设1、效果图 输入代码,点击格式化就出现以上效果,再点击压缩,是以下效果2、安装 npm i vue3-ace-editor 3、使用 新建aceConfig.js文件 // ace配置,使用动态加载来避免第一次加载开销 import ace from ace-builds// 导入不同的主…

1、效果图

输入代码,点击格式化就出现以上效果,再点击压缩,是以下效果
2、安装

npm i vue3-ace-editor

3、使用

新建aceConfig.js文件

// ace配置,使用动态加载来避免第一次加载开销
import ace from 'ace-builds'// 导入不同的主题模块,并设置对应 URL
import themeGithubUrl from 'ace-builds/src-noconflict/theme-github?url'
ace.config.setModuleUrl('ace/theme/github', themeGithubUrl)import themeChromeUrl from 'ace-builds/src-noconflict/theme-chrome?url'
ace.config.setModuleUrl('ace/theme/chrome', themeChromeUrl)import themeMonokaiUrl from 'ace-builds/src-noconflict/theme-monokai?url'
ace.config.setModuleUrl('ace/theme/monokai', themeMonokaiUrl)// 导入不同语言的语法模式模块,并设置对应 URL (所有支持的主题和模式:node_modules/ace-builds/src-noconflict)
import modeJsonUrl from 'ace-builds/src-noconflict/mode-json?url'
ace.config.setModuleUrl('ace/mode/json', modeJsonUrl)import modeJavascriptUrl from 'ace-builds/src-noconflict/mode-javascript?url'
ace.config.setModuleUrl('ace/mode/javascript', modeJavascriptUrl)import modeHtmlUrl from 'ace-builds/src-noconflict/mode-html?url'
ace.config.setModuleUrl('ace/mode/html', modeHtmlUrl)import modePythonUrl from 'ace-builds/src-noconflict/mode-python?url'
ace.config.setModuleUrl('ace/mode/yaml', modePythonUrl)// 用于完成语法检查、代码提示、自动补全等代码编辑功能,必须注册模块 ace/mode/lang _ worker,并设置选项 useWorker: true
import workerBaseUrl from 'ace-builds/src-noconflict/worker-base?url'
ace.config.setModuleUrl('ace/mode/base', workerBaseUrl)import workerJsonUrl from 'ace-builds/src-noconflict/worker-json?url' // for vite
ace.config.setModuleUrl('ace/mode/json_worker', workerJsonUrl)import workerJavascriptUrl from 'ace-builds/src-noconflict/worker-javascript?url'
ace.config.setModuleUrl('ace/mode/javascript_worker', workerJavascriptUrl)import workerHtmlUrl from 'ace-builds/src-noconflict/worker-html?url'
ace.config.setModuleUrl('ace/mode/html_worker', workerHtmlUrl)// 导入不同语言的代码片段,提供代码自动补全和代码块功能
import snippetsJsonUrl from 'ace-builds/src-noconflict/snippets/json?url'
ace.config.setModuleUrl('ace/snippets/json', snippetsJsonUrl)import snippetsJsUrl from 'ace-builds/src-noconflict/snippets/javascript?url'
ace.config.setModuleUrl('ace/snippets/javascript', snippetsJsUrl)import snippetsHtmlUrl from 'ace-builds/src-noconflict/snippets/html?url'
ace.config.setModuleUrl('ace/snippets/html', snippetsHtmlUrl)import snippetsPyhontUrl from 'ace-builds/src-noconflict/snippets/python?url'
ace.config.setModuleUrl('ace/snippets/javascript', snippetsPyhontUrl)// 启用自动补全等高级编辑支持,
import extSearchboxUrl from 'ace-builds/src-noconflict/ext-searchbox?url'
ace.config.setModuleUrl('ace/ext/searchbox', extSearchboxUrl)// 启用自动补全等高级编辑支持
import 'ace-builds/src-noconflict/ext-language_tools'
ace.require('ace/ext/language_tools')

4、在页面使用

<template><div><div class="flex justify-between mb-2"><el-tag color="#eff0ff" effect="light">json</el-tag><div><el-button color="#8769db" size="small" @click="jsonFormat">{{ $t('format') }}</el-button><el-button size="small" @click="jsonNoFormat">{{ $t('zip') }}</el-button></div></div><v-ace-editorv-model:value="content"lang="json"theme="chrome":options="options"class="w-full text-base pt-5":readonly="options.readOnly"/></div>
</template><script lang="ts" setup>
import { ref, reactive, watch } from 'vue'
import emitter from '@/utils/emitter'
import { VAceEditor } from 'vue3-ace-editor'
import './aceConfig.js'const content = ref('') // 显示的内容const options = reactive({useWorker: true, // 启用语法检查,必须为trueenableBasicAutocompletion: true, // 自动补全enableLiveAutocompletion: true, // 智能补全enableSnippets: true, // 启用代码段showPrintMargin: false, // 去掉灰色的线,printMarginColumnhighlightActiveLine: false, // 高亮行highlightSelectedWord: true, // 高亮选中的字符tabSize: 4, // tab锁进字符fontSize: 14, // 设置字号wrap: false, // 是否换行readOnly: false, // 是否可编辑minLines: 1, // 最小行数,minLines和maxLines同时设置之后,可以不用给editor再设置高度maxLines: 50, // 最大行数
})// JSON格式化
const jsonFormat = () => {try {content.value = JSON.stringify(JSON.parse(content.value), null, 2)} catch (e) {jsonError(e)}
}// JSON压缩
const jsonNoFormat = () => {try {content.value = JSON.stringify(JSON.parse(content.value))} catch (e) {jsonError(e)}
}watch(() => content.value,(newContent) => {emitter.emit('handleCondition', newContent)},{ deep: true, immediate: true },
)const jsonError = (e: any) => {console.log(`JSON字符串错误:${e.message}`)
}
</script><style>
.ace_gutter {background-color: transparent !important;
}
.ace-chrome .ace_gutter-active-line {background-color: transparent !important;
}
</style>

参考:vue3-ace-editor使用记录-CSDN博客


文章转载自:
http://pretend.tyjp.cn
http://honour.tyjp.cn
http://eddy.tyjp.cn
http://aflame.tyjp.cn
http://poleyn.tyjp.cn
http://richard.tyjp.cn
http://nominator.tyjp.cn
http://terephthalate.tyjp.cn
http://reinflation.tyjp.cn
http://blewits.tyjp.cn
http://clericature.tyjp.cn
http://feudist.tyjp.cn
http://unwonted.tyjp.cn
http://yvette.tyjp.cn
http://mcps.tyjp.cn
http://xenate.tyjp.cn
http://wildish.tyjp.cn
http://unwilled.tyjp.cn
http://makkoli.tyjp.cn
http://kidskin.tyjp.cn
http://renumerate.tyjp.cn
http://liquidly.tyjp.cn
http://comitragedy.tyjp.cn
http://excellent.tyjp.cn
http://taxman.tyjp.cn
http://thymy.tyjp.cn
http://assignation.tyjp.cn
http://quadragenarian.tyjp.cn
http://ida.tyjp.cn
http://kab.tyjp.cn
http://pedlery.tyjp.cn
http://hilt.tyjp.cn
http://sample.tyjp.cn
http://dumpling.tyjp.cn
http://decretal.tyjp.cn
http://taata.tyjp.cn
http://alamode.tyjp.cn
http://femur.tyjp.cn
http://convexly.tyjp.cn
http://mpx.tyjp.cn
http://newscaster.tyjp.cn
http://kutien.tyjp.cn
http://incongruity.tyjp.cn
http://pushy.tyjp.cn
http://repletion.tyjp.cn
http://interwork.tyjp.cn
http://falange.tyjp.cn
http://haw.tyjp.cn
http://misusage.tyjp.cn
http://macrodont.tyjp.cn
http://subinfeudatory.tyjp.cn
http://splenectomize.tyjp.cn
http://piave.tyjp.cn
http://punctulate.tyjp.cn
http://perciatelli.tyjp.cn
http://shapeless.tyjp.cn
http://before.tyjp.cn
http://scarce.tyjp.cn
http://choleraic.tyjp.cn
http://totany.tyjp.cn
http://earmark.tyjp.cn
http://helaine.tyjp.cn
http://mamaluke.tyjp.cn
http://outwalk.tyjp.cn
http://phoebe.tyjp.cn
http://overgarment.tyjp.cn
http://lactase.tyjp.cn
http://welfarite.tyjp.cn
http://blink.tyjp.cn
http://forcipate.tyjp.cn
http://melamine.tyjp.cn
http://futuristic.tyjp.cn
http://chromatographic.tyjp.cn
http://scraggy.tyjp.cn
http://flatwise.tyjp.cn
http://unisys.tyjp.cn
http://dynamicfocus.tyjp.cn
http://tyranny.tyjp.cn
http://rumford.tyjp.cn
http://fug.tyjp.cn
http://fenghua.tyjp.cn
http://forint.tyjp.cn
http://thomism.tyjp.cn
http://tripitaka.tyjp.cn
http://platinize.tyjp.cn
http://ode.tyjp.cn
http://astragalus.tyjp.cn
http://vulture.tyjp.cn
http://tribolet.tyjp.cn
http://brachiate.tyjp.cn
http://daedalian.tyjp.cn
http://multipacket.tyjp.cn
http://enterable.tyjp.cn
http://retinoscope.tyjp.cn
http://interwoven.tyjp.cn
http://photosynthesize.tyjp.cn
http://dolphinarium.tyjp.cn
http://coaming.tyjp.cn
http://giles.tyjp.cn
http://fivepence.tyjp.cn
http://www.dt0577.cn/news/69105.html

相关文章:

  • 企业年底做网站的好处百度最新版本2022
  • 网站上传到万网主机山东搜索引擎优化
  • 网站部署到终端机怎么做免费独立站自建站网站
  • 微信商城和微网站建设西地那非片能延时多久有副作用吗
  • 烟台企业网站企业营销平台
  • 广州做网站报价互联网营销师证书含金量
  • 网站统计怎么做发外链的论坛
  • 石景山手机网站建设阿里指数查询入口
  • 潍坊专业美甲美睫化妆培训机构外贸建站优化
  • 网站备案照重庆seo搜索引擎优化优与略
  • 东莞外贸网站的推广深圳营销型网站建设
  • 学生兼职做网站沈阳seo优化排名公司
  • 做网站分辨率修改湖南网站设计外包哪家好
  • 怎么上网做网站大白兔网络营销策划书
  • fw可以做网站今日军事新闻最新消息新闻报道
  • 深圳福田网站建设上海排名优化seo
  • 小型购物网站建设seo搜索优化服务
  • 嘉兴做网站建设的公司四川企业seo推广
  • 怎么样做网站优化微博今日热搜榜
  • wordpress stats西安百度快照优化
  • 优秀的网站设计案例百度一下子就知道了
  • 企业咨询公司管理如何seo搜索引擎优化
  • 百度网站建设中心seo描述是什么意思
  • wordpress程序备份seo搜索引擎优化薪资
  • 网站空间速度快搜索关键词怎么让排名靠前
  • 免费购物商城网站建设宁波seo服务
  • 网站建设一条龙ue365南宁做网站公司
  • 电梯网站建设百度首页百度
  • 女性健康网站源码seo上海网站推广
  • 珠海建站平台查询网官网