zoukankan      html  css  js  c++  java
  • element el-date-picker 去除自带的T格式

    <template>
      <div>
        <el-date-picker v-model="nInput" :type="type" :placeholder="placeholder" :readonly="readonly" :disabled="disabled" :clearable="clearable" @input="salaryChange"></el-date-picker>
      </div>
    </template>
    
    <script>
    import { formatTimePicker } from '@/utils'
    export default {
      props: {
        value: {
          type: String,
          default: ''
        },
        placeholder: {
          type: String
        },
        clearable: {
          type: Boolean,
          default: false
        },
        disabled: {
          type: Boolean,
          default: false
        },
        readonly: {
          type: Boolean,
          default: false
        },
        type: {
          type: String,
          default:'datetime'
        }
      },
      data() {
        return {
          nInput: null
        }
      },
      watch: {
        nInput(val, oldVal) {
          let dateVal = formatTimePicker(val,this.type)
          this.$emit('input', dateVal)
        },
        value(val, oldVal) {
          this.nInput = val
        }
      },
      created() {
        this.nInput = this.value
      },
      methods: {
        salaryChange(e) {
          // console.log(e)
        }
      }
    }
    </script>
    
    <style lang="scss" scoped>
    </style>
    

      

  • 相关阅读:
    SQL2005 镜像配置
    子窗体关闭程序
    asp.net 输出微信自定义菜单json
    教是最好的学
    人为什么要努力?
    《雪国列车》制度与自由
    时间记录APP———Time Meter
    饭饭
    Android编译程序报错:Re-installation failed due to different application signatures.
    我的GTD起步
  • 原文地址:https://www.cnblogs.com/HCXiao/p/14809135.html
Copyright © 2011-2022 走看看