@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,
53 lines (52 loc) • 1.72 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const _hoisted_1 = { class: "tui-checkbox" };
const _hoisted_2 = ["disabled"];
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
__name: "index",
props: {
modelValue: { type: Boolean, default: false },
disabled: { type: Boolean, default: false }
},
emits: ["input"],
setup(__props, { emit: __emit }) {
const props = __props;
const checked = Vue.ref(props.modelValue);
const emit = __emit;
Vue.watch(
() => props.modelValue,
(value) => {
checked.value = props.disabled ? true : value;
},
{ immediate: true }
);
function handleCheckBoxClick() {
checked.value = !checked.value;
emit("input", checked.value);
}
function handleValueChange(event) {
checked.value = event.target.checked;
emit("input", event.target.checked);
}
return (_ctx, _cache) => {
return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
Vue.withDirectives(Vue.createElementVNode("input", {
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
type: "checkbox",
disabled: props.disabled,
onChange: handleValueChange
}, null, 40, _hoisted_2), [
[Vue.vModelCheckbox, checked.value]
]),
Vue.createElementVNode("span", {
class: "tui-checkbox-slot-container",
onClick: handleCheckBoxClick
}, [
Vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
])
]);
};
}
});
exports.default = _sfc_main;