"use strict";(self["webpackChunkmi_wifi_agent"]=self["webpackChunkmi_wifi_agent"]||[]).push([[7467],{254:function(e,t,l){l.r(t),l.d(t,{default:function(){return i}});var a=l(641);const n={style:{"margin-top":"15px"}};function o(e,t,l,o,r,s){const u=(0,a.g2)("el-alert"),d=(0,a.g2)("sc-code-editor"),i=(0,a.g2)("el-button"),c=(0,a.g2)("el-card"),m=(0,a.g2)("el-col"),g=(0,a.g2)("el-row"),p=(0,a.g2)("el-main");return(0,a.uX)(),(0,a.Wv)(p,null,{default:(0,a.k6)((()=>[(0,a.bF)(u,{title:"感谢codeMirror组件",type:"success",style:{"margin-bottom":"20px"}}),(0,a.bF)(g,{gutter:15},{default:(0,a.k6)((()=>[(0,a.bF)(m,{lg:24},{default:(0,a.k6)((()=>[(0,a.bF)(c,{shadow:"never",header:"JSON"},{default:(0,a.k6)((()=>[(0,a.bF)(d,{ref:"editor",modelValue:r.json,"onUpdate:modelValue":t[0]||(t[0]=e=>r.json=e),mode:"javascript",height:200},null,8,["modelValue"]),(0,a.Lk)("div",n,[(0,a.bF)(i,{type:"primary",onClick:s.getCode},{default:(0,a.k6)((()=>[(0,a.eW)("获取v-model")])),_:1},8,["onClick"]),(0,a.bF)(i,{type:"primary",onClick:s.getValue},{default:(0,a.k6)((()=>[(0,a.eW)("getValue()")])),_:1},8,["onClick"]),(0,a.bF)(i,{type:"primary",onClick:s.setValue},{default:(0,a.k6)((()=>[(0,a.eW)("setValue()")])),_:1},8,["onClick"])])])),_:1})])),_:1}),(0,a.bF)(m,{lg:12},{default:(0,a.k6)((()=>[(0,a.bF)(c,{shadow:"never",header:"javascript Darcula主题"},{default:(0,a.k6)((()=>[(0,a.bF)(d,{modelValue:r.js,"onUpdate:modelValue":t[1]||(t[1]=e=>r.js=e),mode:"javascript",theme:"darcula"},null,8,["modelValue"])])),_:1})])),_:1}),(0,a.bF)(m,{lg:12},{default:(0,a.k6)((()=>[(0,a.bF)(c,{shadow:"never",header:"SQL"},{default:(0,a.k6)((()=>[(0,a.bF)(d,{modelValue:r.sql,"onUpdate:modelValue":t[2]||(t[2]=e=>r.sql=e),mode:"sql"},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1})}const r=(0,a.$V)((()=>Promise.all([l.e(8213),l.e(6158),l.e(6570)]).then(l.bind(l,6570))));var s={name:"codeeditor",components:{scCodeEditor:r},data(){return{json:'{\n\t"name": "SCUI",\n\t"menu": [\n\t\t{\n\t\t\t"title": "VUE 3",\n\t\t\t"type": true,\n\t\t\t"link": "https://v3.cn.vuejs.org"\n\t\t},\n\t\t{\n\t\t\t"title": "elementplus",\n\t\t\t"type": false,\n\t\t\t"link": "https://element-plus.gitee.io"\n\t\t}\n\t]\n}',js:"// Demo code (the actual new parser character stream implementation)\nfunction StringStream(string) {\n\tthis.pos = 0;\n\tthis.string = string;\n}",sql:"SELECT `author`, `title` FROM `posts`\nWHERE `status` = 'draft' AND `author` IN('author1','author2')\nORDER BY `created_at` DESC, `id` DESC LIMIT 0, 10;"}},methods:{getCode(){this.$message("请查看控制台"),console.log(this.json)},getValue(){this.$message("请查看控制台");var e=this.$refs.editor.coder.getValue();console.log(e)},setValue(){var e='{"key":"newValue"}';this.$refs.editor.coder.setValue(e)}}},u=l(6262);const d=(0,u.A)(s,[["render",o]]);var i=d}}]);