| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /framework7/node_modules/framework7-vue/components/ |
Upload File : |
import { createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
const _hoisted_1 = ["name", "value", "disabled", "readonly", "checked"];
const _hoisted_2 = /*#__PURE__*/_createElementVNode("i", {
class: "icon-checkbox"
}, null, -1);
function render(_ctx, _cache) {
return _openBlock(), _createElementBlock("label", {
class: _normalizeClass(_ctx.classes)
}, [_createElementVNode("input", {
ref: "inputElRef",
type: "checkbox",
name: _ctx.name,
value: _ctx.value,
disabled: _ctx.disabled,
readonly: _ctx.readonly,
checked: _ctx.checked,
onChange: _cache[0] || (_cache[0] = function () {
return _ctx.onChange && _ctx.onChange(...arguments);
})
}, null, 40, _hoisted_1), _hoisted_2, _renderSlot(_ctx.$slots, "default")], 2);
}
import { ref, computed, onMounted, watch } from 'vue';
import { classNames } from '../shared/utils.js';
import { colorClasses, colorProps } from '../shared/mixins.js';
export default {
name: 'f7-checkbox',
render,
props: {
checked: Boolean,
indeterminate: Boolean,
name: [Number, String],
value: {
type: [Number, String, Boolean],
default: undefined
},
disabled: Boolean,
readonly: Boolean,
...colorProps
},
emits: ['update:checked', 'change'],
setup(props, _ref) {
let {
emit
} = _ref;
const inputElRef = ref(null);
const onChange = event => {
emit('update:checked', event.target.checked);
emit('change', event);
};
onMounted(() => {
if (inputElRef.value) {
inputElRef.value.indeterminate = !!props.indeterminate;
}
});
watch(() => props.indeterminate, newValue => {
if (inputElRef.value) {
inputElRef.value.indeterminate = !!newValue;
}
});
const classes = computed(() => classNames({
checkbox: true,
disabled: props.disabled
}, colorClasses(props)));
return {
inputElRef,
classes,
onChange
};
}
};