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>
    

      

  • 相关阅读:
    员工看公司
    Java多线程
    Intellij热部署插件JRebel的详细配置及图解
    Java并发处理锁 Lock
    Java8 Stream
    Eclipse下Maven安装和配置
    IntelliJ IDEA 部署Tomcat及创建一个web工程
    IntelliJ IDEA 下搭建vue项目工程
    Vue Router路由管理器介绍
    用WebStorm搭建vue项目
  • 原文地址:https://www.cnblogs.com/HCXiao/p/14809135.html
Copyright © 2011-2022 走看看