Skip to content

🌵 用于 Vue 全局安装 xe-utils

License

Notifications You must be signed in to change notification settings

x-extends/vxe-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vxe-utils

gitee star npm version npm build npm downloads gzip size: JS npm license

用于 Vue 全局安装 xe-utils

Installing

npm install xe-utils vxe-utils
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/xe-utils"></script>
<script src="https://cdn.jsdelivr.net/npm/vxe-utils"></script>

Example

Run this demo on jsfiddle.net

import Vue from 'vue'
import XEUtils from 'xe-utils'
import VXEUtils from 'vxe-utils'

Vue.use(VXEUtils, XEUtils, { mounts: ['cookie'] })
<template>
  <h1>{{ userName }}</h1>
  <div>{{ $utils.toDateString(startDate, 'yyyy-dd-MM HH:mm:ss') }}</div>
  <div>{{ endDate }}</div>
</template>
<script>
export default {
  data () {
    return {
      userName: null,
      startDate: new Date(),
      endDate: null
    }
  },
  created () {
    this.userName = this.$cookie('U_NAME')
    this.endDate = this.$utils.toDateString(new Date(), 'MM/dd/yyyy HH:mm:ss.SSS')
  }
}
</script>

License

MIT © 2017-present, Xu Liangzhan

About

🌵 用于 Vue 全局安装 xe-utils

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published