init DatePicker
init DatePicker
This commit is contained in:
parent
46d4f3b314
commit
17e1fcf151
11 changed files with 111 additions and 5 deletions
13
src/components/date-picker/base/date-table.vue
Normal file
13
src/components/date-picker/base/date-table.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
13
src/components/date-picker/base/month-table.vue
Normal file
13
src/components/date-picker/base/month-table.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
13
src/components/date-picker/base/year-table.vue
Normal file
13
src/components/date-picker/base/year-table.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
3
src/components/date-picker/index.js
Normal file
3
src/components/date-picker/index.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import DatePicker from './picker/date-picker';
|
||||
|
||||
export default DatePicker;
|
13
src/components/date-picker/panel/date-range.vue
Normal file
13
src/components/date-picker/panel/date-range.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
13
src/components/date-picker/panel/date.vue
Normal file
13
src/components/date-picker/panel/date.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
13
src/components/date-picker/picker.vue
Normal file
13
src/components/date-picker/picker.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
23
src/components/date-picker/picker/date-picker.js
Normal file
23
src/components/date-picker/picker/date-picker.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import Picker from '../picker.vue';
|
||||
import DatePanel from '../panel/date.vue';
|
||||
import DateRangePanel from '../panel/date-range.vue';
|
||||
|
||||
const getPanel = function (type) {
|
||||
if (type === 'daterange' || type === 'datetimerange') {
|
||||
return DateRangePanel;
|
||||
}
|
||||
return DatePanel;
|
||||
};
|
||||
|
||||
export default {
|
||||
mixins: [Picker],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'date'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.panel = getPanel(this.type);
|
||||
}
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)/).test(value + '');
|
||||
}
|
||||
function addNum (num1, num2) {
|
||||
var sq1, sq2, m;
|
||||
let sq1, sq2, m;
|
||||
try {
|
||||
sq1 = num1.toString().split(".")[1].length;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import Cascader from './components/cascader';
|
|||
import Checkbox from './components/checkbox';
|
||||
import Circle from './components/circle';
|
||||
import Collapse from './components/collapse';
|
||||
import DatePicker from './components/date-picker';
|
||||
import Dropdown from './components/dropdown';
|
||||
import Icon from './components/icon';
|
||||
import Input from './components/input';
|
||||
|
@ -52,6 +53,7 @@ const iview = {
|
|||
Checkbox,
|
||||
CheckboxGroup: Checkbox.Group,
|
||||
Circle,
|
||||
DatePicker,
|
||||
Dropdown,
|
||||
DropdownItem: Dropdown.Item,
|
||||
DropdownMenu: Dropdown.Menu,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<Tabs size="small">
|
||||
<Tab-pane label="macOS" icon="social-apple">标签一的内容</Tab-pane>
|
||||
<Tab-pane label="Windows" icon="social-windows">标签二的内容</Tab-pane>
|
||||
<Tab-pane label="Linux" icon="social-tux">标签三的内容</Tab-pane>
|
||||
<Tabs active-key="key1">
|
||||
<tab-pane label="标签一" key="key1">标签一的内容</tab-pane>
|
||||
<tab-pane label="标签二" key="key2">标签二的内容</tab-pane>
|
||||
<tab-pane label="标签三" key="key3">标签三的内容</tab-pane>
|
||||
</Tabs>
|
||||
</template>
|
||||
<script>
|
||||
|
|
Loading…
Add table
Reference in a new issue