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
2024-06-06 18:22:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2cb0322d512e3c2fdd42b216d7f031f85676fd90
2cb0322d
1 parent
78c2d2c4
邮箱性别身份证组件默认值和只读显示
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
src/components/EmailField/index.vue
src/components/GenderField/index.vue
src/components/IdentityField/index.vue
src/components/EmailField/index.vue
View file @
2cb0322
...
...
@@ -33,6 +33,9 @@ const props = defineProps({
const HideShow = computed(() => {
return !props.item.component_props.disabled
})
onMounted(() => {
props.item.value = props.item.component_props.default;
})
const required = props.item.component_props.required;
const validator = (val) => {
if (required && !val) {
...
...
src/components/GenderField/index.vue
View file @
2cb0322
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
3-12-19 16:05:16
* @LastEditTime: 202
4-06-06 18:18:11
* @FilePath: /data-table/src/components/GenderField/index.vue
* @Description: 性别选择控件
-->
...
...
@@ -21,7 +21,11 @@
<template #input>
<van-radio-group @change="onChange(item)" v-model="gender_value" :direction="item.component_props.direction" style="width: 100%">
<div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper">
<van-radio :name="x.value" icon-size="1rem" :checked-color="themeVars.radioColor"
<div v-if="item.component_props.readonly" class="readonly-show">
<div v-if="item.component_props.default === x.value" role="radio" class="van-radio van-radio--vertical" tabindex="0" aria-checked="true" data-v-04873bb2="" style="margin-bottom: 0.25rem;"><div class="van-radio__icon van-radio__icon--round van-radio__icon--checked" style="font-size: 1rem;"><i class="van-badge__wrapper van-icon van-icon-success" style="border-color: rgb(194, 145, 95); background-color: rgb(194, 145, 95);"><!----><!----><!----></i></div><span class="van-radio__label">{{ x.title }}</span></div>
<div v-else role="radio" class="van-radio van-radio--vertical" tabindex="0" aria-checked="false" data-v-04873bb2="" style="margin-bottom: 0.25rem;"><div class="van-radio__icon van-radio__icon--round" style="font-size: 1rem;"><i class="van-badge__wrapper van-icon van-icon-success"><!----><!----><!----></i></div><span class="van-radio__label">{{ x.title }}</span></div>
</div>
<van-radio v-else :name="x.value" icon-size="1rem" :checked-color="themeVars.radioColor"
style="margin-bottom: 0.25rem">{{ x.title }}</van-radio>
</div>
</van-radio-group>
...
...
src/components/IdentityField/index.vue
View file @
2cb0322
<!--
* @Date: 2022-09-14 14:44:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-0
4-08 17:59:03
* @LastEditTime: 2024-0
6-06 18:17:34
* @FilePath: /data-table/src/components/IdentityField/index.vue
* @Description: 身份证输入控件
-->
...
...
@@ -35,7 +35,7 @@
:placeholder="item.component_props.placeholder"
:rules="rules"
:required="item.component_props.required"
:
disabled
="item.component_props.readonly"
:
readonly
="item.component_props.readonly"
:border="false"
>
</van-field>
...
...
@@ -65,6 +65,9 @@ const props = defineProps({
// 隐藏显示
const HideShow = computed(() => {
return !props.item.component_props.disabled
});
onMounted(() => {
props.item.value = props.item.component_props.default;
})
const show = ref(false);
let content = "";
...
...
Please
register
or
login
to post a comment