添加筛选
This commit is contained in:
@@ -1,38 +1,5 @@
|
||||
import { w as withInstall } from "../badge/index2.js";
|
||||
import { defineComponent, ref, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
||||
const __default__ = {
|
||||
name: "LayCheckboxGroup"
|
||||
};
|
||||
const _sfc_main = defineComponent({
|
||||
...__default__,
|
||||
props: {
|
||||
modelValue: { default: () => [] },
|
||||
disabled: { type: Boolean, default: false }
|
||||
},
|
||||
emits: ["update:modelValue", "change"],
|
||||
setup(__props, { emit }) {
|
||||
const props = __props;
|
||||
const modelValue = ref(props.modelValue);
|
||||
const disabled = ref(props.disabled);
|
||||
provide("checkboxGroup", {
|
||||
name: "LayCheckboxGroup",
|
||||
modelValue,
|
||||
disabled
|
||||
});
|
||||
watch(() => modelValue, (val) => {
|
||||
emit("change", modelValue.value);
|
||||
emit("update:modelValue", modelValue.value);
|
||||
}, { deep: true });
|
||||
watch(() => props.modelValue, (val) => modelValue.value = val);
|
||||
watch(() => props.disabled, (val) => disabled.value = val);
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: normalizeClass(["layui-checkbox-group", { "layui-checkbox-group-disabled": disabled.value }])
|
||||
}, [
|
||||
renderSlot(_ctx.$slots, "default")
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
import { _ as _sfc_main } from "../index2.js";
|
||||
import "vue";
|
||||
const component = withInstall(_sfc_main);
|
||||
export { component as default };
|
||||
|
||||
@@ -179,6 +179,7 @@ import "./_chunks/@vue/index.js";
|
||||
import "./_chunks/@vueuse/index.js";
|
||||
import "./useLevel/index.js";
|
||||
import "./utils/index.js";
|
||||
import "./index2.js";
|
||||
import "./_chunks/@ctrl/index.js";
|
||||
import "./_chunks/async-validator/index.js";
|
||||
import "./_chunks/evtd/index.js";
|
||||
|
||||
36
package/component/es/index2.js
Normal file
36
package/component/es/index2.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import { defineComponent, ref, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
||||
const __default__ = {
|
||||
name: "LayCheckboxGroup"
|
||||
};
|
||||
const _sfc_main = defineComponent({
|
||||
...__default__,
|
||||
props: {
|
||||
modelValue: { default: () => [] },
|
||||
disabled: { type: Boolean, default: false }
|
||||
},
|
||||
emits: ["update:modelValue", "change"],
|
||||
setup(__props, { emit }) {
|
||||
const props = __props;
|
||||
const modelValue = ref(props.modelValue);
|
||||
const disabled = ref(props.disabled);
|
||||
provide("checkboxGroup", {
|
||||
name: "LayCheckboxGroup",
|
||||
modelValue,
|
||||
disabled
|
||||
});
|
||||
watch(() => modelValue, (val) => {
|
||||
emit("change", modelValue.value);
|
||||
emit("update:modelValue", modelValue.value);
|
||||
}, { deep: true });
|
||||
watch(() => props.modelValue, (val) => modelValue.value = val);
|
||||
watch(() => props.disabled, (val) => disabled.value = val);
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: normalizeClass(["layui-checkbox-group", { "layui-checkbox-group-disabled": disabled.value }])
|
||||
}, [
|
||||
renderSlot(_ctx.$slots, "default")
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
export { _sfc_main as _ };
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user