修改自定义页面的显示
parent
ba6e55f36d
commit
c6226ace2c
|
|
@ -0,0 +1,13 @@
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
class ShopAPI {
|
||||||
|
/** 分类查询接口*/
|
||||||
|
static getShop() {
|
||||||
|
return request({
|
||||||
|
url: `diyapi/goodsinit`,
|
||||||
|
method: 'post',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ShopAPI;
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="img-outer re" :style="com_style">
|
<div class="img-outer re" :style="com_style">
|
||||||
<div :style="text_style">{{ form.text_title }}</div>
|
<div :style="text_style" class="break">
|
||||||
|
<template v-if="form.is_rich_text">
|
||||||
|
<div :innerHTML="form.text_title"></div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ form.text_title }}
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -46,4 +53,13 @@ const set_count = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
.break{
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break:break-all;
|
||||||
|
}
|
||||||
|
.rich-text-content {
|
||||||
|
white-space: normal;
|
||||||
|
word-break:break-all;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@
|
||||||
<el-form-item label="链接">
|
<el-form-item label="链接">
|
||||||
<url-value v-model="form.text_link"></url-value>
|
<url-value v-model="form.text_link"></url-value>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="富文本">
|
||||||
|
<el-switch v-model="form.is_rich_text" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="文字颜色">
|
<el-form-item label="文字颜色">
|
||||||
<color-picker v-model="form.text_color" default-color="#FF3F3F"></color-picker>
|
<color-picker v-model="form.text_color" default-color="#FF3F3F"></color-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ export const text_com_data = {
|
||||||
data_source_id: '',
|
data_source_id: '',
|
||||||
data_source_list: {},
|
data_source_list: {},
|
||||||
text_link: {},
|
text_link: {},
|
||||||
|
is_rich_text: false,
|
||||||
text_color: '#000',
|
text_color: '#000',
|
||||||
text_weight: 'normal',
|
text_weight: 'normal',
|
||||||
text_size: 12,
|
text_size: 12,
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<div class="drag-btn drag-br" :data-index="index" @mousedown.stop="start_drag_btn_br(index, $event)"></div>
|
<div class="drag-btn drag-br" :data-index="index" @mousedown.stop="start_drag_btn_br(index, $event)"></div>
|
||||||
<div class="drag-btn drag-rc" :data-index="index" @mousedown.stop="start_drag_btn_rc(index, $event)"></div>
|
<div class="drag-btn drag-rc" :data-index="index" @mousedown.stop="start_drag_btn_rc(index, $event)"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -560,13 +561,14 @@ defineExpose({
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import 'index.scss';
|
@import 'index.scss';
|
||||||
.model-drag {
|
.model-drag {
|
||||||
overflow-y: auto;
|
overflow-y: scroll;
|
||||||
.model-wall {
|
.model-wall {
|
||||||
width: 39rem;
|
width: 39rem;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
.drag-area {
|
.drag-area {
|
||||||
height: v-bind(drag_area_height);
|
height: v-bind(drag_area_height);
|
||||||
|
margin: 0.5rem 0; // 用于将上边框和下边框显示出来
|
||||||
user-select: none;
|
user-select: none;
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { get_math } from '@/utils';
|
import { get_math } from '@/utils';
|
||||||
|
import ShopAPI from '@/api/shop';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -114,6 +115,10 @@ const base_list = {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// onBeforeMount(() => {
|
||||||
|
// ShopAPI
|
||||||
|
// });
|
||||||
|
|
||||||
const product_list_remove = (index: number) => {
|
const product_list_remove = (index: number) => {
|
||||||
form.value.product_list.splice(index, 1);
|
form.value.product_list.splice(index, 1);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
|
export const ShopStore = defineStore('shop', () => {
|
||||||
|
// 上传是否需要调接口判断
|
||||||
|
const is_shop_api = ref(false);
|
||||||
|
// 上传分类列表
|
||||||
|
const category = ref<any[]>([]);
|
||||||
|
// 上传分类列表
|
||||||
|
const brand = ref<any[]>([]);
|
||||||
|
// 存储上传分类列表
|
||||||
|
const set_category = (data: any[]) => {
|
||||||
|
category.value = data;
|
||||||
|
is_shop_api.value = true;
|
||||||
|
};
|
||||||
|
const set_brand = (data: any[]) => {
|
||||||
|
brand.value = data;
|
||||||
|
is_shop_api.value = true;
|
||||||
|
};
|
||||||
|
// 如果为false 则转为true
|
||||||
|
const set_is_shop_api = (bool: boolean) => {
|
||||||
|
is_shop_api.value = bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
category,
|
||||||
|
is_shop_api,
|
||||||
|
set_category,
|
||||||
|
set_brand,
|
||||||
|
set_is_shop_api,
|
||||||
|
};
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue