got a radio button changes on click
This commit is contained in:
parent
0902be2aff
commit
0873f5b8e4
|
@ -1,49 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-dropdown :show-timeout="100" trigger="click">
|
|
||||||
<el-button plain>
|
|
||||||
{{ platform_selection === 'DE' ? 'Platform: DE' : 'Platform: UK' }}
|
|
||||||
<i class="el-icon-caret-bottom el-icon--right" />
|
|
||||||
</el-button>
|
|
||||||
<el-dropdown-menu slot="dropdown" class="no-padding dropdown-menu">
|
|
||||||
<el-dropdown-item>
|
|
||||||
<el-radio-group v-model="platform_selection" style="padding: 10px;">
|
|
||||||
<el-radio :value="DE">
|
|
||||||
DE
|
|
||||||
</el-radio>
|
|
||||||
<el-radio :value="UK">
|
|
||||||
UK
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
value: {
|
|
||||||
type: String,
|
|
||||||
default: 'DE'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
platform_selection: {
|
|
||||||
get() {
|
|
||||||
console.log(this.value)
|
|
||||||
return this.value
|
|
||||||
},
|
|
||||||
set(val) {
|
|
||||||
console.log(this.value)
|
|
||||||
this.$emit('input', val)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.dropdown-menu {
|
|
||||||
z-index: 40000 !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1 +0,0 @@
|
||||||
export { default as PlatformDropdown } from './Platform'
|
|
|
@ -23,24 +23,18 @@
|
||||||
<el-switch v-model="sidebarLogo" class="drawer-switch" />
|
<el-switch v-model="sidebarLogo" class="drawer-switch" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-item">
|
|
||||||
<span>Select Platform</span>
|
|
||||||
<PlatformDropdown v-model="postForm.platform_selection" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ThemePicker from '@/components/ThemePicker'
|
import ThemePicker from '@/components/ThemePicker'
|
||||||
import { PlatformDropdown } from './Dropdown'
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
platform_selection: 'DE'
|
platform_selection: 'DE'
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { ThemePicker, PlatformDropdown },
|
components: { ThemePicker },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
postForm: Object.assign({}, defaultForm)
|
postForm: Object.assign({}, defaultForm)
|
||||||
|
@ -87,10 +81,8 @@ export default {
|
||||||
key: 'theme',
|
key: 'theme',
|
||||||
value: val
|
value: val
|
||||||
})
|
})
|
||||||
},
|
|
||||||
selectPlatform(val) {
|
|
||||||
console.log(val)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,6 +2,15 @@
|
||||||
<div class="dashboard-editor-container">
|
<div class="dashboard-editor-container">
|
||||||
<github-corner class="github-corner" />
|
<github-corner class="github-corner" />
|
||||||
|
|
||||||
|
<el-radio v-model="platform" label="DE">
|
||||||
|
DE
|
||||||
|
</el-radio>
|
||||||
|
<el-radio v-model="platform" label="UK">
|
||||||
|
UK
|
||||||
|
</el-radio>
|
||||||
|
|
||||||
|
<h1>{{ platform }}</h1>
|
||||||
|
|
||||||
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
||||||
|
|
||||||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
||||||
|
@ -85,7 +94,8 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lineChartData: lineChartData.newVisitis
|
lineChartData: lineChartData.newVisitis,
|
||||||
|
platform: 'UK'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue