<template>
	<view>
		<!-- 头部 -->
		<headContent>
			<template #left>
				<reverse-back />
			</template>
			<template #content>
				<view class="haed-title">
					系统设置
				</view>
			</template>
		</headContent>

		<gap />
		<view class="set-list">
			<view class="set-item">
				<text>语言切换</text>
				<view class="set-moer">
					<text class="set-moer-text">简体中文</text>
					<text class="set-moer-icon iconfont">&#xe88e;</text>
				</view>
			</view>
			<view class="set-item">
				<text>网络检查</text>
				<view class="set-moer">
					<text class="set-moer-icon iconfont">&#xe88e;</text>
				</view>
			</view>
			<view class="set-item" @click.stop="selectStocksColor()">
				<text>涨跌颜色</text>
				<view class="set-moer">
					<text class="set-moer-text set-color">{{ stocksColorObj[stocksColor] }}</text>
					<text class="set-moer-icon iconfont">&#xe88e;</text>
				</view>
			</view>
		</view>

		<setting-color ref="settingColorRef"/>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	import reverseBack from "@/components/headModules/reverse-back.vue"
	export default {
		name: 'setting',
		components: {
			reverseBack
		},
		computed: {
			...mapGetters([
				'stocksColor'
			]),
		},

		data() {
			return {
				stocksColorObj: this.$stocksColorObj,
			};
		},
		methods:{
			// 修改股票颜色
			selectStocksColor(){
				this.$nextTick(() => {
					this.$refs.settingColorRef.open();
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.set-list {
		width: 100%;
		padding: 0 $pages-padding;

		.set-item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 90rpx;
			width: 100%;
			border-bottom: 1rpx solid $border-color;
			font-size: 24rpx;
			color: #0f0f0f;

			text {
				flex-shrink: 0;
			}

			.set-moer {
				flex-shrink: 0;
				display: flex;
				align-items: center;

				.set-moer-text {
					font-size: 26rpx;
				}

				.set-moer-icon {
					color: #ccc;
					font-size: 28rpx;
				}

				.set-color {
					color: $Theme-Color;
				}
			}
		}
	}
</style>