执行过npm install命令的vue-element-admin源码
康凯
2022-05-20 aa4c235a8ca67ea8b731f90c951a465e92c0a865
1
{"remainingRequest":"D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\源码\\vue-element-admin-master\\src\\components\\JsonEditor\\index.vue?vue&type=style&index=0&id=03d4ca30&lang=scss&scoped=true&","dependencies":[{"path":"D:\\源码\\vue-element-admin-master\\src\\components\\JsonEditor\\index.vue","mtime":1649647926000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\sass-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKLmpzb24tZWRpdG9yIHsKICBoZWlnaHQ6IDEwMCU7CiAgcG9zaXRpb246IHJlbGF0aXZlOwoKICA6OnYtZGVlcCB7CiAgICAuQ29kZU1pcnJvciB7CiAgICAgIGhlaWdodDogYXV0bzsKICAgICAgbWluLWhlaWdodDogMzAwcHg7CiAgICB9CgogICAgLkNvZGVNaXJyb3Itc2Nyb2xsIHsKICAgICAgbWluLWhlaWdodDogMzAwcHg7CiAgICB9CgogICAgLmNtLXMtcnVieWJsdWUgc3Bhbi5jbS1zdHJpbmcgewogICAgICBjb2xvcjogI0YwODA0NzsKICAgIH0KICB9Cn0K"},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/JsonEditor","sourcesContent":["<template>\n  <div class=\"json-editor\">\n    <textarea ref=\"textarea\" />\n  </div>\n</template>\n\n<script>\nimport CodeMirror from 'codemirror'\nimport 'codemirror/addon/lint/lint.css'\nimport 'codemirror/lib/codemirror.css'\nimport 'codemirror/theme/rubyblue.css'\nrequire('script-loader!jsonlint')\nimport 'codemirror/mode/javascript/javascript'\nimport 'codemirror/addon/lint/lint'\nimport 'codemirror/addon/lint/json-lint'\n\nexport default {\n  name: 'JsonEditor',\n  /* eslint-disable vue/require-prop-types */\n  props: ['value'],\n  data() {\n    return {\n      jsonEditor: false\n    }\n  },\n  watch: {\n    value(value) {\n      const editorValue = this.jsonEditor.getValue()\n      if (value !== editorValue) {\n        this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))\n      }\n    }\n  },\n  mounted() {\n    this.jsonEditor = CodeMirror.fromTextArea(this.$refs.textarea, {\n      lineNumbers: true,\n      mode: 'application/json',\n      gutters: ['CodeMirror-lint-markers'],\n      theme: 'rubyblue',\n      lint: true\n    })\n\n    this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))\n    this.jsonEditor.on('change', cm => {\n      this.$emit('changed', cm.getValue())\n      this.$emit('input', cm.getValue())\n    })\n  },\n  methods: {\n    getValue() {\n      return this.jsonEditor.getValue()\n    }\n  }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.json-editor {\n  height: 100%;\n  position: relative;\n\n  ::v-deep {\n    .CodeMirror {\n      height: auto;\n      min-height: 300px;\n    }\n\n    .CodeMirror-scroll {\n      min-height: 300px;\n    }\n\n    .cm-s-rubyblue span.cm-string {\n      color: #F08047;\n    }\n  }\n}\n</style>\n"]}]}