hookehuyr

✨ feat(所有组件): 组件标题显示为可编辑样式

需要处理编辑页面适配编辑功能时出现的问题解决方案,Bob说把样式和流程页显示统一
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-03 20:34:12
* @LastEditTime: 2024-08-22 09:58:05
* @FilePath: /data-table/src/components/AppointmentField/index.vue
* @Description: 预约时间控件
-->
......@@ -38,7 +38,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 注入子组件属性
......
<!--
* @Date: 2022-08-30 14:32:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 22:18:08
* @LastEditTime: 2024-08-22 09:58:15
* @FilePath: /data-table/src/components/AreaPickerField/index.vue
* @Description: 省市区选择控件
-->
......@@ -32,7 +32,7 @@ const props = defineProps({
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
if (props.item.component_props.default) { // 存在默认值时业务逻辑
......
<!--
* @Date: 2022-09-14 11:00:01
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-07 18:13:33
* @LastEditTime: 2024-08-22 09:58:33
* @FilePath: /data-table/src/components/CalendarField/index.vue
* @Description: 日历选择控件
-->
......@@ -46,7 +46,7 @@ const props = defineProps({
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const show = ref(false);
......
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-14 15:25:26
* @LastEditTime: 2024-08-22 09:58:37
* @FilePath: /data-table/src/components/CheckboxField/index.vue
* @Description: 多项选择控件
-->
......@@ -60,7 +60,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 校验函数返回 true 表示校验通过,false 表示不通过
......
......@@ -56,7 +56,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const showPicker = ref(false);
const currentDate = ref([]);
......
......@@ -52,7 +52,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const showPicker = ref(false);
const readonly = props.item.component_props.readonly;
......
......@@ -38,7 +38,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
onMounted(() => {
props.item.value = props.item.component_props.default;
......
......@@ -108,7 +108,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const emit = defineEmits(["active"]);
const show_empty = ref(false);
......
......@@ -53,7 +53,7 @@ const HideShow = computed(() => {
return !props.item.component_props.disabled
})
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const gender_value = ref(props.item.component_props.default);
......
......@@ -50,7 +50,7 @@ const HideShow = computed(() => {
});
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// let obj = {
......
<!--
* @Date: 2022-09-14 14:44:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-19 15:22:29
* @LastEditTime: 2024-08-22 09:59:32
* @FilePath: /data-table/src/components/IdentityField/index.vue
* @Description: 身份证输入控件
-->
......@@ -75,7 +75,7 @@ const HideShow = computed(() => {
});
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
onMounted(() => {
props.item.value = props.item.component_props.default;
......
......@@ -91,7 +91,7 @@ const HideShow = computed(() => {
});
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 默认图片列表
const default_tmp = ref(props.item.component_props.default)
......
......@@ -72,7 +72,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// TAG: 自定义主题颜色
const themeVars = {
......
......@@ -45,7 +45,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 集合组标识
......
......@@ -66,7 +66,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
let content = "";
......
......@@ -42,7 +42,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 集合组标识
......
......@@ -83,7 +83,7 @@ const HideShow = computed(() => {
});
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
onMounted(() => {
props.item.value = props.item.component_props.default;
......
......@@ -41,7 +41,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 子组件通信,适配规则触发
......
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-12 17:57:23
* @LastEditTime: 2024-08-22 09:55:29
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 单项选择控件
-->
......@@ -81,7 +81,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 校验函数返回 true 表示校验通过,false 表示不通过
......
......@@ -34,7 +34,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 注入子组件属性
provide('props', props.item);
......
......@@ -57,7 +57,7 @@ const props = defineProps({
const show = ref(false);
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
</script>
......
......@@ -37,7 +37,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const refComponent = ref(null)
......
......@@ -51,7 +51,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
onMounted(() => {
......
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-19 18:29:33
* @LastEditTime: 2024-08-22 09:54:46
* @FilePath: /data-table/src/components/TextField/index.vue
* @Description: 单行文本输入框(微信扫描功能)
-->
......@@ -43,7 +43,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 集合组标识
......
......@@ -53,7 +53,7 @@ const HideShow = computed(() => {
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
onMounted(() => {
......
......@@ -44,7 +44,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
const showPicker = ref(false);
const currentTime = ref([]);
......
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-07 18:15:36
* @LastEditTime: 2024-08-22 10:00:21
* @FilePath: /data-table/src/components/VolunteerGroupField/index.vue
* @Description: 义工组别选择控件
-->
......@@ -75,7 +75,7 @@ const HideShow = computed(() => {
})
// 只读显示-流程模式
const ReadonlyShow = computed(() => {
return $route.query.page_type === 'flow' && !props.item.component_props.readonly;
return ($route.query.page_type === 'flow' || $route.query.page_type === 'edit') && !props.item.component_props.readonly;
});
// 校验函数返回 true 表示校验通过,false 表示不通过
......