|
|
@@ -31,13 +31,15 @@ app.use(DatePicker);
|
|
|
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
setup(props) {
|
|
|
- const minDate = new Date(2020, 0, 1),
|
|
|
- const maxDate = new Date(2025, 10, 1),
|
|
|
+ const minDate = new Date(2020, 0, 1);
|
|
|
+ const maxDate = new Date(2025, 10, 1);
|
|
|
const currentDate = new Date(2022, 4, 10, 10, 10);
|
|
|
const confirm = ({ selectedValue, selectedOptions })=>{
|
|
|
- Toast.text(selectedOptions.map((val: any) => val.text).join(''));
|
|
|
+ showToast.text(selectedOptions.map((val: any) => val.text).join(''));
|
|
|
}
|
|
|
return {
|
|
|
currentDate,
|
|
|
@@ -125,11 +127,13 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
setup(props) {
|
|
|
const currentDate = new Date(2022, 4, 10, 10, 10);
|
|
|
const confirm = ( { selectedValue, selectedOptions } )=>{
|
|
|
- Toast.text(selectedOptions.map((val: any) => val.text).join('-'));
|
|
|
+ showToast.text(selectedOptions.map((val: any) => val.text).join('-'));
|
|
|
}
|
|
|
return {
|
|
|
currentDate,
|
|
|
@@ -159,12 +163,15 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
+ setup() {
|
|
|
const currentDate = new Date(2022, 4, 10, 10, 10);
|
|
|
const confirm = ( { selectedValue, selectedOptions } )=>{
|
|
|
date = selectedValue.slice(0, 3).join('-');
|
|
|
time = selectedValue.slice(3).join(':');
|
|
|
- Toast.text(date + ' ' + time) ;
|
|
|
+ showToast.text(date + ' ' + time) ;
|
|
|
}
|
|
|
return {
|
|
|
currentDate,
|
|
|
@@ -193,11 +200,13 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
setup(props) {
|
|
|
const currentDate = new Date(2022, 4, 10, 10, 10);
|
|
|
const confirm = ( { selectedValue, selectedOptions } )=>{
|
|
|
- Toast.text(selectedValue.join(':'));
|
|
|
+ showToast.text(selectedValue.join(':'));
|
|
|
}
|
|
|
return {
|
|
|
currentDate,
|
|
|
@@ -230,13 +239,15 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
setup(props) {
|
|
|
const currentDate = new Date(2022, 4, 10, 10, 10);
|
|
|
const confirm = ( { selectedValue, selectedOptions } )=>{
|
|
|
date = selectedOptions.slice(1, 3).map((op) => op.text).join('');
|
|
|
time = selectedOptions.slice(3).map((op) => op.value).join(':');
|
|
|
- Toast.text(selectedOptions[0].text + '年' + date + ' ' + time);
|
|
|
+ showToast.text(selectedOptions[0].text + '年' + date + ' ' + time);
|
|
|
}
|
|
|
const formatter = (type: string, option) => {
|
|
|
switch (type) {
|
|
|
@@ -287,11 +298,13 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
setup(props) {
|
|
|
const currentDate = new Date(2022, 4, 10, 10, 10);
|
|
|
const confirm = ( { selectedValue, selectedOptions } )=>{
|
|
|
- Toast.text(selectedValue.join(':')) ;
|
|
|
+ showToast.text(selectedValue.join(':')) ;
|
|
|
}
|
|
|
return {
|
|
|
currentDate,
|
|
|
@@ -325,6 +338,8 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ref } from 'vue';
|
|
|
+ import { showToast } from '@nutui/nutui';
|
|
|
+ import '@nutui/nutui/dist/packages/toast/style';
|
|
|
export default {
|
|
|
setup(props) {
|
|
|
const currentDate = new Date(2022, 4, 10, 0, 0);
|
|
|
@@ -355,7 +370,7 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型。将 type
|
|
|
return options;
|
|
|
};
|
|
|
const confirm = ( { selectedValue, selectedOptions } )=>{
|
|
|
- Toast.text(selectedOptions.map((option) => option.text).join(''));
|
|
|
+ showToast.text(selectedOptions.map((option) => option.text).join(''));
|
|
|
}
|
|
|
return {
|
|
|
currentDate,
|