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
2025-02-13 14:38:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
35458b9091a6bcf52b253844ddefa35fc2cc2a29
35458b90
1 parent
269fe9f1
✨ feat(手机,身份证,单行文本): 新需求,使用特定字段查询相关数据测试
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
src/components/IdentityField/index.vue
src/components/PhoneField/index.vue
src/components/TextField/index.vue
src/views/index.vue
src/components/IdentityField/index.vue
View file @
35458b9
...
...
@@ -75,6 +75,8 @@ const $route = useRoute();
const props = defineProps({
item: Object,
});
const emit = defineEmits(["blur"]);
// 隐藏显示
const HideShow = computed(() => {
return !props.item.component_props.disabled
...
...
@@ -327,6 +329,9 @@ const onBlur = (item) => {
// 如果Cookie不存在,新增它
Cookies.set($route.query.code, JSON.stringify({ [props.item.key]: currentValue }), { expires: 1 });
}
// 触发自定义失焦操作
emit("blur", item);
}
</script>
...
...
src/components/PhoneField/index.vue
View file @
35458b9
...
...
@@ -79,6 +79,8 @@ const $route = useRoute();
const props = defineProps({
item: Object,
});
const emit = defineEmits(["blur"]);
// 隐藏显示
const HideShow = computed(() => {
return !props.item.component_props.disabled
...
...
@@ -188,6 +190,9 @@ const onBlur = (item) => {
// 如果Cookie不存在,新增它
Cookies.set($route.query.code, JSON.stringify({ [props.item.key]: currentValue }), { expires: 1 });
}
// 触发自定义失焦操作
emit("blur", item);
}
</script>
...
...
src/components/TextField/index.vue
View file @
35458b9
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
4-11-21 09:25:23
* @LastEditTime: 202
5-02-13 14:30:31
* @FilePath: /data-table/src/components/TextField/index.vue
* @Description: 单行文本输入框(微信扫描功能)
-->
...
...
@@ -38,6 +38,7 @@ const $route = useRoute();
const props = defineProps({
item: Object,
});
const emit = defineEmits(["blur"]);
// 隐藏显示
const HideShow = computed(() => {
...
...
@@ -82,6 +83,9 @@ const onBlur = (item) => {
// 如果Cookie不存在,新增它
Cookies.set($route.query.code, JSON.stringify({ [props.item.key]: currentValue }), { expires: 1 });
}
// 触发自定义失焦操作
emit("blur", item);
};
// 默认识别类型
...
...
src/views/index.vue
View file @
35458b9
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-02-13 1
0:38:24
* @LastEditTime: 2025-02-13 1
4:31:19
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -26,7 +26,7 @@
<van-form ref="myForm" @submit="onSubmit" @failed="onFailed" :scroll-to-error="true">
<van-cell-group :border="false">
<component v-for="(item, index) in formData" :id="item.key" :ref="(el) => setRefMap(el, item)" :key="index"
:is="item.component" :item="item" @active="onActive" @remove="onRemove" />
:is="item.component" :item="item" @active="onActive" @remove="onRemove"
@blur="onBlur"
/>
</van-cell-group>
<!-- 非流程版表单 -->
<div v-if="formData.length && PCommit.visible && !formSetting.is_flow" style="margin: 16px">
...
...
@@ -603,6 +603,13 @@ onMounted(async () => {
}, false);
});
// 自定义失焦操作
const onBlur = (item) => {
// TODO: 之后新增判断逻辑
// TODO:数据变化获取后台数据填充
console.warn(item);
}
// 打开轮询用户是否关注
const onTap = () => {
if (localStorage.getItem('weixin_subscribe') === '0') {
...
...
Please
register
or
login
to post a comment