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

网站建设费用计什么科目网站建设做的好的公司

网站建设费用计什么科目,网站建设做的好的公司,seo文章是什么,建设厅网站技术负责人要求效果图 安装codemirror依赖 本示例为Vue2项目#xff0c;安装低版本的依赖 npm i codemirror5.65.12 npm i vue-codemirror4.0.6 实现 实现代码如下#xff0c;里边涉及到的变量和函数自行替换即可#xff0c;没有其他复杂逻辑。 templatediv classp…效果图 安装codemirror依赖 本示例为Vue2项目安装低版本的依赖 npm i codemirror5.65.12 npm i vue-codemirror4.0.6 实现 实现代码如下里边涉及到的变量和函数自行替换即可没有其他复杂逻辑。 templatediv classpickerdiv classcode-editdiv classtop-title公式/divcodemirrorrefcodeEditorv-modelformulaStr:optionscmOptionsinputcodeMirrorChange/codemirror/divel-buttonsizeminiiconel-icon-settingclickinsertContent(表单4, variable)添加变量/el-buttonel-buttonsizeminiiconel-icon-settingclickinsertContent(SUM, func)添加函数/el-button/div/templatescript import {codemirror} from vue-codemirror; import codemirror/lib/codemirror.css; import codemirror/theme/idea.css;export default {components: {codemirror},data() {return {cmOptions: {// 语言及语法模式mode: text/javascript,// 主题theme: idea,// 显示函数line: true,lineNumbers: false,// 软换行lineWrapping: true,// tab宽度tabSize: 4,},lang: javascript,formulaStr: 表单 表单1 * 表单11*表单12SUM(1,2) AVG(99,21) IF(),};},computed: {editor() {return this.$refs.codeEditor.codemirror;}},mounted() {this.focus(this.formulaStr)this.autoMarkText()},methods: {codeMirrorChange() {//获取 editor 的内容console.log(content1: this.formulaStr);console.log(content2: JSON.stringify(this.editor.getValue()));},addFormula(content, type) {this.insertContent(content, type)},/*** editor 中的对内容进行处理* param value* param type variable | funcvariable为表单变量需标记func 为函数也需要做标记*/insertContent(value, type) {const from this.editor.getCursor();if (type variable) {this.editor.replaceSelection(value);const to this.editor.getCursor();this.markText(from, to, value, cm-field);} else if (type func) {this.editor.replaceSelection(${value}());const to this.editor.getCursor();this.markText(from, {line: to.line, ch: to.ch - 2}, value, cm-func);this.editor.setCursor({line: to.line, ch: to.ch - 1});} else if (typeof value string) {this.editor.replaceSelection(value);}this.editor.focus();},autoMarkText() {if (this.formulaStr) {this.autoMark(this.formulaStr);this.focus(this.formulaStr);}},focus(value) {this.editor.setCursor({line: 0,ch: value ? value.length : 0});this.editor.focus()},markText(from, to, label, className) {if (className void 0) {className cm-func;}let text document.createElement(span);text.className className;text.innerText label;this.editor.markText(from, to, {atomic: true,replacedWith: text,});},/*** 解析 editor 的内容分别对表单变量和函数进行标记*/autoMark() {const editor this.editor;const lines editor.lineCount();for (let line 0; line lines; line) {const content editor.getLine(line);// 标记函数调用,匹配一个或多个连续的大写字母后面可以有任意数量的空白字符再紧跟一个左括号content.replace(/([A-Z])\s*\(/g, (_, func, pos) {this.markText({line: line, ch: pos}, {line: line, ch: pos func.length}, func, cm-func);return _;});// 标记表单变量,这应该是动态获取自行替换即可let vars [表单, 表单1, 表单11, 表单12];vars.forEach(v {let from 0;let idx -1;while (~(idx content.indexOf(v, from))) {this.markText({line: line, ch: idx}, {line: line, ch: idx v.length}, v, cm-field);from idx v.length;}});}},}, }; /scriptstyle langless scoped .picker {height: 525px;text-align: left;width: 50%;margin: 0 auto;.code-edit {height: 240px;border-radius: 6px;border: 1px solid #e8e9eb;} } .top-title {background-color: #fafafa;height: 30px;vertical-align: center;line-height: 30px;padding-left: 10px;border-radius: 4px 4px 0 0;border-bottom: none; } /deep/ .CodeMirror {height: 200px !important;/*表单变量样式*/.cm-field {background: #007bff;padding: 3px 5px;border-radius: 3px;color: #fff;margin: 0 1px;}/*函数样式*/.cm-func {font-weight: bold;color: #ae4597;line-height: 14px;margin: 0 1px;padding: 0 2px;}.CodeMirror-scroll {width: 100%;} }/style
http://www.hkea.cn/news/14380846/

相关文章:

  • 学做网站根学ps有前途吗佛山家具网站建设公司
  • 什么是功能型网站代理网站地址
  • 2022网络热词30个seo建站技巧
  • 建设网站用凡科怎么样农村自建房设计图纸
  • 推广产品的方法和步骤seo sem是什么意思
  • 基于网站优化的搜索引擎推广方法合肥建设网站
  • 网站开发用户登录前 登录后保山手机网站建设
  • 百度友情链接兰州网站seo服务
  • 网站服务器 内存成都微信网站建设多少钱
  • 商业网站页面公司企业网站制作教程
  • 安化网站建设开源中国
  • 做网站收费标临沂手机建站模板
  • 如何给网站做宣传中企动力值不值得入职
  • 做公司网站需要准备什么资料建设网站建设的目标
  • 做网站赚取广告费做软件下载网站违法吗
  • 怎么做公益网站90设计网站怎么样
  • 做网站用的图片分辨率网站做线支付平台系统多少钱
  • wordpress建站创业网站建设过程中服务器的搭建方式
  • 廊坊网站关键词排名怎么建设家乡网站
  • 国外网站网站app成都网站建设需多少钱
  • 网站建设 化工网络舆情监测与研判考试重点
  • 如何安装网站手游排行榜
  • 福州php做网站免费logo设计图片软件
  • 网站设计 推广无锡新闻最新消息今天
  • 大型网站建设方案常见问题昆明做网站
  • 查看网站点击量如何更换网站图片
  • 网站页面分析范文西安网站制作开发公司哪家好
  • 中国建设职业注册中心网站网站 建设 毕业设计 要求
  • 做网站网站是什么案件互联网站点
  • 网站制作公司的流程建设网站呼叫中心有什么好处