🔱: [client] sync upgrade with 21 commits [trident-sync]

perf: 优化antdv4 示例授权页面tree的样式
build: publish success
chore: 1
chore: 1
chore: 1
fix: getFileName支持item参数

https://github.com/fast-crud/fast-crud/issues/385
fix: fs-form独立使用支持插槽

https://github.com/fast-crud/fast-crud/issues/389
fix: 修复三级以上路由页面无法缓存的问题

https://github.com/fast-crud/fast-crud/issues/394
perf: form.wrapper.buttons支持compute动态计算
feat: 表单支持变更关闭前提醒保存,form.wrapper支持beforeClose事件
fix: 修复图片裁剪按钮上下和左右相反的bug

https://github.com/fast-crud/fast-crud/issues/402
perf: alioss getAuthorization接口支持后台返回key

https://github.com/fast-crud/fast-crud/issues/405
perf: alioss getAuthorization接口支持后台返回key

https://github.com/fast-crud/fast-crud/issues/405
perf: fs-dict-tree支持插槽

https://github.com/fast-crud/fast-crud/issues/407
perf: 单选、多选、select、tree-select、table-select 都提供selected-change事件,可以获取选中的dict选项
feat: table-select 支持查看模式

https://github.com/fast-crud/fast-crud/issues/413
perf: 优化fs-admin可以在手机上操作
chore: pnpm workspace问题优化
docs: 1
chore: antdv4 支持主题色选择
...
This commit is contained in:
GitHub Actions Bot
2024-06-15 18:32:36 +00:00
parent 9caa4cd1d4
commit ad360e81cb
173 changed files with 3386 additions and 1108 deletions
@@ -6,10 +6,10 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
const list = await api.GetTree();
return {
current: 1,
offset: 0,
records: list,
total: 10000,
pageSize: 10000
limit: 10000
};
};
@@ -65,6 +65,7 @@ export default defineComponent({
//处理过,无需再次处理
return;
}
value.class="is-twig"
if (value.children != null && value.children.length > 0) {
return;
}
@@ -82,8 +83,13 @@ export default defineComponent({
}
// 所有的子节点都没有children
parent.class = "is-twig"; // 连接叶子节点的末梢枝杈节点
let i = 0
for (const child of parent.children) {
child.class = "is-leaf";
if(i !== 0){
child.class += " leaf-after";
}
i++
}
});
return [
@@ -104,7 +110,7 @@ export default defineComponent({
ctx.emit("remove", scope.dataRef);
}
function onChecked(a: any, b: any, c: any) {
console.log("chedcked", a, b, c);
utils.logger.info("chedcked", a, b, c);
}
function getChecked() {
const checked = treeRef.value.checkedKeys;
@@ -129,21 +135,40 @@ export default defineComponent({
<style lang="less">
.fs-permission-tree {
.is-twig ul {
display: flex;
.ant-tree-list-holder-inner{
flex-direction: row !important;
flex-wrap: wrap;
.is-twig{
width: 100%;
}
.is-leaf {
border-bottom: 1px solid #ddd;
padding: 5px;
//border-bottom: 1px solid #ddd;
&::before {
display: none;
}
&.leaf-after{
.ant-tree-indent-unit{
display: none;
}
}
.node-title-pane {
border-bottom: 1px solid #ddd;
}
}
}
//.is-twig ul {
// display: flex;
// flex-wrap: wrap;
//}
.node-title-pane {
display: flex;
.node-title {
width: 80px;
width: 110px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -6,9 +6,9 @@
<fs-crud ref="crudRef" v-bind="crudBinding">
<a-button v-permission="'sys:auth:per:add'" style="margin-left: 20px" @click="addHandle({})">
<fs-icon :icon="ui.icons.add"></fs-icon>
添加</a-button
>
<fs-permission-tree class="permission-tree" :tree="crudBinding.data" :checkable="false" :actions="permission" @add="addHandle" @edit="editHandle" @remove="removeHandle"></fs-permission-tree>
添加
</a-button>
<fs-permission-tree class="permission-tree mt-10" :tree="crudBinding.data" :checkable="false" :actions="permission" @add="addHandle" @edit="editHandle" @remove="removeHandle"></fs-permission-tree>
</fs-crud>
</fs-page>
</template>