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-08-12 18:01:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
727c83d9b9667a36955c9d041d792b5931e5f05a
727c83d9
1 parent
07bfed81
只读样式显示优化
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
8 deletions
src/components/CheckboxField/index.vue
src/components/DatePickerField/index.vue
src/components/PickerField/MyComponent.vue
src/components/RadioField/index.vue
src/components/TextField/index.vue
src/components/CheckboxField/index.vue
View file @
727c83d
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-12 1
7:04:47
* @LastEditTime: 2024-08-12 1
8:00:11
* @FilePath: /data-table/src/components/CheckboxField/index.vue
* @Description: 多项选择控件
-->
...
...
@@ -20,7 +20,7 @@
<template #input>
<van-checkbox-group v-model="checkbox_value" :direction="item.component_props.direction"
:max="item.component_props.max" style="width: 100%">
<div v-for="x in item.component_props.options" :key="x.title" class="checkbox-wrapper">
<div v-for="x in item.component_props.options" :key="x.title" class="checkbox-wrapper"
:style="{ border: item.component_props.readonly ? 0 : ''}"
>
<div v-if="item.component_props.readonly">
<div v-if="checkbox_value.includes(x.value)" role="checkbox" class="van-checkbox van-checkbox--vertical" tabindex="0" aria-checked="true" data-v-3722f8ba="" style="margin-bottom: 0.25rem;"><div class="van-checkbox__icon van-checkbox__icon--square van-checkbox__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-checkbox__label">{{ x.title }}</span></div>
<div v-else role="checkbox" class="van-checkbox van-checkbox--vertical" tabindex="0" aria-checked="false" data-v-3722f8ba="" style="margin-bottom: 0.25rem;"><div class="van-checkbox__icon van-checkbox__icon--square" style="font-size: 1rem;"><i class="van-badge__wrapper van-icon van-icon-success" style=""><!----><!----><!----></i></div><span class="van-checkbox__label">{{ x.title }}</span></div>
...
...
src/components/DatePickerField/index.vue
View file @
727c83d
<!--
* @Date: 2022-08-31 11:45:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-
08 18:39:36
* @LastEditTime: 2024-08-
12 17:54:17
* @FilePath: /data-table/src/components/DatePickerField/index.vue
* @Description: 日期选择组件
-->
...
...
@@ -12,7 +12,11 @@
<span v-if="item.component_props.required" style="color: red"> *</span>
<span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span>
</div>
<div v-if="item.component_props.readonly" style="padding: 0.5rem 1rem 1rem 0.3rem; font-size: 0.9rem;">
{{ item.value }}
</div>
<van-field
v-else
v-model="item.value"
is-link
readonly
...
...
src/components/PickerField/MyComponent.vue
View file @
727c83d
<!--
* @Date: 2023-03-29 14:55:46
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-0
7-27 19:46:08
* @LastEditTime: 2024-0
8-12 17:52:26
* @FilePath: /data-table/src/components/PickerField/MyComponent.vue
* @Description: 文件描述
-->
<template>
<div style="width: 100%;">
<div v-if="props.component_props.readonly" style="padding: 0.5rem 1rem 1rem 0.3rem; font-size: 0.9rem;">
{{ picker_value }}
</div>
<van-field
v-else
v-model="picker_value"
is-link
readonly
...
...
src/components/RadioField/index.vue
View file @
727c83d
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-12 17:
02:1
3
* @LastEditTime: 2024-08-12 17:
57:2
3
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 单项选择控件
-->
...
...
@@ -17,7 +17,7 @@
<template #input>
<van-radio-group @change="onChange(item)" v-model="radio_value" :direction="item.component_props.direction"
style="width: 100%">
<div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper">
<div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper"
:style="{ border: item.component_props.readonly ? 0 : ''}"
>
<div v-if="item.component_props.readonly">
<div v-if="default_value === 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>
...
...
src/components/TextField/index.vue
View file @
727c83d
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-12 17:
23:34
* @LastEditTime: 2024-08-12 17:
53:35
* @FilePath: /data-table/src/components/TextField/index.vue
* @Description: 单行文本输入框(微信扫描功能)
-->
...
...
@@ -13,7 +13,7 @@
<span :class="[ReadonlyShow ? 'readonly-show' : '']">{{ item.component_props.label }}</span>
</div>
<div class="note-wrapper" v-if="item.component_props.note" v-html="item.component_props.note" />
<div v-if="item.component_props.readonly || (item.component_props.is_camera_scan && !item.component_props.is_edit_camera_scan_result)" style="padding: 0.5rem 1rem; font-size: 0.9rem;">
<div v-if="item.component_props.readonly || (item.component_props.is_camera_scan && !item.component_props.is_edit_camera_scan_result)" style="padding: 0.5rem 1
.3
rem; font-size: 0.9rem;">
{{ item.value }}
</div>
<van-field v-else v-model="item.value" :name="item.name" :type="item.type"
...
...
Please
register
or
login
to post a comment