Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-11-30 11:14:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
42bfdddc16979400599cdb5311b90249a17916b7
42bfdddc
1 parent
2f0d6331
主题色变量配置调整优化
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
10 deletions
src/App.vue
src/components/CheckboxField/index.vue
src/components/RadioField/index.vue
src/constant.js
src/views/index.vue
src/App.vue
View file @
42bfddd
...
...
@@ -33,7 +33,7 @@ import vConsole from "@/utils/vconsole";
// import { wxJsAPI } from '@/api/wx/config'
// import { apiList } from '@/api/wx/jsApiList.js'
import { wxInfo } from "@/utils/tools";
import { styleColor } from "@/constant.js";
// 使用 include + pinia 状态管理动态缓存页面
const store = mainStore();
const keepPages = computed(() => store.getKeepPages);
...
...
@@ -75,7 +75,9 @@ onMounted(async () => {
// console.warn(err);
// });
// TAG: 全局背景色
document.querySelector("body").setAttribute("style", "background-color:#fff9ef");
document
.querySelector("body")
.setAttribute("style", `background-color: ${styleColor.backgroundColor}`);
});
</script>
...
...
src/components/CheckboxField/index.vue
View file @
42bfddd
...
...
@@ -28,6 +28,7 @@
:name="x"
icon-size="1rem"
shape="square"
:checked-color="themeVars.radioColor"
style="margin-bottom: 0.25rem"
>{{ x }}</van-checkbox
>
...
...
@@ -38,10 +39,15 @@
</template>
<script setup>
import { styleColor } from "@/constant.js";
const props = defineProps({
item: Object,
});
// TAG: 自定义主题颜色
const themeVars = {
radioColor: styleColor.baseColor,
};
onMounted(() => {
// 默认值为数组
props.item.value = [];
...
...
src/components/RadioField/index.vue
View file @
42bfddd
...
...
@@ -23,6 +23,7 @@
:key="index"
:name="x"
icon-size="1rem"
:checked-color="themeVars.radioColor"
style="margin-bottom: 0.25rem"
>{{ x }}</van-radio
>
...
...
@@ -33,9 +34,16 @@
</template>
<script setup>
import { styleColor } from "@/constant.js";
const props = defineProps({
item: Object,
});
// TAG: 自定义主题颜色
const themeVars = {
radioColor: styleColor.baseColor,
};
</script>
<style lang="less" scoped>
...
...
src/constant.js
View file @
42bfddd
...
...
@@ -7,9 +7,6 @@
*/
// 颜色变量
export
const
styleColor
=
{
baseColor
:
'#8F652E'
,
baseFontColor
:
'#333333'
,
subFontColor
:
'#999999'
,
subColor
:
'#2B000C'
,
affixColor
:
'#999999'
,
baseColor
:
'#C2915F'
,
backgroundColor
:
'#FFF9EF'
,
}
...
...
src/views/index.vue
View file @
42bfddd
...
...
@@ -52,6 +52,7 @@ import { queryFormAPI } from "@/api/form.js";
import { addFormDataAPI } from "@/api/data.js";
import { showSuccessToast, showFailToast } from "vant";
import { wxInfo } from "@/utils/tools";
import { styleColor } from "@/constant.js";
// web端判断封面图片高度
const is_pc = computed(() => wxInfo().isPC);
const PHeaderHeight = computed(() => {
...
...
@@ -63,8 +64,8 @@ const PHeaderHeight = computed(() => {
});
// TAG: 自定义主题颜色
const themeVars = {
buttonPrimaryBackground:
"#c2915f"
,
buttonPrimaryBorderColor:
"#c2915f"
,
buttonPrimaryBackground:
styleColor.baseColor
,
buttonPrimaryBorderColor:
styleColor.baseColor
,
};
const $route = useRoute();
...
...
Please
register
or
login
to post a comment