Skip to content

Commit 5a88a16

Browse files
committed
opti: remove vuex in extUI.nvue
1 parent 40b81b9 commit 5a88a16

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

pages/tabBar/extUI/extUI.nvue

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
</view>
1717
</template>
1818
<script>
19-
import {
20-
mapState,
21-
mapMutations
22-
} from 'vuex';
23-
export default {
19+
export default {
20+
props: {
21+
hasLeftWin: {
22+
type: Boolean
23+
},
24+
leftWinActive: {
25+
type: String
26+
}
27+
},
2428
data() {
2529
return {
2630
hideList: [
@@ -237,27 +241,7 @@
237241
url: '/pages/about/about'
238242
});
239243
},
240-
computed: {
241-
...mapState({
242-
hasLeftWin: state => !state.noMatchLeftWindow,
243-
leftWinActive: state => state.leftWinActive.split('/')[3],
244-
activeOpen: state => state.activeOpen
245-
})
246-
},
247-
// #ifdef H5
248-
watch: {
249-
$route: {
250-
immediate: true,
251-
handler(newRoute) {
252-
if (newRoute.matched.length) {
253-
this.setLeftWinActive(newRoute.path)
254-
}
255-
}
256-
}
257-
},
258-
// #endif
259244
methods: {
260-
...mapMutations(['setLeftWinActive']),
261245
goDetailPage(path) {
262246
const url = '/pages/extUI/' + path + '/' + path
263247
if (this.hasLeftWin) {

0 commit comments

Comments
 (0)