🐛修复(component): 🐛修复: 按需加载部分被引用组件无法解析的问题

This commit is contained in:
sight 2022-04-24 20:30:08 +08:00
parent 2297280549
commit 4ff6d446cd
12 changed files with 35 additions and 17 deletions

View File

@ -31,6 +31,10 @@ const matchModule: string[] = [
"skeletonItem",
"tabItem",
"upload",
"checkbox",
"badge",
"button",
"tooltip",
];
export default (): UserConfigExport => {

View File

@ -8,6 +8,7 @@ export default {
import "./index.less";
import { Ref, ref } from "vue";
import { LayIconList as icons } from "@layui/icons-vue";
import LayDropdown from "../dropdown/index.vue";
export interface LayIconPickerProps {
page?: boolean;

View File

@ -8,11 +8,11 @@
class="layui-notice-bar-warp"
:style="{ color, fontSize: `${size}px` }"
>
<lay-icon
<LayIcon
v-if="leftIcon"
class="layui-notice-bar-warp-left-icon"
:type="leftIcon"
></lay-icon>
></LayIcon>
<div
class="layui-notice-bar-warp-text-box"
ref="noticeBarWarpRef"
@ -45,12 +45,12 @@
<!-- <slot /> -->
</div>
</div>
<lay-icon
<LayIcon
:type="rightIcon"
v-if="rightIcon"
class="layui-notice-bar-warp-right-icon"
@click="onRightIconClick"
></lay-icon>
></LayIcon>
</div>
</div>
</template>
@ -65,10 +65,14 @@ import {
nextTick,
} from "vue";
import LayCarousel from "../carousel/index.vue";
import LayCarouselItem from "../carouselItem/index.vue";
import { LayIcon } from "@layui/icons-vue";
export default defineComponent({
name: "LayNoticeBar",
components: {
LayCarousel,
LayCarouselItem,
LayIcon,
},
props: {
mode: {

View File

@ -18,6 +18,7 @@ import {
Ref,
} from "vue";
import LayScroll from "../scroll";
import LayBadge from "../badge/index.vue";
import { onClickOutside } from "@vueuse/core";
import { SelectItem } from "../../types";

View File

@ -6,6 +6,7 @@ export default {
<script setup lang="ts">
import { withDefaults } from "vue";
import { LayIcon } from "@layui/icons-vue";
export interface LaySkeletonProps {
type?: string;

View File

@ -2,6 +2,7 @@
import { Ref, ref } from "vue";
import { on, off } from "evtd";
import { throttle, handle_select } from "./utils/index";
import LayTooltip from "../tooltip/index.vue";
interface Prop {
val?: number | Array<number>;

View File

@ -2,6 +2,7 @@
import { ref, toRef, Ref } from "vue";
import { on, off } from "evtd";
import { throttle } from "./utils/index";
import LayTooltip from "../tooltip/index.vue";
interface Prop {
rangeValue: Array<number>;
disabled?: boolean;

View File

@ -2,6 +2,7 @@
import { Ref, ref } from "vue";
import { on, off } from "evtd";
import { throttle } from "./utils/index";
import LayTooltip from "../tooltip/index.vue";
interface Prop {
val?: number | Array<number>;

View File

@ -2,6 +2,7 @@
import { ref, toRef, Ref } from "vue";
import { on, off } from "evtd";
import { throttle } from "./utils/index";
import LayTooltip from "../tooltip/index.vue";
interface Prop {
rangeValue: Array<number>;
disabled?: boolean;

View File

@ -15,7 +15,7 @@ import {
reactive,
withDefaults,
} from "vue";
import { LayIcon } from "@layui/icons-vue";
import type { ComputedRef } from "vue";
export interface LayStepItemProps {

View File

@ -7,6 +7,8 @@ export default {
<script setup lang="ts">
import "./index.less";
import LayScroll from "../scroll";
import LayButton from "../button/index.vue";
import LayCheckbox from "../checkbox/index.vue";
import { Ref, ref, useSlots, watch } from "vue";
import { BooleanOrString, Recordable } from "../../types";
@ -165,14 +167,14 @@ const searchRight = (e: any) => {
<div class="layui-transfer layui-form layui-border-box">
<div class="layui-transfer-box" style="width: 200px; height: 360px">
<div class="layui-transfer-header">
<lay-checkbox
<LayCheckbox
v-model="allLeftChecked"
skin="primary"
label="all"
@change="allLeftChange"
>
<span>{{ title[0] }}</span>
</lay-checkbox>
</LayCheckbox>
</div>
<div class="layui-transfer-search" v-if="showSearch">
<i class="layui-icon layui-icon-search"></i
@ -185,41 +187,41 @@ const searchRight = (e: any) => {
</div>
<ul class="layui-transfer-data" style="height: 320px">
<li v-for="dataSource in leftDataSource" :key="dataSource">
<lay-checkbox
<LayCheckbox
v-model="leftSelectedKeys"
skin="primary"
:label="dataSource[id]"
>
<slot v-if="slot.item" name="item" :data="dataSource"></slot>
<span v-else>{{ dataSource.title }}</span>
</lay-checkbox>
</LayCheckbox>
</li>
</ul>
</div>
<div class="layui-transfer-active">
<lay-button
<LayButton
type="primary"
:disabled="leftSelectedKeys.length == 0"
@click="add"
><i class="layui-icon layui-icon-next"></i
></lay-button>
<lay-button
></LayButton>
<LayButton
type="primary"
:disabled="rightSelectedKeys.length == 0"
@click="remove"
><i class="layui-icon layui-icon-prev"></i
></lay-button>
></LayButton>
</div>
<div class="layui-transfer-box" style="width: 200px; height: 360px">
<div class="layui-transfer-header">
<lay-checkbox
<LayCheckbox
v-model="allRightChecked"
skin="primary"
label="all"
@change="allRightChange"
>
<span>{{ title[1] }}</span>
</lay-checkbox>
</LayCheckbox>
</div>
<div class="layui-transfer-search" v-if="showSearch">
<i class="layui-icon layui-icon-search"></i
@ -232,14 +234,14 @@ const searchRight = (e: any) => {
</div>
<ul class="layui-transfer-data" style="height: 320px">
<li v-for="dataSource in rightDataSource" :key="dataSource">
<lay-checkbox
<LayCheckbox
v-model="rightSelectedKeys"
skin="primary"
:label="dataSource[id]"
>
<slot v-if="slot.item" name="item" :data="dataSource"></slot>
<span v-else>{{ dataSource.title }}</span>
</lay-checkbox>
</LayCheckbox>
</li>
</ul>
</div>

View File

@ -19,6 +19,7 @@ import {
} from "vue";
import { templateRef } from "@vueuse/core";
import { LayLayer } from "@layui/layer-vue";
import LayButton from "../button/index.vue";
import Cropper from "cropperjs";
//
//https://www.layuiweb.com/doc/modules/upload.html#options