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
2022-12-21 12:19:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
521d447235d64eda93118334ac5b7258ffd281bb
521d4472
1 parent
17e9d25b
单列选择数据结构调整,多行输入最长文字属性调整
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
src/components/PickerField/index.vue
src/components/TextareaField/index.vue
src/views/index.vue
src/components/PickerField/index.vue
View file @
521d447
<!--
* @Date: 2022-08-30 13:46:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-
08-30 14:23:32
* @LastEditTime: 2022-
12-21 11:25:55
* @FilePath: /data-table/src/components/PickerField/index.vue
* @Description: 单列选择器组件
-->
...
...
@@ -20,6 +20,7 @@
:placeholder="item.component_props.placeholder"
:rules="item.rules"
@click="showPicker = true"
:border="false"
/>
<van-popup v-model:show="showPicker" position="bottom">
<van-picker
...
...
@@ -37,12 +38,12 @@ const props = defineProps({
});
onMounted(() => {
props.item.component_props.options = props.item.component_props.options.map((opt) => {
return {
text: opt,
value: opt,
};
});
//
props.item.component_props.options = props.item.component_props.options.map((opt) => {
//
return {
//
text: opt,
//
value: opt,
//
};
//
});
});
const selectedValues = ref("");
...
...
@@ -56,8 +57,9 @@ const onConfirm = ({ selectedOptions }) => {
<style lang="less" scoped>
.picker-field-page {
margin: 1rem;
.label {
padding: 1rem 1rem 0 1rem
;
// padding: 1rem 1rem 0 0
;
font-size: 0.9rem;
font-weight: bold;
...
...
@@ -66,4 +68,11 @@ const onConfirm = ({ selectedOptions }) => {
}
}
}
:deep(.van-cell--clickable) {
border: 1px solid #eaeaea;
border-radius: 0.25rem;
padding: 0.25rem 0.5rem;
margin-top: 0.5rem;
}
</style>
...
...
src/components/TextareaField/index.vue
View file @
521d447
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-
09 15:37:59
* @LastEditTime: 2022-12-
21 12:15:58
* @FilePath: /data-table/src/components/TextareaField/index.vue
* @Description: 多行文本输入框
-->
...
...
@@ -20,8 +20,8 @@
:required="item.component_props.required"
:rows="item.component_props.rows"
autosize
:maxlength="item.component_props.maxlength"
show-word-limit
:maxlength="item.component_props.maxlength
? item.component_props.maxlength : null
"
:show-word-limit="item.component_props.maxlength"
/>
</div>
</template>
...
...
src/views/index.vue
View file @
521d447
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-19 1
5:27:22
* @LastEditTime: 2022-12-19 1
8:09:55
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
Please
register
or
login
to post a comment