优化
Former-commit-id: 4d3b3dba4b787cc551e868f564481a9c9d1005cd [formerly 4d3b3dba4b787cc551e868f564481a9c9d1005cd [formerly 4d3b3dba4b787cc551e868f564481a9c9d1005cd [formerly 4d3b3dba4b787cc551e868f564481a9c9d1005cd [formerly a1bee0a09872436a8178d2f3ff28dfcfa1334527 [formerly 165ed9ed5023c54e8b77aaad78d2a08dab1850a7]]]]] Former-commit-id: 6b575639a46cc5b724f1a86715d5d94419dbb38b Former-commit-id: 6e277e97e0ccea94986808b8bcaa49c4e31735a9 Former-commit-id: 3df022a4669e4f8d8e92e548de06d5a5aa793b07 [formerly a28d57f91d62a7f34fdd1861ddaee196f9951596] Former-commit-id: b6878bde8a3b1b90f63ad788741593a70dfb2e13 Former-commit-id: 4ee5dbc6e4a8ed07b4f6bb0ec4a91b94242bcab1 Former-commit-id: 2c886cd2db7924007a8b70089da78bea41996ae7 Former-commit-id: 2fb2dee79878ab07bb821549dd78ce6a80a6d975 Former-commit-id: 6b5b3c21ff34740bc59f760ea6c7f181d1526501
This commit is contained in:
23
src/pages/demo/playground/store/ua/index.vue
Normal file
23
src/pages/demo/playground/store/ua/index.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<p class="d2-mt-0">useragent</p>
|
||||
<el-input :value="ua.ua"></el-input>
|
||||
<p>格式化数据 in vuex: state.d2admin.ua</p>
|
||||
<d2-highlight :code="uaStr"/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
ua: state => state.d2admin.ua
|
||||
}),
|
||||
uaStr () {
|
||||
const { browser, engine, os, device, cpu } = this.ua
|
||||
return JSON.stringify({ browser, engine, os, device, cpu }, null, 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user