chore: 升级全局依赖
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@layui/layui-vue",
|
||||
"version": "1.0.4-alpha.5",
|
||||
"version": "1.0.4",
|
||||
"author": "就眠儀式",
|
||||
"license": "MIT",
|
||||
"description": "a component library for Vue 3 base on layui-vue",
|
||||
@@ -30,9 +30,9 @@
|
||||
"build:types": "rimraf types && tsc -d"
|
||||
},
|
||||
"dependencies": {
|
||||
"@layui/icons-vue": "^1.0.7",
|
||||
"@layui/layer-vue": "^1.3.12",
|
||||
"@vueuse/core": "^7.6.2",
|
||||
"@layui/icons-vue": "^1.0.8",
|
||||
"@layui/layer-vue": "^1.3.13",
|
||||
"@vueuse/core": "^8.3.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"async-validator": "^4.0.7",
|
||||
"cropperjs": "^1.5.12",
|
||||
@@ -49,13 +49,13 @@
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@types/node": "^16.11.9",
|
||||
"@vitejs/plugin-vue": "^2.3.1",
|
||||
"@vue/compiler-sfc": "^3.2.31",
|
||||
"@vue/server-renderer": "^3.2.31",
|
||||
"@vue/compiler-sfc": "^3.2.33",
|
||||
"@vue/server-renderer": "^3.2.33",
|
||||
"less": "^4.1.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.70.1",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "2.9.1"
|
||||
"vite": "2.9.2"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
|
||||
@@ -89,7 +89,7 @@ const sub = function () {
|
||||
if (childrens.value[i].props.id === active.value) {
|
||||
if (i === 0) {
|
||||
active.value = childrens.value[slots.length - 1].props.id;
|
||||
}else{
|
||||
} else {
|
||||
active.value = childrens.value[i - 1].props.id;
|
||||
}
|
||||
break;
|
||||
@@ -103,7 +103,7 @@ const add = function () {
|
||||
if (childrens.value[i].props.id === active.value) {
|
||||
if (i === childrens.value.length - 1) {
|
||||
active.value = childrens.value[0].props.id;
|
||||
}else{
|
||||
} else {
|
||||
active.value = childrens.value[i + 1].props.id;
|
||||
}
|
||||
break;
|
||||
@@ -117,7 +117,7 @@ const autoplay = () => {
|
||||
if (childrens.value[i].props.id === active.value) {
|
||||
if (i === childrens.value.length - 1) {
|
||||
active.value = childrens.value[0].props.id;
|
||||
}else{
|
||||
} else {
|
||||
active.value = childrens.value[i + 1].props.id;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -5,4 +5,4 @@ Component.install = (app: App) => {
|
||||
app.component(Component.name, Component);
|
||||
};
|
||||
|
||||
export default Component;
|
||||
export default Component;
|
||||
@@ -4,27 +4,46 @@
|
||||
:style="{ background, height: `${height}px` }"
|
||||
v-show="!isMode"
|
||||
>
|
||||
<div class="layui-notice-bar-warp" :style="{ color, fontSize: `${size}px` }">
|
||||
<div
|
||||
class="layui-notice-bar-warp"
|
||||
:style="{ color, fontSize: `${size}px` }"
|
||||
>
|
||||
<lay-icon
|
||||
v-if="leftIcon"
|
||||
class="layui-notice-bar-warp-left-icon"
|
||||
:type="leftIcon"
|
||||
></lay-icon>
|
||||
<div class="layui-notice-bar-warp-text-box" ref="noticeBarWarpRef" :style="'--textWidth--:'+ text.length+'em'">
|
||||
<div
|
||||
class="layui-notice-bar-warp-text-box"
|
||||
ref="noticeBarWarpRef"
|
||||
:style="'--textWidth--:' + text.length + 'em'"
|
||||
>
|
||||
<div
|
||||
class="layui-notice-bar-warp-text"
|
||||
ref="noticeBarTextRef"
|
||||
v-if="!scrollable"
|
||||
>{{ text }}
|
||||
>
|
||||
{{ text }}
|
||||
</div>
|
||||
<div class="layui-notice-bar-warp-slot" v-else>
|
||||
<lay-carousel
|
||||
v-model="active"
|
||||
indicator="none"
|
||||
anim="updown"
|
||||
arrow="none"
|
||||
:style="{ height: `40px` }"
|
||||
>
|
||||
<lay-carousel-item
|
||||
v-for="item in textlist"
|
||||
:key="item.id"
|
||||
:id="item.id"
|
||||
class="layui-anim layui-anim-up"
|
||||
>
|
||||
{{ item.text }}
|
||||
</lay-carousel-item>
|
||||
</lay-carousel>
|
||||
<!-- <slot /> -->
|
||||
</div>
|
||||
<div class="layui-notice-bar-warp-slot " v-else>
|
||||
<lay-carousel v-model="active" indicator="none" anim="updown" arrow="none" :style="{height:`40px`}">
|
||||
<lay-carousel-item v-for="(item) in textlist" :key="item.id" :id="item.id" class="layui-anim layui-anim-up">
|
||||
{{item.text}}
|
||||
</lay-carousel-item>
|
||||
</lay-carousel>
|
||||
<!-- <slot /> -->
|
||||
</div>
|
||||
</div>
|
||||
<lay-icon
|
||||
:type="rightIcon"
|
||||
@@ -45,10 +64,10 @@ import {
|
||||
onMounted,
|
||||
nextTick,
|
||||
} from "vue";
|
||||
import LayCarousel from '../carousel/index.vue'
|
||||
import LayCarousel from "../carousel/index.vue";
|
||||
export default defineComponent({
|
||||
name: "LayNoticeBar",
|
||||
components: {
|
||||
components: {
|
||||
LayCarousel,
|
||||
},
|
||||
props: {
|
||||
@@ -113,8 +132,8 @@ export default defineComponent({
|
||||
setup(props, { emit }) {
|
||||
const noticeBarWarpRef = ref();
|
||||
const noticeBarTextRef = ref();
|
||||
//@ts-ignore
|
||||
const active = ref(props.textlist[0]?.id)
|
||||
//@ts-ignore
|
||||
const active = ref(props.textlist[0]?.id);
|
||||
const state = reactive({
|
||||
order: 1,
|
||||
oneTime: 0,
|
||||
@@ -122,7 +141,7 @@ export default defineComponent({
|
||||
warpOWidth: 0,
|
||||
textOWidth: 0,
|
||||
isMode: false,
|
||||
height : 40,
|
||||
height: 40,
|
||||
});
|
||||
// 初始化 animation 各项参数
|
||||
const initAnimation = () => {
|
||||
@@ -182,7 +201,7 @@ export default defineComponent({
|
||||
noticeBarTextRef,
|
||||
onRightIconClick,
|
||||
...toRefs(state),
|
||||
active
|
||||
active,
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -208,36 +227,48 @@ export default defineComponent({
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box .layui-notice-bar-warp-text {
|
||||
.layui-notice-bar
|
||||
.layui-notice-bar-warp
|
||||
.layui-notice-bar-warp-text-box
|
||||
.layui-notice-bar-warp-text {
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
@keyframes around1 {
|
||||
from {
|
||||
left: 0;
|
||||
}
|
||||
to {
|
||||
left: calc(0px - var(--textWidth--));
|
||||
/* left: -100%; */
|
||||
}
|
||||
from {
|
||||
left: 0;
|
||||
}
|
||||
to {
|
||||
left: calc(0px - var(--textWidth--));
|
||||
/* left: -100%; */
|
||||
}
|
||||
}
|
||||
@keyframes around2 {
|
||||
from {
|
||||
left: calc(var(--textWidth--));
|
||||
/* left: 100%; */
|
||||
}
|
||||
to {
|
||||
from {
|
||||
left: calc(var(--textWidth--));
|
||||
/* left: 100%; */
|
||||
}
|
||||
to {
|
||||
/* left: calc(0px - var(--textWidth--) - 10px); */
|
||||
left: 0;
|
||||
}
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box .layui-notice-bar-warp-slot {
|
||||
.layui-notice-bar
|
||||
.layui-notice-bar-warp
|
||||
.layui-notice-bar-warp-text-box
|
||||
.layui-notice-bar-warp-slot {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box .layui-notice-bar-warp-slot .layui-carousel >[carousel-item] * {
|
||||
.layui-notice-bar
|
||||
.layui-notice-bar-warp
|
||||
.layui-notice-bar-warp-text-box
|
||||
.layui-notice-bar-warp-slot
|
||||
.layui-carousel
|
||||
> [carousel-item]
|
||||
* {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -251,7 +282,9 @@ export default defineComponent({
|
||||
text-align: right;
|
||||
font-size: inherit !important;
|
||||
}
|
||||
.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-right-icon:hover {
|
||||
.layui-notice-bar
|
||||
.layui-notice-bar-warp
|
||||
.layui-notice-bar-warp-right-icon:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -8,10 +8,11 @@ export default {
|
||||
import { StringOrNumber } from "./tree.type";
|
||||
import LayIcon from "../icon";
|
||||
import LayCheckbox from "../checkbox";
|
||||
import { Ref } from "vue";
|
||||
import { Ref, useSlots } from "vue";
|
||||
import { Tree } from "./tree";
|
||||
import { Nullable } from "../../types";
|
||||
import LayTransition from "../transition/index.vue";
|
||||
|
||||
type CustomKey = string | number;
|
||||
type CustomString = (() => string) | string;
|
||||
|
||||
@@ -41,6 +42,7 @@ interface TreeNodeEmits {
|
||||
(e: "node-click", node: TreeData): void;
|
||||
}
|
||||
|
||||
const slots = useSlots();
|
||||
const props = defineProps<TreeNodeProps>();
|
||||
const emit = defineEmits<TreeNodeEmits>();
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ const components: Record<string, Component> = {
|
||||
LayTransition,
|
||||
LayUpload,
|
||||
LayRipple,
|
||||
LayNoticeBar
|
||||
LayNoticeBar,
|
||||
};
|
||||
|
||||
const install = (app: App, options?: InstallOptions): void => {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"dependencies": {
|
||||
"vue-router": "^4.0.12",
|
||||
"vue-i18n": "^9.2.0-beta.34",
|
||||
"@vueuse/core": "^7.6.2",
|
||||
"@vueuse/core": "^8.3.0",
|
||||
"pinia": "^2.0.9",
|
||||
"pinia-plugin-persist": "^1.0.0"
|
||||
},
|
||||
@@ -26,8 +26,8 @@
|
||||
"@types/node": "^16.11.9",
|
||||
"@types/prettier": "^2.4.4",
|
||||
"@vitejs/plugin-vue": "^2.3.1",
|
||||
"@vue/compiler-sfc": "^3.2.31",
|
||||
"@vue/server-renderer": "^3.2.31",
|
||||
"@vue/compiler-sfc": "^3.2.33",
|
||||
"@vue/server-renderer": "^3.2.33",
|
||||
"escape-html": "^1.0.3",
|
||||
"less": "^4.1.2",
|
||||
"markdown-it-container": "^3.0.0",
|
||||
@@ -35,7 +35,7 @@
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.70.1",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "2.9.1",
|
||||
"vite": "2.9.2",
|
||||
"vite-plugin-md": "^0.12.4"
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -77,41 +77,6 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
::: title 滑入滑出
|
||||
:::
|
||||
|
||||
::: demo 使用 `lay-transition` 标签, 为元素提供过渡动画
|
||||
|
||||
<template>
|
||||
<lay-button @click="changeVisible2">开始</lay-button>
|
||||
<br/>
|
||||
<br/>
|
||||
<lay-transition type="slide">
|
||||
<lay-card title="标题" v-if="visible2">内容</lay-card>
|
||||
</lay-transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const visible2 = ref(true);
|
||||
|
||||
const changeVisible2 = () => {
|
||||
visible2.value = !visible2.value;
|
||||
}
|
||||
|
||||
return {
|
||||
changeVisible2
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Transition 属性
|
||||
:::
|
||||
|
||||
|
||||
@@ -12,17 +12,19 @@
|
||||
<lay-timeline>
|
||||
<lay-timeline-item title="1.0.x">
|
||||
<ul>
|
||||
<a name="1-0-3"> </a>
|
||||
<a name="1-0-4"> </a>
|
||||
<li>
|
||||
<h3>1.0.4 <span class="layui-badge-rim">2022-04-17</span></h3>
|
||||
<h3>1.0.4 <span class="layui-badge-rim">2022-04-20</span></h3>
|
||||
<ul>
|
||||
<li>[新增] notice-bar 组件 scrollable 属性, 支持垂直方向滚动。 </li>
|
||||
<li>[修复] carousel 组件 index 索引下标越界。</li>
|
||||
<li>[重构] notice-bar 通告栏。</li>
|
||||
<li>[修复] carousel 组件 index 下标越界。</li>
|
||||
<li>[修复] checkbox 组件夜间模式下边框无法适配。</li>
|
||||
<li>[修复] 依赖项目 vite build 构建时产生的异常。</li>
|
||||
<li>[修复] table 组件 columns 配置 width 属性不生效。</li>
|
||||
<li>[优化] table 组件 columns 配置 width 未设置时自动分配宽度。</li>
|
||||
<li>[优化] layer 方法 option callback 参数为可选。</li>
|
||||
<li>[优化] layer 方法 option, callback 参数为可选。</li>
|
||||
<li>[升级] vueuse 8.3.0 版本。</li>
|
||||
<li>[升级] vue 3.2.33 版本。</li>
|
||||
<li>[升级] vite 2.9.2 版本。</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -384,7 +384,8 @@ const zhCN = [
|
||||
},
|
||||
{
|
||||
path: "/zh-CN/components/noticeBar",
|
||||
component: () => import("../document/zh-CN/components/noticeBar.md"),
|
||||
component: () =>
|
||||
import("../document/zh-CN/components/noticeBar.md"),
|
||||
meta: { title: "通告栏" },
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@layui/icons-vue",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "a component library for Vue 3 base on layui-vue",
|
||||
"homepage": "http://www.layui-vue.com",
|
||||
"module": "lib/icons-vue.es.js",
|
||||
@@ -33,13 +33,13 @@
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@types/node": "^16.11.9",
|
||||
"@vitejs/plugin-vue": "^2.3.1",
|
||||
"@vue/compiler-sfc": "^3.2.31",
|
||||
"@vue/server-renderer": "^3.2.31",
|
||||
"@vue/compiler-sfc": "^3.2.33",
|
||||
"@vue/server-renderer": "^3.2.33",
|
||||
"less": "^4.1.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.70.1",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "2.9.1"
|
||||
"vite": "2.9.2"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@layui/layer-vue",
|
||||
"version": "1.3.12",
|
||||
"version": "1.3.13",
|
||||
"description": "a component library for Vue 3 base on layui-vue",
|
||||
"homepage": "http://www.layui-vue.com",
|
||||
"module": "lib/layer-vue.es.js",
|
||||
@@ -30,13 +30,13 @@
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@types/node": "^16.11.9",
|
||||
"@vitejs/plugin-vue": "^2.3.1",
|
||||
"@vue/compiler-sfc": "^3.2.31",
|
||||
"@vue/server-renderer": "^3.2.31",
|
||||
"@vue/compiler-sfc": "^3.2.33",
|
||||
"@vue/server-renderer": "^3.2.33",
|
||||
"less": "^4.1.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.70.1",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "2.9.1"
|
||||
"vite": "2.9.2"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
|
||||
Reference in New Issue
Block a user