fix(mobile): type direct feedback switch event
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
:checked="form.anonymous"
|
:checked="form.anonymous"
|
||||||
color="#c91825"
|
color="#c91825"
|
||||||
aria-label="匿名提交"
|
aria-label="匿名提交"
|
||||||
@change="form.anonymous = Boolean($event.detail.value)"
|
@change="changeAnonymous"
|
||||||
/>
|
/>
|
||||||
<view>
|
<view>
|
||||||
<text class="anonymous-title">匿名提交</text>
|
<text class="anonymous-title">匿名提交</text>
|
||||||
@@ -167,6 +167,10 @@ const chooseChannel = (channel: DirectChannel) => {
|
|||||||
form.anonymous = channel.defaultAnonymous;
|
form.anonymous = channel.defaultAnonymous;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const changeAnonymous = (event: Event | { detail?: { value?: boolean } }) => {
|
||||||
|
form.anonymous = Boolean('detail' in event ? event.detail?.value : false);
|
||||||
|
};
|
||||||
|
|
||||||
const loadChannels = async () => {
|
const loadChannels = async () => {
|
||||||
channels.value = await listDirectChannels();
|
channels.value = await listDirectChannels();
|
||||||
if (!form.channelCode && channels.value.length) chooseChannel(channels.value[0]);
|
if (!form.channelCode && channels.value.length) chooseChannel(channels.value[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user