init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.tag-demo{width:500px;display:flex;margin-bottom:15px}.tag-demo .layui-tag{margin-right:15px}.tag-demo-variant{margin-bottom:10px}
|
||||
@@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="100%" height="100%" viewBox="0 0 1400 800">
|
||||
|
||||
<rect x="1300" y="400" rx="40" ry="40" width="300" height="300" stroke="rgb(129, 201, 149)" fill="rgb(129, 201, 149)">
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 1450 550" to="360 1450 550" repeatCount="indefinite"/>
|
||||
</rect>
|
||||
|
||||
<path d="M 100 350 A 150 150 0 1 1 400 350 Q400 370 380 370 L 250 370 L 120 370 Q100 370 100 350" stroke="#FFB800" fill="#FFB800">
|
||||
<animateMotion path="M 800 -200 L 800 -300 L 800 -200" dur="20s" begin="0s" repeatCount="indefinite"/>
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 210 530 ; -30 210 530 ; 0 210 530" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
||||
</path>
|
||||
|
||||
<circle cx="220" cy="140" r="40" stroke="#009688" fill="#009688">
|
||||
<animateMotion path="M 0 0 L 40 20 Z" dur="5s" repeatCount="indefinite"/>
|
||||
</circle>
|
||||
|
||||
<path d="M 165 580 L 270 580 Q275 578 270 570 L 223 483 Q220 480 217 483 L 165 570 Q160 578 165 580" stroke="#FF5722" fill="#FF5722">
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 210 530" to="360 210 530" repeatCount="indefinite"/>
|
||||
</path>
|
||||
|
||||
<rect x="400" y="600" rx="40" ry="40" width="100" height="100" stroke="#1E9FFF" fill="#1E9FFF">
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="-30 550 750" to="330 550 750" repeatCount="indefinite"/>
|
||||
</rect>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,127 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 全局展示操作反馈信息。
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-notice-bar text="以创造性的行为实践于人世。若能以写作为工具,为道途,先帮助自己一程,再以领悟帮助他人一程。这是一种服务。" mode="link"></lay-notice-bar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 使用图标
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-notice-bar leftIcon="layui-icon-mute" text="以一颗冷静思辨的态度去看待这个物质浮躁的新时代,大环境,恰当处理自身与外界环境的矛盾,如何身心健康,自在的成为自己。"></lay-notice-bar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 允许关闭
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-notice-bar leftIcon="layui-icon-mute" rightIcon="layui-icon-close" text="事情总是会自动变化。顺其自然就好。" mode="closeable" background="#ecf5ff" ></lay-notice-bar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from "vue"
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const visible = ref(true);
|
||||
|
||||
return {
|
||||
visible
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 垂直滚动
|
||||
:::
|
||||
|
||||
::: demo
|
||||
<template>
|
||||
<lay-notice-bar :scrollable="true" leftIcon="layui-icon-mute" :textlist="list">
|
||||
</lay-notice-bar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive } from "vue"
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const list = reactive([
|
||||
{ id: '1', text: '条目一' },
|
||||
{ id: '2', text: '条目二' },
|
||||
{ id: '3', text: '条目三' },
|
||||
{ id: '4', text: '条目四' },
|
||||
])
|
||||
return {
|
||||
list,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Notice Bar 属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 事件 | 描述 | 参数 |
|
||||
| ---- | -------- | --------------------- |
|
||||
| mode | 模式 | 'link' 'closeable' |
|
||||
| text | 内容 | 滚动内容 |
|
||||
| leftIcon | 左侧图标 | -- |
|
||||
| rightIcon | 右侧图标 | -- |
|
||||
| scrollable | 是否开启垂直滚动|true,false|
|
||||
| textlist | 垂直滚动内容| Array|
|
||||
:::
|
||||
|
||||
::: contributor noticeBar
|
||||
:::
|
||||
|
||||
::: previousNext noticeBar
|
||||
:::
|
||||
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "PictureIcon",
|
||||
};
|
||||
</script>
|
||||
<script setup lang="ts">
|
||||
import LayIcon from "../component/icon/index";
|
||||
|
||||
const props = defineProps<{
|
||||
color?: string;
|
||||
size?: string;
|
||||
}>();
|
||||
</script>
|
||||
<template>
|
||||
<lay-icon :color="props.color" :size="props.size" type="layui-icon-picture" />
|
||||
</template>
|
||||
@@ -0,0 +1,81 @@
|
||||
import { Ref } from "vue";
|
||||
// 计算各个方向位置
|
||||
const postionFns: any = {
|
||||
top(
|
||||
el: HTMLElement,
|
||||
popper: HTMLElement,
|
||||
innnerPosition: Ref,
|
||||
called: boolean
|
||||
) {
|
||||
let { top, left, bottom } = el.getBoundingClientRect();
|
||||
if (
|
||||
(top = top - popper.offsetHeight - 6) < 0 &&
|
||||
bottom > popper.offsetHeight
|
||||
) {
|
||||
innnerPosition.value = "bottom";
|
||||
top = bottom;
|
||||
} else {
|
||||
innnerPosition.value = "top";
|
||||
}
|
||||
return {
|
||||
top: `${top}px`,
|
||||
left: `${left - (popper.offsetWidth - el.offsetWidth) / 2}px`,
|
||||
};
|
||||
},
|
||||
bottom(
|
||||
el: HTMLElement,
|
||||
popper: HTMLElement,
|
||||
innnerPosition: Ref,
|
||||
called: boolean
|
||||
) {
|
||||
let { top, left, bottom } = el.getBoundingClientRect();
|
||||
if (window.innerHeight - bottom < popper.offsetHeight + 6) {
|
||||
innnerPosition.value = "top";
|
||||
bottom = top - popper.offsetHeight - 6;
|
||||
} else {
|
||||
innnerPosition.value = "bottom";
|
||||
}
|
||||
return {
|
||||
top: `${bottom}px`,
|
||||
left: `${left - (popper.offsetWidth - el.offsetWidth) / 2}px`,
|
||||
};
|
||||
},
|
||||
left(
|
||||
el: HTMLElement,
|
||||
popper: HTMLElement,
|
||||
innnerPosition: Ref,
|
||||
called: boolean
|
||||
) {
|
||||
let { top, left, right } = el.getBoundingClientRect();
|
||||
left = left - popper.offsetWidth - 6;
|
||||
if (left < 0) {
|
||||
innnerPosition.value = "right";
|
||||
left = right;
|
||||
} else {
|
||||
innnerPosition.value = "left";
|
||||
}
|
||||
return {
|
||||
top: `${top - (popper.offsetHeight - el.offsetHeight) / 2}px`,
|
||||
left: `${left}px`,
|
||||
};
|
||||
},
|
||||
right(
|
||||
el: HTMLElement,
|
||||
popper: HTMLElement,
|
||||
innnerPosition: Ref,
|
||||
called: boolean
|
||||
) {
|
||||
let { top, left, right } = el.getBoundingClientRect();
|
||||
if (window.innerWidth < right + popper.offsetWidth + 6) {
|
||||
innnerPosition.value = "left";
|
||||
right = left - popper.offsetWidth - 6;
|
||||
} else {
|
||||
innnerPosition.value = "right";
|
||||
}
|
||||
return {
|
||||
top: `${top - (popper.offsetHeight - el.offsetHeight) / 2}px`,
|
||||
left: `${right}px`,
|
||||
};
|
||||
},
|
||||
};
|
||||
export default postionFns;
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
x+)JMU03e040031Q<31><51>NM-`x6<78><36><EFBFBD>M<17>9{wk<77>+<2B><>q<EFBFBD>IO<49>D P<><50><EFBFBD>u<EFBFBD>cX<63>^gd{<7B>T<EFBFBD>H<EFBFBD><48>b<EFBFBD><62><EFBFBD>6<05><><EFBFBD><01><><1C>
|
||||
Reference in New Issue
Block a user