docs(Form): use composition api

This commit is contained in:
chenjiahan
2020-12-15 16:52:29 +08:00
parent 9e86d01e83
commit 23a6f63c4f
11 changed files with 582 additions and 438 deletions

View File

@@ -32,7 +32,7 @@ app.use(DatetimePicker);
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
return {
minDate: new Date(2020, 0, 1),
@@ -60,7 +60,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
const formatter = (type, val) => {
@@ -99,7 +99,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
const formatter = (type, val) => {
@@ -137,7 +137,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentTime = ref('12:00');
return { currentTime };
},
@@ -160,7 +160,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
return {
minDate: new Date(2020, 0, 1),
@@ -187,7 +187,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
return {
minDate: new Date(2020, 0, 1),
@@ -213,7 +213,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentTime = ref('12:00');
const filter = (type, options) => {

View File

@@ -34,7 +34,7 @@ DatetimePicker 通过 type 属性来定义需要选择的时间类型type 为
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
return {
minDate: new Date(2020, 0, 1),
@@ -64,7 +64,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
const formatter = (type, val) => {
@@ -105,7 +105,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
const formatter = (type, val) => {
@@ -145,7 +145,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentTime = ref('12:00');
return { currentTime };
},
@@ -170,7 +170,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
return {
minDate: new Date(2020, 0, 1),
@@ -199,7 +199,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentDate = ref(new Date());
return {
minDate: new Date(2020, 0, 1),
@@ -222,7 +222,7 @@ export default {
import { ref } from 'vue';
export default {
data() {
setup() {
const currentTime = ref('12:00');
const filter = (type, options) => {