mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
docs(Form): use composition api
This commit is contained in:
@@ -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) => {
|
||||
|
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user