提交 0a34e41c 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(store): reactive warning

上级 43085e7a
<script lang="ts">
import { state, setLifeCycleNum } from './store/index.uts'
<script lang="uts">
import { state, setLifeCycleNum } from '@/store/index.uts'
export default {
onLaunch: function () {
// 自动化测试
......
......@@ -4,17 +4,21 @@
<view class="uni-padding-wrap">
<text>点击按钮调用 App.uvue methods</text>
<text class="margin-top:6px;">increasetLifeCycleNum 方法</text>
<button class="uni-common-mt" @click="_increasetLifeCycleNum">increase lifeCycleNum</button>
<button class="uni-common-mt" @click="_increasetLifeCycleNum">
increase lifeCycleNum
</button>
<text class="uni-common-mt">lifeCycleNum: {{ lifeCycleNum }}</text>
</view>
</view>
</template>
<script lang="ts">
import { state, setLifeCycleNum } from '@/store/index.uts'
<script lang="uts">
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
return {
_state: state as State,
lifeCycleNum: 0,
}
},
......
......@@ -16,11 +16,12 @@
</view>
</template>
<script lang="ts">
<script lang="uts">
class Page {
constructor(public route : string) {
}
}
export default {
data() {
return {
......
......@@ -12,7 +12,7 @@
</view>
</template>
<script lang="ts">
<script lang="uts">
export default {
data() {
return {
......
......@@ -45,11 +45,13 @@
</view>
</template>
<script lang="ts">
import { state, setLifeCycleNum } from '@/store/index.uts'
<script lang="uts">
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
return {
_state: state as State,
onLoadTime: 0,
onShowTime: 0,
onReadyTime: 0,
......
......@@ -9,8 +9,9 @@
</view>
</template>
<script lang="ts">
<script lang="uts">
import { state } from '@/store/index.uts'
export default {
data() {
return {
......
......@@ -5,11 +5,13 @@
</view>
</template>
<script lang="ts">
import { state, setLifeCycleNum } from '@/store/index.uts'
<script lang="uts">
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
return {
_state: state as State,
isScrolled: false,
}
},
......
......@@ -12,9 +12,15 @@
</view>
</template>
<script lang="ts">
import { state, setLifeCycleNum } from '@/store/index.uts'
<script lang="uts">
import { State, state, setLifeCycleNum } from '@/store/index.uts'
export default {
data() {
return {
_state: state as State
}
},
methods: {
setNavigationBarColor1() {
uni.setNavigationBarColor({
......
type State = {
export type State = {
lifeCycleNum: number
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册