📝(cascader): 更新文档
更新文档
This commit is contained in:
parent
28d617ccc0
commit
c6e14ac986
@ -176,7 +176,7 @@ const selectBar = (item: any, selectIndex: number, parentIndex: number) => {
|
||||
|
||||
if (!item.children) {
|
||||
//输入框数据更新
|
||||
let data: never[] = [];
|
||||
let data: any[] = [];
|
||||
function extractData(orginData: any, dataContainer: any, index: number) {
|
||||
const element = orginData[index].data;
|
||||
const selectIndex = orginData[index].selectIndex;
|
||||
|
@ -253,6 +253,36 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
::: title 关闭标题
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-button @click="changeVisible9" type="primary">关闭标题</lay-button>
|
||||
<lay-layer title="false" move="true" shade="false" v-model="visible9">
|
||||
内容
|
||||
</lay-layer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
export default {
|
||||
setup() {
|
||||
const visible9 = ref(false)
|
||||
const changeVisible9 = function() {
|
||||
visible9.value = !visible9.value
|
||||
}
|
||||
return {
|
||||
visible9
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 函数调用
|
||||
:::
|
||||
|
||||
@ -270,20 +300,25 @@ import { layer } from "@layui/layer-vue"
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
let id = null;
|
||||
|
||||
const open = function() {
|
||||
id = layer.open({title:"标题",content:"内容", shade: false, btn: [
|
||||
{text:"关闭", callback: function(ids) {
|
||||
layer.close(ids);
|
||||
{text:"关闭", callback: function(layerId) {
|
||||
layer.close(layerId);
|
||||
}}
|
||||
]})
|
||||
}
|
||||
|
||||
const close = function() {
|
||||
layer.close(id)
|
||||
}
|
||||
|
||||
const closeAll = function() {
|
||||
layer.closeAll()
|
||||
}
|
||||
|
||||
return {
|
||||
open,
|
||||
close,
|
||||
|
@ -16,6 +16,7 @@
|
||||
<li>
|
||||
<h3>1.1.9 <span class="layui-badge-rim">2022-06-20</span></h3>
|
||||
<ul>
|
||||
<li>[新增] cascader 级联组件, 将数据按照指定的格式传入后分层分级,通过此组件逐级查看并选择。</li>
|
||||
<li>[新增] page-header 组件,页面的路径比较简单,则使用页头组件要,比面包屑更直观一点</li>
|
||||
<li>[修复] layer 组件 btn 属性 callback 回调参数 id 为空的问题</li>
|
||||
<li>[优化] layer 组件 callback 回调 id 参数, 配合 layer.close() 关闭当前弹层</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user