Commit 5251e82f by 胡悦

模板

1 parent 82b4ec19
......@@ -3,6 +3,7 @@
import Vue from 'vue'
import GlsxVueComponents from 'glsx-vue-components'
import 'glsx-vue-components/dist/glsx-vue-components.css'
import './styles/index.scss'
// import axios from 'axios'
Vue.use(GlsxVueComponents)
......
function format(formatStr) {
const date = this
var zeroize = function(value, length) {
let zeros = ''
if (!length) length = 2
value = value.toString()
for (let i = 0; i < (length - value.length); i++) {
zeros += '0'
}
return zeros + value
}
return formatStr.replace(/"[^"]*"|'[^']*'|\b(?:d{1,4}|M{1,4}|yy(?:yy)?|([hHmstT])\1?|[lLZ])\b/g, function($0) {
switch ($0) {
case 'd': return date.getDate()
case 'dd': return zeroize(date.getDate())
case 'ddd': return ['Sun', 'Mon', 'Tue', 'Wed', 'Thr', 'Fri', 'Sat'][date.getDay()]
case 'dddd': return ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][date.getDay()]
case 'M': return date.getMonth() + 1
case 'MM': return zeroize(date.getMonth() + 1)
case 'MMM': return ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][date.getMonth()]
case 'MMMM': return ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'][date.getMonth()]
case 'yy': return date.getFullYear().substr(2)
case 'yyyy': return date.getFullYear()
case 'h': return date.getHours() % 12 || 12
case 'hh': return zeroize(date.getHours() % 12 || 12)
case 'H': return date.getHours()
case 'HH': return zeroize(date.getHours())
case 'm': return date.getMinutes()
case 'mm': return zeroize(date.getMinutes())
case 's': return date.getSeconds()
case 'ss': return zeroize(date.getSeconds())
case 'l': return date.getMilliseconds()
case 'll': return zeroize(date.getMilliseconds())
case 'tt': return date.getHours() < 12 ? 'am' : 'pm'
case 'TT': return date.getHours() < 12 ? 'AM' : 'PM'
}
})
}
const time = Date
time.prototype.format = format
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div>
<h1>商户分组</h1>
</div>
</template>
<script>
export default {
name: 'businessGroup'
}
</script>
<style lang="sass" scoped>
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div>
<h1>商户列表</h1>
</div>
</template>
<script>
export default {
name: 'businessList'
}
</script>
<style lang="sass" scoped>
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div>
<h1>业务管理</h1>
</div>
</template>
<script>
export default {
name: 'businessManagement'
}
</script>
<style lang="sass" scoped>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!