|
|
@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-layout-sider class="sider" width="273"> |
|
|
|
<a-layout-sider class="sider" width="273"> |
|
|
|
<setting-item title="整体风格设置"> |
|
|
|
<setting-item title="整体风格设置"> |
|
|
|
<div class="flex"> |
|
|
|
<img-check-box-group @change="onStyleChange"> |
|
|
|
<style-item img="https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg" :selected="true"/> |
|
|
|
<img-check-box img="https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg" :checked="true" :value="{value: 1, name: 'Dark'}"/> |
|
|
|
<style-item img="https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg" :selected="false"/> |
|
|
|
<img-check-box img="https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg" :value="{value: 2, name: 'Light'}"/> |
|
|
|
</div> |
|
|
|
</img-check-box-group> |
|
|
|
</setting-item> |
|
|
|
</setting-item> |
|
|
|
<setting-item title="主题色"> |
|
|
|
<setting-item title="主题色"> |
|
|
|
<color-check-box-group @change="onColorChange" :defaultValues="['1', '2', '3']" :multiple="false"> |
|
|
|
<color-check-box-group @change="onColorChange" :defaultValues="['1', '2', '3']" :multiple="false"> |
|
|
@ -20,10 +20,10 @@ |
|
|
|
</setting-item> |
|
|
|
</setting-item> |
|
|
|
<a-divider/> |
|
|
|
<a-divider/> |
|
|
|
<setting-item title="导航设置"> |
|
|
|
<setting-item title="导航设置"> |
|
|
|
<div class="flex"> |
|
|
|
<img-check-box-group @change="onNaviChange"> |
|
|
|
<style-item img="https://gw.alipayobjects.com/zos/rmsportal/JopDzEhOqwOjeNTXkoje.svg" :selected="true"/> |
|
|
|
<img-check-box img="https://gw.alipayobjects.com/zos/rmsportal/JopDzEhOqwOjeNTXkoje.svg" :checked="true" :value="{value: 1, name: 'Side Navigation'}"/> |
|
|
|
<style-item img="https://gw.alipayobjects.com/zos/rmsportal/KDNDBbriJhLwuqMoxcAr.svg" :selected="false"/> |
|
|
|
<img-check-box img="https://gw.alipayobjects.com/zos/rmsportal/KDNDBbriJhLwuqMoxcAr.svg" :value="{value: 2, name: 'Top Navigation'}"/> |
|
|
|
</div> |
|
|
|
</img-check-box-group> |
|
|
|
</setting-item> |
|
|
|
</setting-item> |
|
|
|
<setting-item> |
|
|
|
<setting-item> |
|
|
|
<a-list :split="false"> |
|
|
|
<a-list :split="false"> |
|
|
@ -58,7 +58,7 @@ |
|
|
|
</a-list> |
|
|
|
</a-list> |
|
|
|
</setting-item> |
|
|
|
</setting-item> |
|
|
|
<a-divider /> |
|
|
|
<a-divider /> |
|
|
|
<a-button style="width: 100%" icon="copy">拷贝代码</a-button> |
|
|
|
<a-button id="copyBtn" data-clipboard-text="Sorry, you copy nothing O(∩_∩)O~" @click="copyCode" style="width: 100%" icon="copy" >拷贝代码</a-button> |
|
|
|
</a-layout-sider> |
|
|
|
</a-layout-sider> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -68,20 +68,24 @@ import AIcon from 'ant-design-vue/es/icon/icon' |
|
|
|
import SettingItem from './SettingItem' |
|
|
|
import SettingItem from './SettingItem' |
|
|
|
import StyleItem from './StyleItem' |
|
|
|
import StyleItem from './StyleItem' |
|
|
|
import ADivider from 'ant-design-vue/es/divider/index' |
|
|
|
import ADivider from 'ant-design-vue/es/divider/index' |
|
|
|
import ThemeColor from './ThemeColor' |
|
|
|
|
|
|
|
import AList from 'ant-design-vue/es/list/index' |
|
|
|
import AList from 'ant-design-vue/es/list/index' |
|
|
|
import AListItem from 'ant-design-vue/es/list/Item' |
|
|
|
import AListItem from 'ant-design-vue/es/list/Item' |
|
|
|
import AButton from 'ant-design-vue/es/button/button' |
|
|
|
import AButton from 'ant-design-vue/es/button/button' |
|
|
|
import ASwitch from 'ant-design-vue/es/switch/index' |
|
|
|
import ASwitch from 'ant-design-vue/es/switch/index' |
|
|
|
import ASelect from 'ant-design-vue/es/select/index' |
|
|
|
import ASelect from 'ant-design-vue/es/select/index' |
|
|
|
import ColorCheckBox from '../check/ColorCheckBox' |
|
|
|
import ColorCheckBox from '../check/ColorCheckBox' |
|
|
|
|
|
|
|
import ImgCheckBox from '../check/ImgCheckBox' |
|
|
|
|
|
|
|
import Clipboard from 'clipboard' |
|
|
|
|
|
|
|
|
|
|
|
const ASelectOption = ASelect.Option |
|
|
|
const ASelectOption = ASelect.Option |
|
|
|
const ColorCheckBoxGroup = ColorCheckBox.Group |
|
|
|
const ColorCheckBoxGroup = ColorCheckBox.Group |
|
|
|
|
|
|
|
const ImgCheckBoxGroup = ImgCheckBox.Group |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'Setting', |
|
|
|
name: 'Setting', |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
|
|
|
|
ImgCheckBoxGroup, |
|
|
|
|
|
|
|
ImgCheckBox, |
|
|
|
ColorCheckBoxGroup, |
|
|
|
ColorCheckBoxGroup, |
|
|
|
ColorCheckBox, |
|
|
|
ColorCheckBox, |
|
|
|
ASelectOption, |
|
|
|
ASelectOption, |
|
|
@ -90,7 +94,6 @@ export default { |
|
|
|
AButton, |
|
|
|
AButton, |
|
|
|
AListItem, |
|
|
|
AListItem, |
|
|
|
AList, |
|
|
|
AList, |
|
|
|
ThemeColor, |
|
|
|
|
|
|
|
ADivider, |
|
|
|
ADivider, |
|
|
|
StyleItem, |
|
|
|
StyleItem, |
|
|
|
SettingItem, |
|
|
|
SettingItem, |
|
|
@ -99,8 +102,26 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
onColorChange (values, colors) { |
|
|
|
onColorChange (values, colors) { |
|
|
|
if (colors.length > 0) { |
|
|
|
if (colors.length > 0) { |
|
|
|
this.$message.info(`选择了主题色 ${colors}`) |
|
|
|
this.$message.info(`您选择了主题色 ${colors}`) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onStyleChange (values) { |
|
|
|
|
|
|
|
if (values.length > 0) { |
|
|
|
|
|
|
|
this.$message.info(`您选择了 ${values[0].name} 风格`) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onNaviChange (values) { |
|
|
|
|
|
|
|
if (values.length > 0) { |
|
|
|
|
|
|
|
this.$message.info(`您选择了 ${values[0].name} `) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
copyCode () { |
|
|
|
|
|
|
|
let clipboard = new Clipboard('#copyBtn') |
|
|
|
|
|
|
|
const _this = this |
|
|
|
|
|
|
|
clipboard.on('success', function () { |
|
|
|
|
|
|
|
_this.$message.success(`复制成功`) |
|
|
|
|
|
|
|
clipboard.destroy() |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|