🐛修复(component): 🐛修复: 按需加载部分被引用组件无法解析的问题
This commit is contained in:
parent
2297280549
commit
4ff6d446cd
@ -31,6 +31,10 @@ const matchModule: string[] = [
|
|||||||
"skeletonItem",
|
"skeletonItem",
|
||||||
"tabItem",
|
"tabItem",
|
||||||
"upload",
|
"upload",
|
||||||
|
"checkbox",
|
||||||
|
"badge",
|
||||||
|
"button",
|
||||||
|
"tooltip",
|
||||||
];
|
];
|
||||||
|
|
||||||
export default (): UserConfigExport => {
|
export default (): UserConfigExport => {
|
||||||
|
@ -8,6 +8,7 @@ export default {
|
|||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { LayIconList as icons } from "@layui/icons-vue";
|
import { LayIconList as icons } from "@layui/icons-vue";
|
||||||
|
import LayDropdown from "../dropdown/index.vue";
|
||||||
|
|
||||||
export interface LayIconPickerProps {
|
export interface LayIconPickerProps {
|
||||||
page?: boolean;
|
page?: boolean;
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
class="layui-notice-bar-warp"
|
class="layui-notice-bar-warp"
|
||||||
:style="{ color, fontSize: `${size}px` }"
|
:style="{ color, fontSize: `${size}px` }"
|
||||||
>
|
>
|
||||||
<lay-icon
|
<LayIcon
|
||||||
v-if="leftIcon"
|
v-if="leftIcon"
|
||||||
class="layui-notice-bar-warp-left-icon"
|
class="layui-notice-bar-warp-left-icon"
|
||||||
:type="leftIcon"
|
:type="leftIcon"
|
||||||
></lay-icon>
|
></LayIcon>
|
||||||
<div
|
<div
|
||||||
class="layui-notice-bar-warp-text-box"
|
class="layui-notice-bar-warp-text-box"
|
||||||
ref="noticeBarWarpRef"
|
ref="noticeBarWarpRef"
|
||||||
@ -45,12 +45,12 @@
|
|||||||
<!-- <slot /> -->
|
<!-- <slot /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<lay-icon
|
<LayIcon
|
||||||
:type="rightIcon"
|
:type="rightIcon"
|
||||||
v-if="rightIcon"
|
v-if="rightIcon"
|
||||||
class="layui-notice-bar-warp-right-icon"
|
class="layui-notice-bar-warp-right-icon"
|
||||||
@click="onRightIconClick"
|
@click="onRightIconClick"
|
||||||
></lay-icon>
|
></LayIcon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -65,10 +65,14 @@ import {
|
|||||||
nextTick,
|
nextTick,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import LayCarousel from "../carousel/index.vue";
|
import LayCarousel from "../carousel/index.vue";
|
||||||
|
import LayCarouselItem from "../carouselItem/index.vue";
|
||||||
|
import { LayIcon } from "@layui/icons-vue";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "LayNoticeBar",
|
name: "LayNoticeBar",
|
||||||
components: {
|
components: {
|
||||||
LayCarousel,
|
LayCarousel,
|
||||||
|
LayCarouselItem,
|
||||||
|
LayIcon,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
mode: {
|
mode: {
|
||||||
|
@ -18,6 +18,7 @@ import {
|
|||||||
Ref,
|
Ref,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import LayScroll from "../scroll";
|
import LayScroll from "../scroll";
|
||||||
|
import LayBadge from "../badge/index.vue";
|
||||||
import { onClickOutside } from "@vueuse/core";
|
import { onClickOutside } from "@vueuse/core";
|
||||||
import { SelectItem } from "../../types";
|
import { SelectItem } from "../../types";
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ export default {
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { withDefaults } from "vue";
|
import { withDefaults } from "vue";
|
||||||
|
import { LayIcon } from "@layui/icons-vue";
|
||||||
|
|
||||||
export interface LaySkeletonProps {
|
export interface LaySkeletonProps {
|
||||||
type?: string;
|
type?: string;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { on, off } from "evtd";
|
import { on, off } from "evtd";
|
||||||
import { throttle, handle_select } from "./utils/index";
|
import { throttle, handle_select } from "./utils/index";
|
||||||
|
import LayTooltip from "../tooltip/index.vue";
|
||||||
|
|
||||||
interface Prop {
|
interface Prop {
|
||||||
val?: number | Array<number>;
|
val?: number | Array<number>;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { ref, toRef, Ref } from "vue";
|
import { ref, toRef, Ref } from "vue";
|
||||||
import { on, off } from "evtd";
|
import { on, off } from "evtd";
|
||||||
import { throttle } from "./utils/index";
|
import { throttle } from "./utils/index";
|
||||||
|
import LayTooltip from "../tooltip/index.vue";
|
||||||
interface Prop {
|
interface Prop {
|
||||||
rangeValue: Array<number>;
|
rangeValue: Array<number>;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { on, off } from "evtd";
|
import { on, off } from "evtd";
|
||||||
import { throttle } from "./utils/index";
|
import { throttle } from "./utils/index";
|
||||||
|
import LayTooltip from "../tooltip/index.vue";
|
||||||
|
|
||||||
interface Prop {
|
interface Prop {
|
||||||
val?: number | Array<number>;
|
val?: number | Array<number>;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { ref, toRef, Ref } from "vue";
|
import { ref, toRef, Ref } from "vue";
|
||||||
import { on, off } from "evtd";
|
import { on, off } from "evtd";
|
||||||
import { throttle } from "./utils/index";
|
import { throttle } from "./utils/index";
|
||||||
|
import LayTooltip from "../tooltip/index.vue";
|
||||||
interface Prop {
|
interface Prop {
|
||||||
rangeValue: Array<number>;
|
rangeValue: Array<number>;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
reactive,
|
reactive,
|
||||||
withDefaults,
|
withDefaults,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
import { LayIcon } from "@layui/icons-vue";
|
||||||
import type { ComputedRef } from "vue";
|
import type { ComputedRef } from "vue";
|
||||||
|
|
||||||
export interface LayStepItemProps {
|
export interface LayStepItemProps {
|
||||||
|
@ -7,6 +7,8 @@ export default {
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import LayScroll from "../scroll";
|
import LayScroll from "../scroll";
|
||||||
|
import LayButton from "../button/index.vue";
|
||||||
|
import LayCheckbox from "../checkbox/index.vue";
|
||||||
import { Ref, ref, useSlots, watch } from "vue";
|
import { Ref, ref, useSlots, watch } from "vue";
|
||||||
import { BooleanOrString, Recordable } from "../../types";
|
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 layui-form layui-border-box">
|
||||||
<div class="layui-transfer-box" style="width: 200px; height: 360px">
|
<div class="layui-transfer-box" style="width: 200px; height: 360px">
|
||||||
<div class="layui-transfer-header">
|
<div class="layui-transfer-header">
|
||||||
<lay-checkbox
|
<LayCheckbox
|
||||||
v-model="allLeftChecked"
|
v-model="allLeftChecked"
|
||||||
skin="primary"
|
skin="primary"
|
||||||
label="all"
|
label="all"
|
||||||
@change="allLeftChange"
|
@change="allLeftChange"
|
||||||
>
|
>
|
||||||
<span>{{ title[0] }}</span>
|
<span>{{ title[0] }}</span>
|
||||||
</lay-checkbox>
|
</LayCheckbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-transfer-search" v-if="showSearch">
|
<div class="layui-transfer-search" v-if="showSearch">
|
||||||
<i class="layui-icon layui-icon-search"></i
|
<i class="layui-icon layui-icon-search"></i
|
||||||
@ -185,41 +187,41 @@ const searchRight = (e: any) => {
|
|||||||
</div>
|
</div>
|
||||||
<ul class="layui-transfer-data" style="height: 320px">
|
<ul class="layui-transfer-data" style="height: 320px">
|
||||||
<li v-for="dataSource in leftDataSource" :key="dataSource">
|
<li v-for="dataSource in leftDataSource" :key="dataSource">
|
||||||
<lay-checkbox
|
<LayCheckbox
|
||||||
v-model="leftSelectedKeys"
|
v-model="leftSelectedKeys"
|
||||||
skin="primary"
|
skin="primary"
|
||||||
:label="dataSource[id]"
|
:label="dataSource[id]"
|
||||||
>
|
>
|
||||||
<slot v-if="slot.item" name="item" :data="dataSource"></slot>
|
<slot v-if="slot.item" name="item" :data="dataSource"></slot>
|
||||||
<span v-else>{{ dataSource.title }}</span>
|
<span v-else>{{ dataSource.title }}</span>
|
||||||
</lay-checkbox>
|
</LayCheckbox>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-transfer-active">
|
<div class="layui-transfer-active">
|
||||||
<lay-button
|
<LayButton
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="leftSelectedKeys.length == 0"
|
:disabled="leftSelectedKeys.length == 0"
|
||||||
@click="add"
|
@click="add"
|
||||||
><i class="layui-icon layui-icon-next"></i
|
><i class="layui-icon layui-icon-next"></i
|
||||||
></lay-button>
|
></LayButton>
|
||||||
<lay-button
|
<LayButton
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="rightSelectedKeys.length == 0"
|
:disabled="rightSelectedKeys.length == 0"
|
||||||
@click="remove"
|
@click="remove"
|
||||||
><i class="layui-icon layui-icon-prev"></i
|
><i class="layui-icon layui-icon-prev"></i
|
||||||
></lay-button>
|
></LayButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-transfer-box" style="width: 200px; height: 360px">
|
<div class="layui-transfer-box" style="width: 200px; height: 360px">
|
||||||
<div class="layui-transfer-header">
|
<div class="layui-transfer-header">
|
||||||
<lay-checkbox
|
<LayCheckbox
|
||||||
v-model="allRightChecked"
|
v-model="allRightChecked"
|
||||||
skin="primary"
|
skin="primary"
|
||||||
label="all"
|
label="all"
|
||||||
@change="allRightChange"
|
@change="allRightChange"
|
||||||
>
|
>
|
||||||
<span>{{ title[1] }}</span>
|
<span>{{ title[1] }}</span>
|
||||||
</lay-checkbox>
|
</LayCheckbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-transfer-search" v-if="showSearch">
|
<div class="layui-transfer-search" v-if="showSearch">
|
||||||
<i class="layui-icon layui-icon-search"></i
|
<i class="layui-icon layui-icon-search"></i
|
||||||
@ -232,14 +234,14 @@ const searchRight = (e: any) => {
|
|||||||
</div>
|
</div>
|
||||||
<ul class="layui-transfer-data" style="height: 320px">
|
<ul class="layui-transfer-data" style="height: 320px">
|
||||||
<li v-for="dataSource in rightDataSource" :key="dataSource">
|
<li v-for="dataSource in rightDataSource" :key="dataSource">
|
||||||
<lay-checkbox
|
<LayCheckbox
|
||||||
v-model="rightSelectedKeys"
|
v-model="rightSelectedKeys"
|
||||||
skin="primary"
|
skin="primary"
|
||||||
:label="dataSource[id]"
|
:label="dataSource[id]"
|
||||||
>
|
>
|
||||||
<slot v-if="slot.item" name="item" :data="dataSource"></slot>
|
<slot v-if="slot.item" name="item" :data="dataSource"></slot>
|
||||||
<span v-else>{{ dataSource.title }}</span>
|
<span v-else>{{ dataSource.title }}</span>
|
||||||
</lay-checkbox>
|
</LayCheckbox>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "vue";
|
} from "vue";
|
||||||
import { templateRef } from "@vueuse/core";
|
import { templateRef } from "@vueuse/core";
|
||||||
import { LayLayer } from "@layui/layer-vue";
|
import { LayLayer } from "@layui/layer-vue";
|
||||||
|
import LayButton from "../button/index.vue";
|
||||||
import Cropper from "cropperjs";
|
import Cropper from "cropperjs";
|
||||||
// 组件的参数字段类型
|
// 组件的参数字段类型
|
||||||
//https://www.layuiweb.com/doc/modules/upload.html#options
|
//https://www.layuiweb.com/doc/modules/upload.html#options
|
||||||
|
Loading…
Reference in New Issue
Block a user