mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: 添加自定义测试上下文和更新模板设置
- 在 AutoActionEditor 和 TemplateSettings 组件中添加 customTestContext 属性 - 更新 CheckInSettings 组件以使用 customTestContext - 移除 TemplateEditor 中的操作按钮部分
This commit is contained in:
@@ -188,23 +188,25 @@
|
||||
</template>
|
||||
</NAlert>
|
||||
</div>
|
||||
<NDivider title-placement="left">
|
||||
签到成功回复
|
||||
</NDivider>
|
||||
<AutoActionEditor
|
||||
:action="config.successAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
:custom-test-context="customTestContext"
|
||||
/>
|
||||
|
||||
<!-- 使用 AutoActionEditor 编辑 action 配置 -->
|
||||
<NFormItem label="签到成功回复">
|
||||
<AutoActionEditor
|
||||
:action="config.successAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="签到冷却回复">
|
||||
<AutoActionEditor
|
||||
:action="config.cooldownAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NDivider title-placement="left">
|
||||
签到冷却回复
|
||||
</NDivider>
|
||||
<AutoActionEditor
|
||||
:action="config.cooldownAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
:custom-test-context="customTestContext"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<NFormItem>
|
||||
@@ -398,6 +400,15 @@ const config = autoActionStore.checkInModule.checkInConfig;
|
||||
const accountInfo = useAccount();
|
||||
const isLoading = ref(false);
|
||||
|
||||
const customTestContext = ref({
|
||||
checkin: {
|
||||
points: 0,
|
||||
consecutiveDays: 0,
|
||||
todayRank: 0,
|
||||
time: new Date()
|
||||
}
|
||||
});
|
||||
|
||||
// 签到模板的特定占位符
|
||||
const checkInPlaceholders = [
|
||||
{ name: '{{checkin.points}}', description: '获得的总积分' },
|
||||
|
||||
Reference in New Issue
Block a user