diff --git a/docs/api/media/record-manager.md b/docs/api/media/record-manager.md index 1c90900eba6bdacc48da9ca07b5e635e0c3cfee5..801473037c591fa765ac4a7656f51816a9c61b0e 100644 --- a/docs/api/media/record-manager.md +++ b/docs/api/media/record-manager.md @@ -89,9 +89,11 @@ const innerAudioContext = uni.createInnerAudioContext(); innerAudioContext.autoplay = true; export default { - data: { - text: 'uni-app', - voicePath: '' + data() { + return { + text: 'uni-app', + voicePath: '' + } }, onLoad() { let self = this; diff --git a/docs/api/media/video.md b/docs/api/media/video.md index e732a1f352b6c75188557dd68f61b111e145032f..4d837b1e54e3aaa29483dad9b6ffecc581ac7e62 100644 --- a/docs/api/media/video.md +++ b/docs/api/media/video.md @@ -51,8 +51,10 @@ ``` ```javascript export default { - data: { - src: '' + data() { + return { + src: '' + } }, methods: { test: function () { @@ -195,8 +197,10 @@ uni.chooseMedia({ ``` ```javascript export default { - data: { - src: '' + data() { + return { + src: '' + } }, methods: { test: function () { diff --git a/docs/api/ui/animation.md b/docs/api/ui/animation.md index 5eac166e2d00429c2b3b7d6fdf5477bb9ed73b14..abf461c64a7fb1653fe71bab9fa400c4cc4d0894 100644 --- a/docs/api/ui/animation.md +++ b/docs/api/ui/animation.md @@ -120,8 +120,10 @@ var animation = uni.createAnimation({ ```javascript export default{ - data: { - animationData: {} + data() { + return { + animationData: {} + } }, onShow: function(){ var animation = uni.createAnimation({ diff --git a/docs/api/ui/pulldown.md b/docs/api/ui/pulldown.md index 166a92337865a0ceda836b53b06970ff397a7da1..4418863fd50df21edfb96916b4ab62bb41302155 100644 --- a/docs/api/ui/pulldown.md +++ b/docs/api/ui/pulldown.md @@ -51,8 +51,10 @@ index.vue ```javascript // 仅做示例,实际开发中延时根据需求来使用。 export default { - data: { - text: 'uni-app' + data() { + return { + text: 'uni-app' + } }, onLoad: function (options) { setTimeout(function () { diff --git a/docs/component/barcode.md b/docs/component/barcode.md index 274d2fa15a947b0ff923cb62ce9b7db25a508695..328afda6448ea375a86adb2d2beed6112a5a7914 100644 --- a/docs/component/barcode.md +++ b/docs/component/barcode.md @@ -104,8 +104,10 @@ message|string|失败描述 onLoad() { }, - data: { - fil: [0, 2, 1] + data() { + return { + fil: [0, 2, 1] + } }, methods: { diff --git a/docs/component/live-pusher.md b/docs/component/live-pusher.md index 7d8ea022ca3926d88b99e86b58182bcec703520e..02274f223a0c88d83271ef32de0a818ddd03df8a 100644 --- a/docs/component/live-pusher.md +++ b/docs/component/live-pusher.md @@ -138,8 +138,8 @@ message|string| 具体的网络状态信息 ```javascript