hookehuyr

单列选择数据结构调整,多行输入最长文字属性调整

<!--
* @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>
......
<!--
* @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>
......
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-19 15:27:22
* @LastEditTime: 2022-12-19 18:09:55
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......