Merge branch 'dev-sws' into dev-yxl

v1.0.0
于肖磊 2024-09-13 16:37:56 +08:00
commit 7764c4f9ae
2 changed files with 11 additions and 11 deletions

View File

@ -8,7 +8,7 @@
<div class="url-value-content pa-20 flex-row">
<div v-if="custom_link_type.length !== 1" class="left-content">
<el-menu :default-active="link_select" class="w br-none" @select="handle_select">
<el-menu-item v-for="item in base_data" :key="item.type" :index="item.type" :disabled="!custom_link_type.includes(item.type)">
<el-menu-item v-for="item in base_data" :key="item.type" :index="item.type" :disabled="!(custom_link_type.includes(item.type) || custom_link_type.length == 0)">
<span>{{ item.name }}</span>
</el-menu-item>
</el-menu>
@ -72,6 +72,7 @@ const app = getCurrentInstance();
* @param modelValue{Object} 默认值
* @param dialogVisible {Boolean} 弹窗显示
* @param type{String} 链接类型为空数组则表示无限制全部可用传过来则表示传的值可用
* @param multiple{Boolean} 是否多选 默认单选 只生效 商品页面 goods/ 文章页面 article/ DIY页面 diy/ 设计页面 design/ 自定义页面 custom-view/ 品牌页面 brand
* @return {*} update:modelValue
*/
const props = defineProps({
@ -79,7 +80,6 @@ const props = defineProps({
type: Array as PropType<string[]>,
default: () => [],
},
// goods/ article/ DIY diy/ design/ custom-view/ brand
multiple: {
type: Boolean,
default: false,

View File

@ -43,7 +43,7 @@
<el-form-item label="右侧按钮">
<el-switch v-model="form.is_right_button" active-value="1" inactive-value="0"></el-switch>
</el-form-item>
<el-form-item v-if="is_card && form.is_right_button != '0'" label="链接">
<el-form-item v-if="form.is_right_button != '0'" label="链接">
<url-value v-model="form.more_link"></url-value>
</el-form-item>
</card-container>
@ -71,7 +71,7 @@
</div>
</template>
<script setup lang="ts">
import { get_math } from "@/utils";
import { get_math } from '@/utils';
const props = defineProps({
value: {
type: Object,
@ -83,25 +83,25 @@ const is_card = computed(() => form.value.notice_style == 'card');
const is_text = computed(() => form.value.title_type == 'text');
const state = reactive({
form: props.value
form: props.value,
});
const { form } = toRefs(state);
const add = () => {
form.value.notice_list.push({
id: get_math(),
notice_title: '',
notice_link: '',
is_show: '1'
})
}
notice_link: {},
is_show: '1',
});
};
const remove = (index: number) => {
form.value.notice_list.splice(index, 1);
}
};
//
const on_sort = (new_list: nav_group[]) => {
form.value.notice_list = new_list;
}
};
</script>
<style lang="scss" scoped>
.card.mb-8 {