SO中文参考
首页
(current)
程序语言
c
java
python
c++
go
javascript
swift
c#
操作系统
linux
ubuntu
centos
unix
数据库
oracle
mysql
mongodb
postgresql
框架
node.js
angular
react-native
avalon
django
twisted
hadoop
.net
移动开发
android
ios
搜索
coder
相关问题
最新问题
I已配置了带有电子邮件/密码的租户,应用程序,称为B2C_1_SIGNUPSIGNIN的用户流,以及Google Identity提供商。两者都已测试,都在门户网站上工作。
在chillada(python)中的影响计算
我正在尝试使用for循环以使R通过具有多个列的输入表进行循环,每个列与特定变量相对应。
<code><template> <div v-if="vmData"> <h1 class="title">{{ vmData.name }}</h1> <hr /> <progress v-if="formDisabled" class="progress is-small is-primary" max="100" > 15% </progress> <div class="columns is-mobile"> <div class="column"> <label class="label">Start Time</label> <div class="field has-addons has-addons-right"> <div class="control is-expanded"> <input v-model="vmData.startTime" class="input" type="time" :disabled="vmData.stopTime == null || formDisabled" /> </div> <p v-if="vmData.startTime" class="control"> <button @click="clearStartTime()" class="button is-primary" :disabled="formDisabled" > Clear </button> </p> </div> </div> <div class="column"> <div class="field"> <label class="label">Stop Time</label> <div class="control"> <input v-model="vmData.stopTime" class="input" type="time" :disabled="formDisabled" /> </div> </div> </div> </div> <div class="field"> <label class="label">Days of Week</label> <div class="columns has-text-centered is-mobile"> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Mon" :disabled="formDisabled" /> Mon </div> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Tue" :disabled="formDisabled" /> Tue </div> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Wed" :disabled="formDisabled" /> Wed </div> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Thu" :disabled="formDisabled" /> Thu </div> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Fri" :disabled="formDisabled" /> Fri </div> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Sat" :disabled="formDisabled" /> Sat </div> <div class="column"> <input type="checkbox" v-model="vmData.daysOfWeek.Sun" :disabled="formDisabled" /> Sun </div> </div> </div> <div v-if="formErrors.length > 0" class="notification is-warning is-light"> <p v-for="error in formErrors" :key="error">{{ error }}</p> </div> <div class="field is-grouped is-grouped-right"> <div class="control"> <button v-if="emptySchedule == false" @click="removeSchedule()" class="button is-primary" :disabled="formDisabled" > <i class="fa-solid fa-xmark"></i> Remove Schedule </button> </div> <div class="control"> <button @click="updateSchedule()" class="button is-link is-right" :disabled="formDisabled || formErrors.length > 0" > <i class="fa-regular fa-clock"></i> Apply </button> </div> </div> </div> </template> <script> import { timeToDate } from "../helper.js"; export default { props: ["vm"], emits: ["applied"], watch: { vm: function (newVal) { this.vmData = newVal; }, vmData: { handler: function (newVal) { let errors = []; if (newVal.stopTime == null) { errors.push("Schedule requires a stop time"); } else { // Check if at least one day is defined let dayCount = 0; Object.keys(newVal.daysOfWeek).forEach(function (value) { if (newVal.daysOfWeek[value]) { dayCount += 1; } }); if (dayCount == 0) { errors.push("Schedule requires at least 1 day set"); } // Check if start date is before end date if (newVal.startTime && newVal.stopTime) { if (timeToDate(newVal.startTime) >= timeToDate(newVal.stopTime)) { errors.push("Start time should be before stop time"); } else if (timeToDate(newVal.stopTime) - timeToDate(newVal.startTime) < 1800000) { errors.push("Schedule should be at least 30 minutes long") } } } this.formErrors = errors; }, deep: true, }, }, mounted() { // Make a deep copy of this this.vmData = JSON.parse(JSON.stringify(this.vm)); // Work out if it's an empty schedule if (!this.vm.stopTime) { this.emptySchedule = true; } else { this.emptySchedule = false; } }, methods: { clearStartTime: function () { this.vmData.startTime = null; }, removeSchedule: function () { this.formDisabled = true; let headers = new Headers({ Accept: "application/json, text/plain, */*", "Content-Type": "application/json", }); fetch(`/api/schedule`, { method: "DELETE", headers: headers, body: JSON.stringify(this.vmData), }).then(() => { this.formDisabled = false; this.$emit("applied"); }); }, updateSchedule: function () { this.formDisabled = true; let headers = new Headers({ Accept: "application/json, text/plain, */*", "Content-Type": "application/json", }); fetch(`/api/schedule`, { method: "POST", headers: headers, body: JSON.stringify(this.vmData), }).then(() => { this.formDisabled = false; this.$emit("applied"); }); }, }, data() { return { formDisabled: false, vmData: null, formErrors: [], emptySchedule: null, }; }, }; </script> </code>
我如何在Firefox / Firebug中美化JavaScript和CSS?
Moviepyv2您如何定位文本clip并应用效果?
如何确保实现接口的类必须必须定义属性 我确实有一个称为JSONABLE的界面。 接口jsonabe { 公共功能tojson(); } 我确实有两个实现接口的类。 类Facebook TransFormer实现JSONABLE {
为什么使用指针的复制与memcpy
Spring-kafka-test-意外依赖性版本
有什么方法可以按Enter键盘键?
如何访问状态,而无需依赖于CreateSelector?
如何在sybase ase中选择序列的序列工作?
android仿真prodlen
如何使用ODFDOM设置ODS电子表格的页面大小,页面方向和页面边距?
未经debug模式运行时未出现的flutter UI
通过划界字符串值的2D数组的每个子阵列
如何在不在同一软件包中的Gradle中执行多个测试类?
伏氧化植物:一旦SIP注册完成后,测试呼叫调用 我已经为OpenAI开发了一个功能性方案,我已经通过Voximplant提供的软电话成功地测试了它。现在我想用PBX对其进行测试,我想使用sip
我正在尝试在我的应用中搜索聊天SDK(Android)以嵌入聊天功能。因此,我找到了一些SDK,但它们的1MB非常重。这将加起来应用程序大小。
MakeBootstrap popover出现/消失在悬停而不是单击
© www.soinside.com 2019 - 2024. All rights reserved.