修改公共默认参数的地址
parent
2dff2f37cb
commit
2c2565faab
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { isEmpty } from 'lodash';
|
||||
import { predefine_colors } from '@/utils';
|
||||
import { predefine_colors } from '@/utils/common';
|
||||
|
||||
interface Props {
|
||||
defaultColor?: string;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { font_weight } from '@/utils/common';
|
||||
interface Props {
|
||||
defaultColor?: string;
|
||||
typeList?: string[]; // 默认显示3个,传递了之后按照传递的显示
|
||||
|
|
@ -37,11 +38,6 @@ const size = defineModel('size', {
|
|||
type: Number,
|
||||
default: 15,
|
||||
});
|
||||
|
||||
const font_weight = [
|
||||
{ name: '加粗', value: 'bold' },
|
||||
{ name: '正常', value: '400' },
|
||||
];
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { predefine_colors } from '@/utils';
|
||||
import { predefine_colors } from '@/utils/common';
|
||||
interface list_page {
|
||||
color: string;
|
||||
color_percentage: number | undefined;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { predefine_colors } from '@/utils';
|
||||
import { predefine_colors } from '@/utils/common';
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { common_styles_computer, padding_computer, radius_computer, get_math, is_obj_empty, common_img_computer, background_computer, gradient_handle, gradient_computer, margin_computer, box_shadow_computer, border_computer, old_radius, old_padding, old_margin } from '@/utils';
|
||||
import { common_styles_computer, padding_computer, radius_computer, get_math, is_obj_empty, common_img_computer, background_computer, gradient_handle, gradient_computer, margin_computer, box_shadow_computer, border_computer } from '@/utils';
|
||||
import { old_radius, old_padding, old_margin } from "@/utils/common";
|
||||
import { isEmpty, cloneDeep } from 'lodash';
|
||||
import ArticleAPI from '@/api/article';
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@
|
|||
<script setup lang="ts">
|
||||
import customIndex from './components/custom/index.vue';
|
||||
import videoIndex from './components/video/index.vue';
|
||||
import { background_computer, common_styles_computer, get_math, gradient_computer, radius_computer, padding_computer, common_img_computer, is_number, percentage_count, margin_computer, box_shadow_computer, border_computer, old_margin, old_border_and_box_shadow, border_width, get_indicator_location } from '@/utils';
|
||||
import { background_computer, common_styles_computer, get_math, gradient_computer, radius_computer, padding_computer, common_img_computer, is_number, percentage_count, margin_computer, box_shadow_computer, border_computer, border_width, get_indicator_location } from '@/utils';
|
||||
import { old_margin, old_border_and_box_shadow } from "@/utils/common";
|
||||
import { isEmpty, cloneDeep } from 'lodash';
|
||||
const props = defineProps({
|
||||
value: {
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { common_img_computer, common_styles_computer, get_math, gradient_handle, padding_computer, radius_computer, background_computer, border_computer, box_shadow_computer, margin_computer, old_margin } from '@/utils';
|
||||
import { common_img_computer, common_styles_computer, get_math, gradient_handle, padding_computer, radius_computer, background_computer, border_computer, box_shadow_computer, margin_computer } from '@/utils';
|
||||
import { old_margin } from "@/utils/common";
|
||||
import { isEmpty, cloneDeep, throttle } from 'lodash';
|
||||
import ShopAPI from '@/api/shop';
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<template v-if="theme !== '0' && form.is_location_show == '1' && !isEmpty(item.location)">
|
||||
<div :style="border_style"></div>
|
||||
<div class="flex-row jc-sb align-c gap-10">
|
||||
<div class="flex-row align-c gap-2">
|
||||
<div class="flex-row align-b gap-2">
|
||||
<img_or_icon_or_text :value="props.value" type="location" />
|
||||
<span class="text-line-2 flex-1" :style="trends_config('location')">{{ item.location }}</span>
|
||||
</div>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
<template v-if="theme == '0' && form.is_location_show == '1' && !isEmpty(item.location)">
|
||||
<div :style="border_style"></div>
|
||||
<div class="flex-row align-c gap-2">
|
||||
<div class="flex-row align-b gap-2">
|
||||
<img_or_icon_or_text :value="props.value" type="location" />
|
||||
<span class="text-line-2 flex-1" :style="trends_config('location')">{{ item.location }}</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,21 @@
|
|||
<color-text-size-group v-model:color="form.realstore_location_color" v-model:typeface="form.realstore_location_typeface" v-model:size="form.realstore_location_size" default-color="#000000"></color-text-size-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业状态">
|
||||
<color-text-size-group v-model:color="form.realstore_state_color" v-model:typeface="form.realstore_state_typeface" v-model:size="form.realstore_state_size" default-color="#000000"></color-text-size-group>
|
||||
<div class="flex-col gap-10">
|
||||
<el-form-item label="默认颜色">
|
||||
<color-picker v-model="form.realstore_state_color" default-color="#000000"></color-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业中颜色">
|
||||
<color-picker v-model="form.realstore_state_color" default-color="#000000"></color-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="休息中颜色">
|
||||
<el-radio-group v-model="form.realstore_state_typeface">
|
||||
<el-radio v-for="item in font_weight" :key="item.value" :value="item.value">{{ item.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <color-picker v-model="color" :default-color="props.defaultColor"></color-picker> -->
|
||||
<color-text-size-group v-model:color="form.realstore_state_color" v-model:typeface="form.realstore_state_typeface" v-model:size="form.realstore_state_size" default-color="#000000"></color-text-size-group>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<template v-if="data.theme != '3'">
|
||||
<el-form-item label="营业间距">
|
||||
|
|
@ -112,6 +126,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { isEmpty } from "lodash";
|
||||
import { font_weight } from '@/utils/common';
|
||||
// 动态生成 tab 配置
|
||||
const tabs = [
|
||||
{ label: "导航", name: "navigation", show: ['0', '1', '2', '3']},
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { background_computer, common_styles_computer, get_math, gradient_computer, gradient_handle, padding_computer, radius_computer, common_img_computer, margin_computer, old_margin, box_shadow_computer, border_computer, old_border_and_box_shadow, old_radius, old_padding } from '@/utils';
|
||||
import { background_computer, common_styles_computer, get_math, gradient_computer, gradient_handle, padding_computer, radius_computer, common_img_computer, margin_computer, box_shadow_computer, border_computer } from '@/utils';
|
||||
import { old_margin, old_border_and_box_shadow, old_radius, old_padding } from '@/utils/common'
|
||||
import { isEmpty, throttle } from 'lodash';
|
||||
import SeckillAPI from '@/api/seckill';
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
<slider v-model="form.number_code_size"></slider>
|
||||
</el-form-item>
|
||||
</card-container>
|
||||
|
||||
<div class="divider-line"></div>
|
||||
<card-container>
|
||||
<div class="mb-12">图标设置</div>
|
||||
|
|
@ -99,6 +98,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { font_weight } from '@/utils/common';
|
||||
/**
|
||||
* @description: 用户信息 (样式)
|
||||
* @param value{Object} 样式数据
|
||||
|
|
@ -109,10 +109,6 @@ const props = defineProps({
|
|||
default: () => {},
|
||||
},
|
||||
});
|
||||
const font_weight = reactive([
|
||||
{ name: '加粗', value: 'bold' },
|
||||
{ name: '正常', value: '400' },
|
||||
]);
|
||||
// 默认值
|
||||
let form = ref(props.value);
|
||||
// 多颜色选择器事件
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import App from './App.vue';
|
|||
import router from './router';
|
||||
import Particles from 'vue3-particles';
|
||||
|
||||
import common from '@/utils/common';
|
||||
import popUp from '@/utils/popUp';
|
||||
//default styles
|
||||
import Vue3DraggableResizable from 'vue3-draggable-resizable';
|
||||
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css';
|
||||
|
|
@ -14,8 +14,8 @@ import '@/styles/index.scss';
|
|||
import 'swiper/css';
|
||||
const app = createApp(App);
|
||||
|
||||
// 将common设置为全局
|
||||
app.config.globalProperties.$common = common;
|
||||
// 将popUp设置为全局
|
||||
app.config.globalProperties.$common = popUp;
|
||||
app.directive('focus', {
|
||||
mounted(el) {
|
||||
el.querySelector('input').focus();
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@
|
|||
.align-c {
|
||||
align-items: center;
|
||||
}
|
||||
.align-b {
|
||||
align-items: baseline;
|
||||
}
|
||||
.align-e {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,16 @@
|
|||
// 定义一个MessageType类型,可以根据实际情况进行修改
|
||||
type MessageType = 'info' | 'success' | 'warning' | 'error';
|
||||
type Message = 'delete' | 'save' | 'edit' | 'add';
|
||||
export default {
|
||||
// massageBox封装
|
||||
message_box: (msg: string, type: MessageType = 'warning') => {
|
||||
return new Promise((resolve, reject) => {
|
||||
ElMessageBox.confirm(msg, '温馨提示', {
|
||||
type: type,
|
||||
autofocus: false,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
})
|
||||
.then(() => {
|
||||
resolve(true);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
// alert封装
|
||||
alert: (msg: string, type: MessageType = 'warning') => {
|
||||
return new Promise((resolve, reject) => {
|
||||
ElMessageBox.alert(msg, '温馨提示', {
|
||||
type: type,
|
||||
autofocus: false,
|
||||
confirmButtonText: '确定',
|
||||
}).then(() => {
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
// 定义一组预定义的颜色数组,用于在各种场景中轻松引用这些颜色
|
||||
// 这些颜色包括从白色到黑色的不同灰度,以及一些鲜艳的颜色,格式有十六进制、RGB、RGBA、HSV、HSL等
|
||||
export const predefine_colors = ['#fff', '#ddd', '#ccc', '#999', '#666', '#333', '#000', '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#c71585', 'rgba(255, 69, 0, 0.68)', 'rgb(255, 120, 0)', 'hsv(51, 100, 98)', 'hsva(120, 40, 94, 0.5)', 'hsl(181, 100%, 37%)', '#1F93FF', '#c7158577'];
|
||||
// 数据的默认值,避免没有值的时候报错
|
||||
export const old_radius = { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0 };
|
||||
|
||||
export const old_padding = { padding: 0, padding_top: 0, padding_bottom: 0, padding_left: 0, padding_right: 0 };
|
||||
|
||||
export const old_margin = { margin: 0, margin_top: 0, margin_bottom: 0, margin_left: 0, margin_right: 0 };
|
||||
|
||||
export const old_border_and_box_shadow = { border_is_show: '0', border_color: '#FF3F3F', border_style: 'solid',border_size: { padding: 1, padding_top: 1, padding_right: 1, padding_bottom: 1, padding_left: 1, }, box_shadow_color: '', box_shadow_x: 0, box_shadow_y: 0, box_shadow_blur: 0, box_shadow_spread: 0 };
|
||||
// 只好设置
|
||||
export const font_weight = [
|
||||
{ name: '加粗', value: 'bold' },
|
||||
{ name: '正常', value: '400' },
|
||||
];
|
||||
|
|
@ -1,13 +1,5 @@
|
|||
import CommonAPI from '@/api/common';
|
||||
import { isEmpty } from 'lodash';
|
||||
// 定义一组预定义的颜色数组,用于在各种场景中轻松引用这些颜色
|
||||
// 这些颜色包括从白色到黑色的不同灰度,以及一些鲜艳的颜色,格式有十六进制、RGB、RGBA、HSV、HSL等
|
||||
export const predefine_colors = ['#fff', '#ddd', '#ccc', '#999', '#666', '#333', '#000', '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#c71585', 'rgba(255, 69, 0, 0.68)', 'rgb(255, 120, 0)', 'hsv(51, 100, 98)', 'hsva(120, 40, 94, 0.5)', 'hsl(181, 100%, 37%)', '#1F93FF', '#c7158577'];
|
||||
// 数据的默认值,避免没有值的时候报错
|
||||
export const old_radius = { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0 };
|
||||
export const old_padding = { padding: 0, padding_top: 0, padding_bottom: 0, padding_left: 0, padding_right: 0 };
|
||||
export const old_margin = { margin: 0, margin_top: 0, margin_bottom: 0, margin_left: 0, margin_right: 0 };
|
||||
export const old_border_and_box_shadow = { border_is_show: '0', border_color: '#FF3F3F', border_style: 'solid',border_size: { padding: 1, padding_top: 1, padding_right: 1, padding_bottom: 1, padding_left: 1, }, box_shadow_color: '', box_shadow_x: 0, box_shadow_y: 0, box_shadow_blur: 0, box_shadow_spread: 0 };
|
||||
/**
|
||||
* 判断一个对象是否为空。
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue