init
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { withInstall, WithInstallType } from "../utils";
|
||||
import Component from "./index.vue";
|
||||
|
||||
const component: WithInstallType<typeof Component> = withInstall(Component);
|
||||
export default component;
|
||||
@@ -0,0 +1,182 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 当需要录入大量的文本文字。
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
::: demo 使用 `lay-textarea` 标签, 创建文本域
|
||||
|
||||
<template>
|
||||
<lay-textarea placeholder="请输入描述" v-model="data1"></lay-textarea>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const data1 = ref("");
|
||||
|
||||
return {
|
||||
data1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 事件回调
|
||||
:::
|
||||
|
||||
::: demo 通过 `input` 事件, 触发 input 输入回调。
|
||||
|
||||
<template>
|
||||
<lay-textarea placeholder="Input 事件" v-model="data2" @input="input"></lay-textarea>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const data2 = ref("");
|
||||
|
||||
const input = function( val ) {
|
||||
console.log(val)
|
||||
}
|
||||
|
||||
return {
|
||||
data2,
|
||||
input
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 禁止输入
|
||||
:::
|
||||
|
||||
::: demo 通过 `disabled` 属性, 禁止输入
|
||||
|
||||
<template>
|
||||
<lay-textarea placeholder="禁止输入" v-model="data3" :disabled="disabled"></lay-textarea>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const data3 = ref("");
|
||||
const disabled = ref(true)
|
||||
return {
|
||||
data3,
|
||||
disabled
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 清空内容
|
||||
:::
|
||||
|
||||
::: demo 通过 `allow-clear` 属性, 开启清空操作, 默认不显示。
|
||||
|
||||
<template>
|
||||
<lay-textarea placeholder="请输入内容" v-model="data3" allow-clear></lay-textarea>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const data3 = ref("");
|
||||
|
||||
return {
|
||||
data3
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 显示字数
|
||||
:::
|
||||
|
||||
::: demo 通过 `show-count` 与 `max-length` 属性, 展示限制长度与当前长度。
|
||||
|
||||
<template>
|
||||
<lay-textarea placeholder="显示字数" v-model="data4" show-count></lay-textarea>
|
||||
<br>
|
||||
<lay-textarea placeholder="最大输入长度" v-model="data5" show-count :maxlength="10"></lay-textarea>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const data4 = ref("");
|
||||
const data5 = ref("");
|
||||
return {
|
||||
data4,
|
||||
data5
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Textarea 属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 属性 | 描述 | 可选值 |
|
||||
| ----------- | ------------- | -------------- |
|
||||
| name | 原始属性 name | -- |
|
||||
| placeholder | 提示信息 | -- |
|
||||
| show-count | 显示字数 | `true` `false` |
|
||||
| disabled | 禁用 | `true` `false` |
|
||||
| v-model | 值 | -- |
|
||||
| maxlength | 限制输入长度 | -- |
|
||||
|
||||
:::
|
||||
|
||||
::: title Textarea 事件
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 事件 | 描述 | 可选值 |
|
||||
| ----- | --------------- | ---------------- |
|
||||
| input | 原生 input 事件 | event : 事件对象 |
|
||||
| foucs | 原生 foucs 事件 | event : 事件对象 |
|
||||
| blur | 原生 blur 事件 | -- |
|
||||
|
||||
:::
|
||||
|
||||
::: contributor textarea
|
||||
:::
|
||||
|
||||
::: previousNext textarea
|
||||
:::
|
||||
@@ -0,0 +1,18 @@
|
||||
// 处理菜单栏缩进
|
||||
export function indentHandle(obj: {
|
||||
indent: boolean | string;
|
||||
level: number;
|
||||
basePadding?: number;
|
||||
isTree?: boolean;
|
||||
}) {
|
||||
const { indent, level, basePadding = 0, isTree } = obj;
|
||||
const least: number = level - 1; // 第一层不缩进
|
||||
if (isTree && indent && least > 0) {
|
||||
const px =
|
||||
typeof indent === "boolean"
|
||||
? `${basePadding + 10 * least}px` // css样式表对<a>设定了23基础边距
|
||||
: indent.replace(/\d+/g, (s) => (basePadding + least * +s).toString());
|
||||
return `padding-left: ${px}`;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
:root {
|
||||
|
||||
--global-primary-color: #009688;
|
||||
|
||||
--global-normal-color: #1e9fff;
|
||||
|
||||
--global-warm-color: #ffb800;
|
||||
|
||||
--global-danger-color: #ff5722;
|
||||
|
||||
--global-checked-color: #5fb878;
|
||||
|
||||
--global-info-color: #31BDEC;
|
||||
|
||||
--global-border-radius: 2px;
|
||||
|
||||
--global-neutral-color-1: #FAFAFA;
|
||||
|
||||
--global-neutral-color-2: #F6F6F6;
|
||||
|
||||
--global-neutral-color-3: #eeeeee;
|
||||
|
||||
--global-neutral-color-4: #e2e2e2;
|
||||
|
||||
--global-neutral-color-5: #dddddd;
|
||||
|
||||
--global-neutral-color-6: #d2d2d2;
|
||||
|
||||
--global-neutral-color-7: #cccccc;
|
||||
|
||||
--global-neutral-color-8: #c2c2c2;
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.layui-rate,.layui-rate *{display:inline-block;vertical-align:middle}.layui-rate{padding:10px 5px 10px 0;font-size:0}.layui-rate li i.layui-icon{font-size:20px;color:#ffb800;margin-right:5px;transition:all .3s;-webkit-transition:all .3s}.layui-rate li i:hover{cursor:pointer;transform:scale(1.12);-webkit-transform:scale(1.12)}.layui-rate[readonly] li i:hover{cursor:default;transform:scale(1)}.layui-rate-clear-icon{display:inline-block;color:#c6c6c6;padding-top:3px;font-size:18px;vertical-align:middle}.layui-rate-clear-icon:hover{cursor:pointer;color:#ff4949}
|
||||
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LoginWechatIcon",
|
||||
};
|
||||
</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-login-wechat"
|
||||
/>
|
||||
</template>
|
||||
@@ -0,0 +1,133 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 更灵活的布局方案。
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<lay-split-panel style="height: 300px">
|
||||
<lay-split-panel-item>A</lay-split-panel-item>
|
||||
<lay-split-panel-item>B</lay-split-panel-item>
|
||||
<lay-split-panel-item>C</lay-split-panel-item>
|
||||
</lay-split-panel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.lay-split-panel-item{
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
:::
|
||||
|
||||
::: title 自定义比例
|
||||
:::
|
||||
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<lay-split-panel style="height: 300px">
|
||||
<lay-split-panel-item :space="200">1</lay-split-panel-item>
|
||||
<lay-split-panel-item>2</lay-split-panel-item>
|
||||
<lay-split-panel-item :space="200">3</lay-split-panel-item>
|
||||
</lay-split-panel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 垂直布局
|
||||
:::
|
||||
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<lay-split-panel :vertical="true" style="height: 600px; width: 100%">
|
||||
<lay-split-panel-item>1</lay-split-panel-item>
|
||||
<lay-split-panel-item>2</lay-split-panel-item>
|
||||
<lay-split-panel-item>3</lay-split-panel-item>
|
||||
</lay-split-panel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 组合用法
|
||||
:::
|
||||
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<lay-split-panel style="height: 600px;">
|
||||
<lay-split-panel-item :space="300">
|
||||
<lay-split-panel :vertical="true" style="height: 600px; width: 100%">
|
||||
<lay-split-panel-item :space="200">1</lay-split-panel-item>
|
||||
<lay-split-panel-item>2</lay-split-panel-item>
|
||||
</lay-split-panel>
|
||||
</lay-split-panel-item>
|
||||
<lay-split-panel-item>2</lay-split-panel-item>
|
||||
<lay-split-panel-item>2</lay-split-panel-item>
|
||||
</lay-split-panel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title splitPanel属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 属性 | 描述 | 类型 |可选值 | 默认值|
|
||||
| ----- | ---- | ------ | ---| ---|
|
||||
| vertical | 是否垂直布局 | Boolean |`true` `false`| false |
|
||||
| minSize | 块拉动最小范围(按像素 `px`) | number | - | 50 |
|
||||
:::
|
||||
|
||||
::: title splitPanelItem属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 属性 | 描述 | 类型 |可选值 | 默认值|
|
||||
| ----- | ---- | ------ | ---| ---|
|
||||
| space | 默认每个占 `px` , 其他的自动平分 | number | - | 按照个数平分 |
|
||||
:::
|
||||
|
||||
::: contributor splitPanel
|
||||
:::
|
||||
|
||||
::: previousNext splitPanel
|
||||
:::
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
x<01><><EFBFBD>j<EFBFBD>0<0C>w<EFBFBD>S<EFBFBD><53><EFBFBD>`0H٭<48>6(k<19><>$jcj[Av҅<76><D285>>+ <09><>u<EFBFBD><75>}<7D><EFBFBD><7F><EFBFBD><EFBFBD>P<01>O<EFBFBD><0F>6<EFBFBD>N<><4E>;8Î<38>Bֵ<42>-<17>5lUX<1A><08>oV*<2A>Z<EFBFBD>䭔/<2F>U<EFBFBD>d<EFBFBD>=~mǢG<C7A2><03>K.<2E><EFBFBD>6L<36><4C>p<EFBFBD><- <20><>eF><3E>P.<2E><>)}<13><>x<EFBFBD><78><04><>eZLXm}R<>H9<48><39><EFBFBD><EFBFBD>G}_<>q<EFBFBD><1C><>Ti<0F><>+<2B>&7tt<74><74><16>aNX<4E>}lPE<><45><EFBFBD><EFBFBD>&[<5B><>2<EFBFBD>N<EFBFBD><0F>Vu<><75><EFBFBD>a%<25>}<7D><><EFBFBD>?<3F><>UX6<58><18>km<6B><z&<26><><EFBFBD><EFBFBD>nj<EFBFBD><C78C><EFBFBD>b<D7AB><62><EFBFBD>L݆<4C>6<EFBFBD>(V<>f<13><>r<EFBFBD><\ym>(<28>$<24>G<EFBFBD>B<><42><EFBFBD>
|
||||
Binary file not shown.
Reference in New Issue
Block a user