执行过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\\MDinput\\index.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\源码\\vue-element-admin-master\\src\\components\\MDinput\\index.vue","mtime":1649647926000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"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:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KCi8vIHNvdXJjZTpodHRwczovL2dpdGh1Yi5jb20vd2VtYWtlLXNlcnZpY2VzL3Z1ZS1tYXRlcmlhbC1pbnB1dC9ibG9iL21hc3Rlci9zcmMvY29tcG9uZW50cy9NYXRlcmlhbElucHV0LnZ1ZQoKZXhwb3J0IGRlZmF1bHQgewogIG5hbWU6ICdNZElucHV0JywKICBwcm9wczogewogICAgLyogZXNsaW50LWRpc2FibGUgKi8KICAgIGljb246IFN0cmluZywKICAgIG5hbWU6IFN0cmluZywKICAgIHR5cGU6IHsKICAgICAgdHlwZTogU3RyaW5nLAogICAgICBkZWZhdWx0OiAndGV4dCcKICAgIH0sCiAgICB2YWx1ZTogW1N0cmluZywgTnVtYmVyXSwKICAgIHBsYWNlaG9sZGVyOiBTdHJpbmcsCiAgICByZWFkb25seTogQm9vbGVhbiwKICAgIGRpc2FibGVkOiBCb29sZWFuLAogICAgbWluOiBTdHJpbmcsCiAgICBtYXg6IFN0cmluZywKICAgIHN0ZXA6IFN0cmluZywKICAgIG1pbmxlbmd0aDogTnVtYmVyLAogICAgbWF4bGVuZ3RoOiBOdW1iZXIsCiAgICByZXF1aXJlZDogewogICAgICB0eXBlOiBCb29sZWFuLAogICAgICBkZWZhdWx0OiB0cnVlCiAgICB9LAogICAgYXV0b0NvbXBsZXRlOiB7CiAgICAgIHR5cGU6IFN0cmluZywKICAgICAgZGVmYXVsdDogJ29mZicKICAgIH0sCiAgICB2YWxpZGF0ZUV2ZW50OiB7CiAgICAgIHR5cGU6IEJvb2xlYW4sCiAgICAgIGRlZmF1bHQ6IHRydWUKICAgIH0KICB9LAogIGRhdGEoKSB7CiAgICByZXR1cm4gewogICAgICBjdXJyZW50VmFsdWU6IHRoaXMudmFsdWUsCiAgICAgIGZvY3VzOiBmYWxzZSwKICAgICAgZmlsbFBsYWNlSG9sZGVyOiBudWxsCiAgICB9CiAgfSwKICBjb21wdXRlZDogewogICAgY29tcHV0ZWRDbGFzc2VzKCkgewogICAgICByZXR1cm4gewogICAgICAgICdtYXRlcmlhbC0tYWN0aXZlJzogdGhpcy5mb2N1cywKICAgICAgICAnbWF0ZXJpYWwtLWRpc2FibGVkJzogdGhpcy5kaXNhYmxlZCwKIC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G51bGwKICAgICAgaWYgKHRoaXMuJHBhcmVudC4kb3B0aW9ucy5jb21wb25lbnROYW1lID09PSAnRWxGb3JtSXRlbScpIHsKICAgICAgICBpZiAodGhpcy52YWxpZGF0ZUV2ZW50KSB7CiAgICAgICAgICB0aGlzLiRwYXJlbnQuJGVtaXQoJ2VsLmZvcm0uYmx1cicsIFt0aGlzLmN1cnJlbnRWYWx1ZV0pCiAgICAgICAgfQogICAgICB9CiAgICB9CiAgfQp9Cg=="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgHA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/MDinput","sourcesContent":["<template>\n  <div :class=\"computedClasses\" class=\"material-input__component\">\n    <div :class=\"{iconClass:icon}\">\n      <i v-if=\"icon\" :class=\"['el-icon-' + icon]\" class=\"el-input__icon material-input__icon\" />\n      <input\n        v-if=\"type === 'email'\"\n        v-model=\"currentValue\"\n        :name=\"name\"\n        :placeholder=\"fillPlaceHolder\"\n        :readonly=\"readonly\"\n        :disabled=\"disabled\"\n        :autocomplete=\"autoComplete\"\n        :required=\"required\"\n        type=\"email\"\n        class=\"material-input\"\n        @focus=\"handleMdFocus\"\n        @blur=\"handleMdBlur\"\n        @input=\"handleModelInput\"\n      >\n      <input\n        v-if=\"type === 'url'\"\n        v-model=\"currentValue\"\n        :name=\"name\"\n        :placeholder=\"fillPlaceHolder\"\n        :readonly=\"readonly\"\n        :disabled=\"disabled\"\n        :autocomplete=\"autoComplete\"\n        :required=\"required\"\n        type=\"url\"\n        class=\"material-input\"\n        @focus=\"handleMdFocus\"\n        @blur=\"handleMdBlur\"\n        @input=\"handleModelInput\"\n      >\n      <input\n        v-if=\"type === 'number'\"\n        v-model=\"currentValue\"\n        :name=\"name\"\n        :placeholder=\"fillPlaceHolder\"\n        :step=\"step\"\n        :readonly=\"readonly\"\n        :disabled=\"disabled\"\n        :autocomplete=\"autoComplete\"\n        :max=\"max\"\n        :min=\"min\"\n        :minlength=\"minlength\"\n        :maxlength=\"maxlength\"\n        :required=\"required\"\n        type=\"number\"\n        class=\"material-input\"\n        @focus=\"handleMdFocus\"\n        @blur=\"handleMdBlur\"\n        @input=\"handleModelInput\"\n      >\n      <input\n        v-if=\"type === 'password'\"\n        v-model=\"currentValue\"\n        :name=\"name\"\n        :placeholder=\"fillPlaceHolder\"\n        :readonly=\"readonly\"\n        :disabled=\"disabled\"\n        :autocomplete=\"autoComplete\"\n        :max=\"max\"\n        :min=\"min\"\n        :required=\"required\"\n        type=\"password\"\n        class=\"material-input\"\n        @focus=\"handleMdFocus\"\n        @blur=\"handleMdBlur\"\n        @input=\"handleModelInput\"\n      >\n      <input\n        v-if=\"type === 'tel'\"\n        v-model=\"currentValue\"\n        :name=\"name\"\n        :placeholder=\"fillPlaceHolder\"\n        :readonly=\"readonly\"\n        :disabled=\"disabled\"\n        :autocomplete=\"autoComplete\"\n        :required=\"required\"\n        type=\"tel\"\n        class=\"material-input\"\n        @focus=\"handleMdFocus\"\n        @blur=\"handleMdBlur\"\n        @input=\"handleModelInput\"\n      >\n      <input\n        v-if=\"type === 'text'\"\n        v-model=\"currentValue\"\n        :name=\"name\"\n        :placeholder=\"fillPlaceHolder\"\n        :readonly=\"readonly\"\n        :disabled=\"disabled\"\n        :autocomplete=\"autoComplete\"\n        :minlength=\"minlength\"\n        :maxlength=\"maxlength\"\n        :required=\"required\"\n        type=\"text\"\n        class=\"material-input\"\n        @focus=\"handleMdFocus\"\n        @blur=\"handleMdBlur\"\n        @input=\"handleModelInput\"\n      >\n      <span class=\"material-input-bar\" />\n      <label class=\"material-label\">\n        <slot />\n      </label>\n    </div>\n  </div>\n</template>\n\n<script>\n// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue\n\nexport default {\n  name: 'MdInput',\n  props: {\n    /* eslint-disable */\n    icon: String,\n    name: String,\n    type: {\n      type: String,\n      default: 'text'\n    },\n    value: [String, Number],\n    placeholder: String,\n    readonly: Boolean,\n    disabled: Boolean,\n    min: String,\n    max: String,\n    step: String,\n    minlength: Number,\n    maxlength: Number,\n    required: {\n      type: Boolean,\n      default: true\n    },\n    autoComplete: {\n      type: String,\n      default: 'off'\n    },\n    validateEvent: {\n      type: Boolean,\n      default: true\n    }\n  },\n  data() {\n    return {\n      currentValue: this.value,\n      focus: false,\n      fillPlaceHolder: null\n    }\n  },\n  computed: {\n    computedClasses() {\n      return {\n        'material--active': this.focus,\n        'material--disabled': this.disabled,\n        'material--raised': Boolean(this.focus || this.currentValue) // has value\n      }\n    }\n  },\n  watch: {\n    value(newValue) {\n      this.currentValue = newValue\n    }\n  },\n  methods: {\n    handleModelInput(event) {\n      const value = event.target.value\n      this.$emit('input', value)\n      if (this.$parent.$options.componentName === 'ElFormItem') {\n        if (this.validateEvent) {\n          this.$parent.$emit('el.form.change', [value])\n        }\n      }\n      this.$emit('change', value)\n    },\n    handleMdFocus(event) {\n      this.focus = true\n      this.$emit('focus', event)\n      if (this.placeholder && this.placeholder !== '') {\n        this.fillPlaceHolder = this.placeholder\n      }\n    },\n    handleMdBlur(event) {\n      this.focus = false\n      this.$emit('blur', event)\n      this.fillPlaceHolder = null\n      if (this.$parent.$options.componentName === 'ElFormItem') {\n        if (this.validateEvent) {\n          this.$parent.$emit('el.form.blur', [this.currentValue])\n        }\n      }\n    }\n  }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n  // Fonts:\n  $font-size-base: 16px;\n  $font-size-small: 18px;\n  $font-size-smallest: 12px;\n  $font-weight-normal: normal;\n  $font-weight-bold: bold;\n  $apixel: 1px;\n  // Utils\n  $spacer: 12px;\n  $transition: 0.2s ease all;\n  $index: 0px;\n  $index-has-icon: 30px;\n  // Theme:\n  $color-white: white;\n  $color-grey: #9E9E9E;\n  $color-grey-light: #E0E0E0;\n  $color-blue: #2196F3;\n  $color-red: #F44336;\n  $color-black: black;\n  // Base clases:\n  %base-bar-pseudo {\n    content: '';\n    height: 1px;\n    width: 0;\n    bottom: 0;\n    position: absolute;\n    transition: $transition;\n  }\n\n  // Mixins:\n  @mixin slided-top() {\n    top: - ($font-size-base + $spacer);\n    left: 0;\n    font-size: $font-size-base;\n    font-weight: $font-weight-bold;\n  }\n\n  // Component:\n  .material-input__component {\n    margin-top: 36px;\n    position: relative;\n    * {\n      box-sizing: border-box;\n    }\n    .iconClass {\n      .material-input__icon {\n        position: absolute;\n        left: 0;\n        line-height: $font-size-base;\n        color: $color-blue;\n        top: $spacer;\n        width: $index-has-icon;\n        height: $font-size-base;\n        font-size: $font-size-base;\n        font-weight: $font-weight-normal;\n        pointer-events: none;\n      }\n      .material-label {\n        left: $index-has-icon;\n      }\n      .material-input {\n        text-indent: $index-has-icon;\n      }\n    }\n    .material-input {\n      font-size: $font-size-base;\n      padding: $spacer $spacer $spacer - $apixel * 10 $spacer / 2;\n      display: block;\n      width: 100%;\n      border: none;\n      line-height: 1;\n      border-radius: 0;\n      &:focus {\n        outline: none;\n        border: none;\n        border-bottom: 1px solid transparent; // fixes the height issue\n      }\n    }\n    .material-label {\n      font-weight: $font-weight-normal;\n      position: absolute;\n      pointer-events: none;\n      left: $index;\n      top: 0;\n      transition: $transition;\n      font-size: $font-size-small;\n    }\n    .material-input-bar {\n      position: relative;\n      display: block;\n      width: 100%;\n      &:before {\n        @extend %base-bar-pseudo;\n        left: 50%;\n      }\n      &:after {\n        @extend %base-bar-pseudo;\n        right: 50%;\n      }\n    }\n    // Disabled state:\n    &.material--disabled {\n      .material-input {\n        border-bottom-style: dashed;\n      }\n    }\n    // Raised state:\n    &.material--raised {\n      .material-label {\n        @include slided-top();\n      }\n    }\n    // Active state:\n    &.material--active {\n      .material-input-bar {\n        &:before,\n        &:after {\n          width: 50%;\n        }\n      }\n    }\n  }\n\n  .material-input__component {\n    background: $color-white;\n    .material-input {\n      background: none;\n      color: $color-black;\n      text-indent: $index;\n      border-bottom: 1px solid $color-grey-light;\n    }\n    .material-label {\n      color: $color-grey;\n    }\n    .material-input-bar {\n      &:before,\n      &:after {\n        background: $color-blue;\n      }\n    }\n    // Active state:\n    &.material--active {\n      .material-label {\n        color: $color-blue;\n      }\n    }\n    // Errors:\n    &.material--has-errors {\n      &.material--active .material-label {\n        color: $color-red;\n      }\n      .material-input-bar {\n        &:before,\n        &:after {\n          background: transparent;\n        }\n      }\n    }\n  }\n</style>\n"]}]}