提交 085f9d9e 编写于 作者: D DCloud_LXH

fix(h5): picker-view value 值没有占位

上级 88439291
...@@ -127,7 +127,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -127,7 +127,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
} }
const oldCurrent = state.value[index] const oldCurrent = state.value[index]
if (oldCurrent !== current) { if (oldCurrent !== current) {
state.value.splice(index, 1, current) state.value[index] = current
// 避免外部直接对此值进行修改 // 避免外部直接对此值进行修改
const value = state.value.map((val) => val) const value = state.value.map((val) => val)
emit('update:value', value) emit('update:value', value)
......
...@@ -4386,7 +4386,7 @@ var PickerView = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -4386,7 +4386,7 @@ var PickerView = /* @__PURE__ */ defineBuiltInComponent({
} }
const oldCurrent = state.value[index2]; const oldCurrent = state.value[index2];
if (oldCurrent !== current) { if (oldCurrent !== current) {
state.value.splice(index2, 1, current); state.value[index2] = current;
const value = state.value.map((val) => val); const value = state.value.map((val) => val);
emit2("update:value", value); emit2("update:value", value);
trigger("change", {}, { trigger("change", {}, {
......
...@@ -9945,7 +9945,7 @@ var PickerView = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -9945,7 +9945,7 @@ var PickerView = /* @__PURE__ */ defineBuiltInComponent({
} }
const oldCurrent = state2.value[index2]; const oldCurrent = state2.value[index2];
if (oldCurrent !== current) { if (oldCurrent !== current) {
state2.value.splice(index2, 1, current); state2.value[index2] = current;
const value = state2.value.map((val) => val); const value = state2.value.map((val) => val);
emit2("update:value", value); emit2("update:value", value);
trigger("change", {}, { trigger("change", {}, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册