From b58caf6d46c4fc4b1dbaa8309ecf8865df651c2b Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期四, 29 二月 2024 15:04:39 +0800
Subject: [PATCH] 标准库
---
src/components/view/b2-standard.vue | 82 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue
new file mode 100644
index 0000000..da441f9
--- /dev/null
+++ b/src/components/view/b2-standard.vue
@@ -0,0 +1,82 @@
+<style scoped>
+ .standard {
+ padding: 20px 0;
+ }
+
+ .left {
+ width: 270px;
+ height: calc(100% - 40px - 30px);
+ background-color: white;
+ padding: 15px;
+ }
+</style>
+
+<template>
+ <div class="standard">
+ <div class="left">
+ <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" suffix-icon="el-icon-search" v-model="search" size="small" style="margin-bottom: 5px;"></el-input>
+ <el-tree class="filter-tree" :data="data" :props="defaultProps" default-expand-all
+ :filter-node-method="filterNode" ref="tree">
+ </el-tree>
+ </div>
+ <div class="right"></div>
+ </div>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ search: null,
+ data: [{
+ id: 1,
+ label: '涓�绾� 1',
+ children: [{
+ id: 4,
+ label: '浜岀骇 1-1',
+ children: [{
+ id: 9,
+ label: '涓夌骇 1-1-1'
+ }, {
+ id: 10,
+ label: '涓夌骇 1-1-2'
+ }]
+ }]
+ }, {
+ id: 2,
+ label: '涓�绾� 2',
+ children: [{
+ id: 5,
+ label: '浜岀骇 2-1'
+ }, {
+ id: 6,
+ label: '浜岀骇 2-2'
+ }]
+ }, {
+ id: 3,
+ label: '涓�绾� 3',
+ children: [{
+ id: 7,
+ label: '浜岀骇 3-1'
+ }, {
+ id: 8,
+ label: '浜岀骇 3-2'
+ }]
+ }],
+ defaultProps: {
+ children: 'children',
+ label: 'label'
+ }
+ }
+ },
+ mounted() {
+
+ },
+ methods: {
+ filterNode(value, data) {
+ if (!value) return true;
+ return data.label.indexOf(value) !== -1;
+ }
+ }
+ }
+</script>
\ No newline at end of file
--
Gitblit v1.9.3