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 16:07:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20d20e4b365cd749306013c0dc6049050ffd68a8
20d20e4b
1 parent
4ceb52a6
地址选择器默认值和可读显示
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
src/components/AreaPickerField/MyComponent.vue
src/components/AreaPickerField/MyComponent.vue
View file @
20d20e4
<!--
* @Date: 2023-03-29 15:27:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-06 16:01:31
* @FilePath: /data-table/src/components/AreaPickerField/MyComponent.vue
* @Description: 文件描述
-->
<template>
<div style="width: 100%;">
<van-field
...
...
@@ -6,7 +13,7 @@
readonly
:required="props.component_props.required"
placeholder="请选择省市区"
@click="
showPicker = true
"
@click="
onClick
"
:border="show_address ? true : false"
/>
<van-field
...
...
@@ -14,6 +21,7 @@
v-model="address"
placeholder="请填写详细地址"
:border="false"
:readonly="props.component_props.readonly"
/>
<van-divider />
...
...
@@ -38,10 +46,17 @@ import { useCustomFieldValue } from '@vant/use';
const props = inject('props');
const show_address = ref(!props.component_props.no_street)
const address = ref(
""
);
const address = ref(
props.component_props.default.input_value
);
const city_code = ref("");
const showPicker = ref(false);
let fieldValue = ref("");
let fieldValue = ref(props.component_props.default.picker_value);
const onClick = () => {
if (!props.component_props.readonly) { // 非只读状态下可以点击弹出
showPicker.value = true;
}
};
const result_value = computed(() => {
return {
address: fieldValue.value + ' ' + address.value,
...
...
Please
register
or
login
to post a comment