tiny-vue
tiny-vue copied to clipboard
🐛 [Bug]: popeditor组件,readyonly只读属性有歧义
Version
3.12
Vue Version
3.2.47
Link to minimal reproduction
<template>
<tiny-popeditor
v-model="value"
:readonly="true"
:grid-op="gridOp"
text-field="name"
value-field="id"></tiny-popeditor>
value:{{ value }}
</template>
<script>
import { Popeditor } from "@opentiny/vue";
export default {
components: {
TinyPopeditor: Popeditor
},
data() {
const dataset = [
{
id: "1",
name: "GFD科技YX公司",
city: "福州",
province: "福建"
},
{
id: "2",
name: "WWW科技YX公司",
city: "深圳",
province: "广东"
}
];
return {
value: "",
gridOp: {
columns: [
{ field: "id", title: "ID", width: 40 },
{ field: "name", title: "名称" },
{ field: "province", title: "省份", width: 80 },
{ field: "city", title: "城市", width: 80 }
],
data: dataset
}
};
}
};
</script>
`
### Step to reproduce
1. readonly 设置为true,用户点击输入框(包括输入框后方的"..."图标),会出现弹窗选择。
2. 用户选择数据、点击确认后,popEditor 绑定的值也会跟着改变,与readonly 预期的表现形式不相符。
### What is expected
readonly 为true时,表现形式是否应该为:
1. 纯文本显示,类似input的只读;
2. 保留popeditor的样式,鼠标悬浮在组件上,显示为禁用,点击不显示弹窗。
### What is actually happening
_No response_
### What is your project name
组件
### Any additional comments (optional)
_No response_
Bot detected the issue body's language is not English, translate it automatically.
Title: 🐛 [Bug]: popeditor component, the readyonly read-only attribute is ambiguous, and the expression is not in line with expectations