mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-06 20:12:36 +03:00
1.2.1
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["latest", {
|
||||
"es2015": { "modules": false }
|
||||
}]
|
||||
]
|
||||
}
|
||||
@@ -194,6 +194,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$emit('input', cell.date)
|
||||
this.$emit('select')
|
||||
},
|
||||
selectYear (year) {
|
||||
const now = new Date(this.now)
|
||||
@@ -20,7 +20,7 @@
|
||||
ref="calendar"
|
||||
v-show="showPopup">
|
||||
<template v-if="!range">
|
||||
<calendar-panel v-model="currentValue" :show="showPopup"></calendar-panel>
|
||||
<calendar-panel @select="showPopup = false" v-model="currentValue" :show="showPopup"></calendar-panel>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="datepicker-top">
|
||||
@@ -109,6 +109,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectDate (date) {
|
||||
|
||||
},
|
||||
closePopup () {
|
||||
this.showPopup = false
|
||||
},
|
||||
Vendored
-6
File diff suppressed because one or more lines are too long
-11
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>vue2-datepicker</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="dist/build.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "vue2-datepicker",
|
||||
"description": "A Datepicker Component For Vue2",
|
||||
"main": "src/datepicker/index.vue",
|
||||
"version": "1.2.0",
|
||||
"main": "datepicker/index.vue",
|
||||
"version": "1.2.1",
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div class="demo">
|
||||
<span class="label">default:</span>
|
||||
<date-picker v-model="value1" lang="en"></date-picker>
|
||||
</div>
|
||||
<div class="demo">
|
||||
<span class="label">range:</span>
|
||||
<date-picker v-model="value2" range lang="zh"></date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DatePicker from './datepicker/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
components: { DatePicker },
|
||||
data () {
|
||||
return {
|
||||
value1: '2017-5-9',
|
||||
value2: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.demo {
|
||||
float:left;
|
||||
margin:250px;
|
||||
}
|
||||
.label{
|
||||
margin-right: 1em;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
new Vue({ // eslint-disable-line
|
||||
el: '#app',
|
||||
render: h => h(App)
|
||||
})
|
||||
@@ -1,71 +0,0 @@
|
||||
var path = require('path')
|
||||
var webpack = require('webpack')
|
||||
|
||||
module.exports = {
|
||||
entry: './src/main.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, './dist'),
|
||||
publicPath: '/dist/',
|
||||
filename: 'build.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
loaders: {
|
||||
}
|
||||
// other vue-loader options go here
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif|svg)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]?[hash]'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
// 'vue$': 'vue/dist/vue.esm.js'
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
historyApiFallback: true,
|
||||
noInfo: true,
|
||||
port: 9000
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
},
|
||||
devtool: '#eval-source-map'
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports.devtool = '#source-map'
|
||||
// http://vue-loader.vuejs.org/en/workflow/production.html
|
||||
module.exports.plugins = (module.exports.plugins || []).concat([
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: false,
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true
|
||||
})
|
||||
])
|
||||
}
|
||||
Reference in New Issue
Block a user