@tencentcloud/roomkit-electron-vue3
Version:
<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,
73 lines (72 loc) • 2.27 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const index = require("../Select/index.vue.js");
const index$1 = require("../Option/index.vue.js");
const _hoisted_1 = { class: "container" };
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
__name: "index",
props: {
modelValue: {}
},
emits: ["input"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const selectedTime = Vue.ref(props.modelValue);
const timeOptions = Vue.computed(() => {
const options = [];
for (let i = 0; i < 24; i++) {
for (let j = 0; j < 60; j += 15) {
const hour = i < 10 ? `0${i}` : `${i}`;
const minute = j < 10 ? `0${j}` : `${j}`;
options.push(`${hour}:${minute}`);
}
}
return options;
});
const updateTime = () => {
emit("input", selectedTime.value);
};
Vue.watch(
selectedTime,
() => {
updateTime();
},
{
immediate: true
}
);
Vue.watch(
() => props.modelValue,
(newValue) => {
selectedTime.value = newValue;
},
{ immediate: true }
);
return (_ctx, _cache) => {
return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
Vue.createVNode(index.default, {
modelValue: selectedTime.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedTime.value = $event),
class: "timepicker-select",
teleported: false,
"custom-select-content-style": { "font-weight": 400 }
}, {
default: Vue.withCtx(() => [
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(timeOptions.value, (time) => {
return Vue.openBlock(), Vue.createBlock(index$1.default, {
key: time,
value: time,
label: time,
"custom-option-content-style": { "font-weight": 400 }
}, null, 8, ["value", "label"]);
}), 128))
]),
_: 1
}, 8, ["modelValue"])
]);
};
}
});
exports.default = _sfc_main;