@element-plus/nightly 0.0.20220801 → 0.0.20220804
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +46 -24
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +46 -24
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +26 -114
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +114 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/popconfirm/index.d.ts +7 -0
- package/es/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/es/components/popconfirm/src/popconfirm.mjs +5 -1
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +454 -447
- package/es/components/popconfirm/src/popconfirm2.mjs +14 -5
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/table/src/table-body/events-helper.d.ts +1 -3
- package/es/components/table/src/table-body/events-helper.mjs +2 -2
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -5
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +1 -1
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/util.mjs +1 -0
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/tree/src/model/tree-store.mjs +2 -2
- package/es/components/tree/src/model/tree-store.mjs.map +1 -1
- package/es/components/tree-v2/src/composables/useTree.d.ts +3 -0
- package/es/components/tree-v2/src/composables/useTree.mjs +17 -7
- package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.mjs +8 -2
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +27 -114
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +114 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/popconfirm/index.d.ts +7 -0
- package/lib/components/popconfirm/src/popconfirm.d.ts +1 -0
- package/lib/components/popconfirm/src/popconfirm.js +5 -1
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +454 -447
- package/lib/components/popconfirm/src/popconfirm2.js +13 -4
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/table/src/table-body/events-helper.d.ts +1 -3
- package/lib/components/table/src/table-body/events-helper.js +2 -2
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +0 -4
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-body/render-helper.js +1 -1
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/util.js +1 -0
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/tree/src/model/tree-store.js +1 -1
- package/lib/components/tree/src/model/tree-store.js.map +1 -1
- package/lib/components/tree-v2/src/composables/useTree.d.ts +3 -0
- package/lib/components/tree-v2/src/composables/useTree.js +17 -7
- package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.js +8 -2
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-message.css +1 -1
- package/theme-chalk/el-popover.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/message.scss +1 -0
- package/theme-chalk/src/popover.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ref, shallowRef, watch, computed, nextTick } from 'vue';
|
|
2
|
+
import '../../../../utils/index.mjs';
|
|
2
3
|
import { TreeOptionsEnum, NODE_CLICK, CURRENT_CHANGE, NODE_EXPAND, NODE_COLLAPSE } from '../virtual-tree.mjs';
|
|
3
4
|
import { useCheck } from './useCheck.mjs';
|
|
4
5
|
import { useFilter } from './useFilter.mjs';
|
|
6
|
+
import { isObject } from '@vue/shared';
|
|
5
7
|
|
|
6
8
|
function useTree(props, emit) {
|
|
7
9
|
const expandedKeySet = ref(new Set(props.defaultExpandedKeys));
|
|
@@ -145,9 +147,9 @@ function useTree(props, emit) {
|
|
|
145
147
|
function toggleExpand(node) {
|
|
146
148
|
const expandedKeys = expandedKeySet.value;
|
|
147
149
|
if (expandedKeys.has(node.key)) {
|
|
148
|
-
|
|
150
|
+
collapseNode(node);
|
|
149
151
|
} else {
|
|
150
|
-
|
|
152
|
+
expandNode(node);
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
155
|
function handleNodeClick(node, e) {
|
|
@@ -169,9 +171,9 @@ function useTree(props, emit) {
|
|
|
169
171
|
function handleNodeCheck(node, checked) {
|
|
170
172
|
toggleCheckbox(node, checked);
|
|
171
173
|
}
|
|
172
|
-
function
|
|
174
|
+
function expandNode(node) {
|
|
173
175
|
const keySet = expandedKeySet.value;
|
|
174
|
-
if (
|
|
176
|
+
if (tree.value && props.accordion) {
|
|
175
177
|
const { treeNodeMap } = tree.value;
|
|
176
178
|
keySet.forEach((key) => {
|
|
177
179
|
const node2 = treeNodeMap.get(key);
|
|
@@ -183,7 +185,7 @@ function useTree(props, emit) {
|
|
|
183
185
|
keySet.add(node.key);
|
|
184
186
|
emit(NODE_EXPAND, node.data, node);
|
|
185
187
|
}
|
|
186
|
-
function
|
|
188
|
+
function collapseNode(node) {
|
|
187
189
|
expandedKeySet.value.delete(node.key);
|
|
188
190
|
emit(NODE_COLLAPSE, node.data, node);
|
|
189
191
|
}
|
|
@@ -201,7 +203,7 @@ function useTree(props, emit) {
|
|
|
201
203
|
var _a, _b;
|
|
202
204
|
if (!currentKey.value)
|
|
203
205
|
return void 0;
|
|
204
|
-
return (_b = (_a = tree
|
|
206
|
+
return (_b = (_a = tree.value) == null ? void 0 : _a.treeNodeMap.get(currentKey.value)) == null ? void 0 : _b.data;
|
|
205
207
|
}
|
|
206
208
|
function getCurrentKey() {
|
|
207
209
|
return currentKey.value;
|
|
@@ -212,6 +214,11 @@ function useTree(props, emit) {
|
|
|
212
214
|
function setData(data) {
|
|
213
215
|
nextTick(() => tree.value = createTree(data));
|
|
214
216
|
}
|
|
217
|
+
function getNode(data) {
|
|
218
|
+
var _a;
|
|
219
|
+
const key = isObject(data) ? getKey(data) : data;
|
|
220
|
+
return (_a = tree.value) == null ? void 0 : _a.treeNodeMap.get(key);
|
|
221
|
+
}
|
|
215
222
|
return {
|
|
216
223
|
tree,
|
|
217
224
|
flattenTree,
|
|
@@ -238,7 +245,10 @@ function useTree(props, emit) {
|
|
|
238
245
|
setChecked,
|
|
239
246
|
setCheckedKeys,
|
|
240
247
|
filter,
|
|
241
|
-
setData
|
|
248
|
+
setData,
|
|
249
|
+
getNode,
|
|
250
|
+
expandNode,
|
|
251
|
+
collapseNode
|
|
242
252
|
};
|
|
243
253
|
}
|
|
244
254
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTree.mjs","sources":["../../../../../../../packages/components/tree-v2/src/composables/useTree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, ref, shallowRef, watch } from 'vue'\nimport {\n CURRENT_CHANGE,\n NODE_CLICK,\n NODE_COLLAPSE,\n NODE_EXPAND,\n TreeOptionsEnum,\n} from '../virtual-tree'\nimport { useCheck } from './useCheck'\nimport { useFilter } from './useFilter'\nimport type {\n Tree,\n TreeData,\n TreeKey,\n TreeNode,\n TreeNodeData,\n TreeProps,\n} from '../types'\n\nexport function useTree(props: TreeProps, emit) {\n const expandedKeySet = ref<Set<TreeKey>>(new Set(props.defaultExpandedKeys))\n const currentKey = ref<TreeKey | undefined>()\n const tree = shallowRef<Tree | undefined>()\n\n watch(\n () => props.currentNodeKey,\n (key) => {\n currentKey.value = key\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.data,\n (data: TreeData) => {\n setData(data)\n },\n {\n immediate: true,\n }\n )\n\n const {\n isIndeterminate,\n isChecked,\n toggleCheckbox,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n } = useCheck(props, tree)\n\n const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(\n props,\n tree\n )\n\n const valueKey = computed(() => {\n return props.props?.value || TreeOptionsEnum.KEY\n })\n const childrenKey = computed(() => {\n return props.props?.children || TreeOptionsEnum.CHILDREN\n })\n const disabledKey = computed(() => {\n return props.props?.disabled || TreeOptionsEnum.DISABLED\n })\n const labelKey = computed(() => {\n return props.props?.label || TreeOptionsEnum.LABEL\n })\n\n const flattenTree = computed(() => {\n const expandedKeys = expandedKeySet.value\n const hiddenKeys = hiddenNodeKeySet.value\n const flattenNodes: TreeNode[] = []\n const nodes = (tree.value && tree.value.treeNodes) || []\n function traverse() {\n const stack: TreeNode[] = []\n for (let i = nodes.length - 1; i >= 0; --i) {\n stack.push(nodes[i])\n }\n while (stack.length) {\n const node = stack.pop()\n if (!node) continue\n if (!hiddenKeys.has(node.key)) {\n flattenNodes.push(node)\n }\n // Only \"visible\" nodes will be rendered\n if (expandedKeys.has(node.key)) {\n const children = node.children\n if (children) {\n const length = children.length\n for (let i = length - 1; i >= 0; --i) {\n stack.push(children[i])\n }\n }\n }\n }\n }\n traverse()\n return flattenNodes\n })\n\n const isNotEmpty = computed(() => {\n return flattenTree.value.length > 0\n })\n\n function createTree(data: TreeData): Tree {\n const treeNodeMap: Map<TreeKey, TreeNode> = new Map()\n const levelTreeNodeMap: Map<number, TreeNode[]> = new Map()\n let maxLevel = 1\n function traverse(\n nodes: TreeData,\n level = 1,\n parent: TreeNode | undefined = undefined\n ) {\n const siblings: TreeNode[] = []\n for (const rawNode of nodes) {\n const value = getKey(rawNode)\n const node: TreeNode = {\n level,\n key: value,\n data: rawNode,\n }\n node.label = getLabel(rawNode)\n node.parent = parent\n const children = getChildren(rawNode)\n node.disabled = getDisabled(rawNode)\n node.isLeaf = !children || children.length === 0\n if (children && children.length) {\n node.children = traverse(children, level + 1, node)\n }\n siblings.push(node)\n treeNodeMap.set(value, node)\n if (!levelTreeNodeMap.has(level)) {\n levelTreeNodeMap.set(level, [])\n }\n levelTreeNodeMap.get(level)?.push(node)\n }\n if (level > maxLevel) {\n maxLevel = level\n }\n return siblings\n }\n const treeNodes: TreeNode[] = traverse(data)\n return {\n treeNodeMap,\n levelTreeNodeMap,\n maxLevel,\n treeNodes,\n }\n }\n\n function filter(query: string) {\n const keys = doFilter(query)\n if (keys) {\n expandedKeySet.value = keys\n }\n }\n\n function getChildren(node: TreeNodeData): TreeNodeData[] {\n return node[childrenKey.value]\n }\n\n function getKey(node: TreeNodeData): TreeKey {\n if (!node) {\n return ''\n }\n return node[valueKey.value]\n }\n\n function getDisabled(node: TreeNodeData): boolean {\n return node[disabledKey.value]\n }\n\n function getLabel(node: TreeNodeData): string {\n return node[labelKey.value]\n }\n\n function toggleExpand(node: TreeNode) {\n const expandedKeys = expandedKeySet.value\n if (expandedKeys.has(node.key)) {\n collapse(node)\n } else {\n expand(node)\n }\n }\n\n function handleNodeClick(node: TreeNode, e: MouseEvent) {\n emit(NODE_CLICK, node.data, node, e)\n handleCurrentChange(node)\n if (props.expandOnClickNode) {\n toggleExpand(node)\n }\n if (props.showCheckbox && props.checkOnClickNode && !node.disabled) {\n toggleCheckbox(node, !isChecked(node), true)\n }\n }\n\n function handleCurrentChange(node: TreeNode) {\n if (!isCurrent(node)) {\n currentKey.value = node.key\n emit(CURRENT_CHANGE, node.data, node)\n }\n }\n\n function handleNodeCheck(node: TreeNode, checked: boolean) {\n toggleCheckbox(node, checked)\n }\n\n function expand(node: TreeNode) {\n const keySet = expandedKeySet.value\n if (tree?.value && props.accordion) {\n // whether only one node among the same level can be expanded at one time\n const { treeNodeMap } = tree.value\n keySet.forEach((key) => {\n const node = treeNodeMap.get(key)\n if (node && node.level === node.level) {\n keySet.delete(key)\n }\n })\n }\n keySet.add(node.key)\n emit(NODE_EXPAND, node.data, node)\n }\n\n function collapse(node: TreeNode) {\n expandedKeySet.value.delete(node.key)\n emit(NODE_COLLAPSE, node.data, node)\n }\n\n function isExpanded(node: TreeNode): boolean {\n return expandedKeySet.value.has(node.key)\n }\n\n function isDisabled(node: TreeNode): boolean {\n return !!node.disabled\n }\n\n function isCurrent(node: TreeNode): boolean {\n const current = currentKey.value\n return !!current && current === node.key\n }\n\n function getCurrentNode(): TreeNodeData | undefined {\n if (!currentKey.value) return undefined\n return tree?.value?.treeNodeMap.get(currentKey.value)?.data\n }\n\n function getCurrentKey(): TreeKey | undefined {\n return currentKey.value\n }\n\n function setCurrentKey(key: TreeKey): void {\n currentKey.value = key\n }\n\n function setData(data: TreeData) {\n nextTick(() => (tree.value = createTree(data)))\n }\n\n return {\n tree,\n flattenTree,\n isNotEmpty,\n getKey,\n getChildren,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isChecked,\n isIndeterminate,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n }\n}\n"],"names":[],"mappings":";;;;;AAUO,SAAS,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;AACrC,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC;AACjE,EAAE,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;AAC3B,EAAE,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;AAC5B,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,cAAc,EAAE,CAAC,GAAG,KAAK;AAC7C,IAAI,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC;AAC3B,GAAG,EAAE;AACL,IAAI,SAAS,EAAE,IAAI;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,KAAK;AACpC,IAAI,OAAO,CAAC,IAAI,CAAC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G;AAC3B,IAAI,OAAO,UAAU,CAAC,KAAK,CAAC;AAC5B,GAAG;AACH,EAAE,SAAS,aAAa,CAAC,GAAG,EAAE;AAC9B,IAAI,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC;AAC3B,GAAG;AACH,EAAE,SAAS,OAAO,CAAC,IAAI,EAAE;AACzB,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;AAClD,GAAG;AACH,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,uBAAuB;AAC3B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,MAAM;AACV,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"useTree.mjs","sources":["../../../../../../../packages/components/tree-v2/src/composables/useTree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, ref, shallowRef, watch } from 'vue'\nimport { isObject } from '@element-plus/utils'\nimport {\n CURRENT_CHANGE,\n NODE_CLICK,\n NODE_COLLAPSE,\n NODE_EXPAND,\n TreeOptionsEnum,\n} from '../virtual-tree'\nimport { useCheck } from './useCheck'\nimport { useFilter } from './useFilter'\nimport type {\n Tree,\n TreeData,\n TreeKey,\n TreeNode,\n TreeNodeData,\n TreeProps,\n} from '../types'\n\nexport function useTree(props: TreeProps, emit) {\n const expandedKeySet = ref<Set<TreeKey>>(new Set(props.defaultExpandedKeys))\n const currentKey = ref<TreeKey | undefined>()\n const tree = shallowRef<Tree | undefined>()\n\n watch(\n () => props.currentNodeKey,\n (key) => {\n currentKey.value = key\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.data,\n (data: TreeData) => {\n setData(data)\n },\n {\n immediate: true,\n }\n )\n\n const {\n isIndeterminate,\n isChecked,\n toggleCheckbox,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n } = useCheck(props, tree)\n\n const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(\n props,\n tree\n )\n\n const valueKey = computed(() => {\n return props.props?.value || TreeOptionsEnum.KEY\n })\n const childrenKey = computed(() => {\n return props.props?.children || TreeOptionsEnum.CHILDREN\n })\n const disabledKey = computed(() => {\n return props.props?.disabled || TreeOptionsEnum.DISABLED\n })\n const labelKey = computed(() => {\n return props.props?.label || TreeOptionsEnum.LABEL\n })\n\n const flattenTree = computed(() => {\n const expandedKeys = expandedKeySet.value\n const hiddenKeys = hiddenNodeKeySet.value\n const flattenNodes: TreeNode[] = []\n const nodes = (tree.value && tree.value.treeNodes) || []\n function traverse() {\n const stack: TreeNode[] = []\n for (let i = nodes.length - 1; i >= 0; --i) {\n stack.push(nodes[i])\n }\n while (stack.length) {\n const node = stack.pop()\n if (!node) continue\n if (!hiddenKeys.has(node.key)) {\n flattenNodes.push(node)\n }\n // Only \"visible\" nodes will be rendered\n if (expandedKeys.has(node.key)) {\n const children = node.children\n if (children) {\n const length = children.length\n for (let i = length - 1; i >= 0; --i) {\n stack.push(children[i])\n }\n }\n }\n }\n }\n traverse()\n return flattenNodes\n })\n\n const isNotEmpty = computed(() => {\n return flattenTree.value.length > 0\n })\n\n function createTree(data: TreeData): Tree {\n const treeNodeMap: Map<TreeKey, TreeNode> = new Map()\n const levelTreeNodeMap: Map<number, TreeNode[]> = new Map()\n let maxLevel = 1\n function traverse(\n nodes: TreeData,\n level = 1,\n parent: TreeNode | undefined = undefined\n ) {\n const siblings: TreeNode[] = []\n for (const rawNode of nodes) {\n const value = getKey(rawNode)\n const node: TreeNode = {\n level,\n key: value,\n data: rawNode,\n }\n node.label = getLabel(rawNode)\n node.parent = parent\n const children = getChildren(rawNode)\n node.disabled = getDisabled(rawNode)\n node.isLeaf = !children || children.length === 0\n if (children && children.length) {\n node.children = traverse(children, level + 1, node)\n }\n siblings.push(node)\n treeNodeMap.set(value, node)\n if (!levelTreeNodeMap.has(level)) {\n levelTreeNodeMap.set(level, [])\n }\n levelTreeNodeMap.get(level)?.push(node)\n }\n if (level > maxLevel) {\n maxLevel = level\n }\n return siblings\n }\n const treeNodes: TreeNode[] = traverse(data)\n return {\n treeNodeMap,\n levelTreeNodeMap,\n maxLevel,\n treeNodes,\n }\n }\n\n function filter(query: string) {\n const keys = doFilter(query)\n if (keys) {\n expandedKeySet.value = keys\n }\n }\n\n function getChildren(node: TreeNodeData): TreeNodeData[] {\n return node[childrenKey.value]\n }\n\n function getKey(node: TreeNodeData): TreeKey {\n if (!node) {\n return ''\n }\n return node[valueKey.value]\n }\n\n function getDisabled(node: TreeNodeData): boolean {\n return node[disabledKey.value]\n }\n\n function getLabel(node: TreeNodeData): string {\n return node[labelKey.value]\n }\n\n function toggleExpand(node: TreeNode) {\n const expandedKeys = expandedKeySet.value\n if (expandedKeys.has(node.key)) {\n collapseNode(node)\n } else {\n expandNode(node)\n }\n }\n\n function handleNodeClick(node: TreeNode, e: MouseEvent) {\n emit(NODE_CLICK, node.data, node, e)\n handleCurrentChange(node)\n if (props.expandOnClickNode) {\n toggleExpand(node)\n }\n if (props.showCheckbox && props.checkOnClickNode && !node.disabled) {\n toggleCheckbox(node, !isChecked(node), true)\n }\n }\n\n function handleCurrentChange(node: TreeNode) {\n if (!isCurrent(node)) {\n currentKey.value = node.key\n emit(CURRENT_CHANGE, node.data, node)\n }\n }\n\n function handleNodeCheck(node: TreeNode, checked: boolean) {\n toggleCheckbox(node, checked)\n }\n\n function expandNode(node: TreeNode) {\n const keySet = expandedKeySet.value\n if (tree.value && props.accordion) {\n // whether only one node among the same level can be expanded at one time\n const { treeNodeMap } = tree.value\n keySet.forEach((key) => {\n const node = treeNodeMap.get(key)\n if (node && node.level === node.level) {\n keySet.delete(key)\n }\n })\n }\n keySet.add(node.key)\n emit(NODE_EXPAND, node.data, node)\n }\n\n function collapseNode(node: TreeNode) {\n expandedKeySet.value.delete(node.key)\n emit(NODE_COLLAPSE, node.data, node)\n }\n\n function isExpanded(node: TreeNode): boolean {\n return expandedKeySet.value.has(node.key)\n }\n\n function isDisabled(node: TreeNode): boolean {\n return !!node.disabled\n }\n\n function isCurrent(node: TreeNode): boolean {\n const current = currentKey.value\n return !!current && current === node.key\n }\n\n function getCurrentNode(): TreeNodeData | undefined {\n if (!currentKey.value) return undefined\n return tree.value?.treeNodeMap.get(currentKey.value)?.data\n }\n\n function getCurrentKey(): TreeKey | undefined {\n return currentKey.value\n }\n\n function setCurrentKey(key: TreeKey): void {\n currentKey.value = key\n }\n\n function setData(data: TreeData) {\n nextTick(() => (tree.value = createTree(data)))\n }\n\n function getNode(data: TreeKey | TreeNodeData) {\n const key = isObject(data) ? getKey(data) : data\n return tree.value?.treeNodeMap.get(key)\n }\n\n return {\n tree,\n flattenTree,\n isNotEmpty,\n getKey,\n getChildren,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isChecked,\n isIndeterminate,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n }\n}\n"],"names":[],"mappings":";;;;;;;AAWO,SAAS,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;AACrC,EAAE,MAAM,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,IAAI,SAAS;AACb,IAAI,uBAAuB;AAC3B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -51,7 +51,10 @@ const _sfc_main = defineComponent({
|
|
|
51
51
|
setChecked,
|
|
52
52
|
setCheckedKeys,
|
|
53
53
|
filter,
|
|
54
|
-
setData
|
|
54
|
+
setData,
|
|
55
|
+
getNode,
|
|
56
|
+
expandNode,
|
|
57
|
+
collapseNode
|
|
55
58
|
} = useTree(props, ctx.emit);
|
|
56
59
|
ctx.expose({
|
|
57
60
|
getCurrentNode,
|
|
@@ -64,7 +67,10 @@ const _sfc_main = defineComponent({
|
|
|
64
67
|
setChecked,
|
|
65
68
|
setCheckedKeys,
|
|
66
69
|
filter,
|
|
67
|
-
setData
|
|
70
|
+
setData,
|
|
71
|
+
getNode,
|
|
72
|
+
expandNode,
|
|
73
|
+
collapseNode
|
|
68
74
|
});
|
|
69
75
|
return {
|
|
70
76
|
t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-v2/src/tree.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), { [ns.m('highlight-current')]: highlightCurrent }]\"\n role=\"tree\"\n >\n <fixed-size-list\n v-if=\"isNotEmpty\"\n :class-name=\"ns.b('virtual-list')\"\n :data=\"flattenTree\"\n :total=\"flattenTree.length\"\n :height=\"height\"\n :item-size=\"itemSize\"\n :perf-mode=\"perfMode\"\n >\n <template #default=\"{ data, index, style }\">\n <el-tree-node\n :key=\"data[index].key\"\n :style=\"style\"\n :node=\"data[index]\"\n :expanded=\"isExpanded(data[index])\"\n :show-checkbox=\"showCheckbox\"\n :checked=\"isChecked(data[index])\"\n :indeterminate=\"isIndeterminate(data[index])\"\n :disabled=\"isDisabled(data[index])\"\n :current=\"isCurrent(data[index])\"\n :hidden-expand-icon=\"isForceHiddenExpandIcon(data[index])\"\n @click=\"handleNodeClick\"\n @toggle=\"toggleExpand\"\n @check=\"handleNodeCheck\"\n />\n </template>\n </fixed-size-list>\n <div v-else :class=\"ns.e('empty-block')\">\n <span :class=\"ns.e('empty-text')\">{{\n emptyText ?? t('el.tree.emptyText')\n }}</span>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, provide } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { formItemContextKey } from '@element-plus/tokens'\nimport { FixedSizeList } from '@element-plus/components/virtual-list'\nimport { useTree } from './composables/useTree'\nimport ElTreeNode from './tree-node.vue'\nimport { ROOT_TREE_INJECTION_KEY, treeEmits, treeProps } from './virtual-tree'\nimport type { TreeProps } from './types'\n\nexport default defineComponent({\n name: 'ElTreeV2',\n components: {\n ElTreeNode,\n FixedSizeList,\n },\n props: treeProps,\n emits: treeEmits,\n setup(props: TreeProps, ctx) {\n provide(ROOT_TREE_INJECTION_KEY, {\n ctx,\n props,\n instance: getCurrentInstance(),\n })\n provide(formItemContextKey, undefined)\n const { t } = useLocale()\n const ns = useNamespace('tree')\n const {\n flattenTree,\n isNotEmpty,\n toggleExpand,\n isExpanded,\n isIndeterminate,\n isChecked,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n toggleCheckbox,\n handleNodeClick,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n } = useTree(props, ctx.emit)\n\n ctx.expose({\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n })\n\n return {\n t,\n ns,\n flattenTree,\n itemSize: 26,\n isNotEmpty,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isIndeterminate,\n isChecked,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeCheck,\n }\n },\n})\n</script>\n"],"names":["_resolveComponent","_openBlock","_normalizeClass","_createBlock","_withCtx","_normalizeStyle","_createElementBlock","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;AAkDA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,UAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,UAAA;AAAA,IACA,aAAA;AAAA,GACF;AAAA,EACA,KAAO,EAAA,SAAA;AAAA,EACP,KAAO,EAAA,SAAA;AAAA,EACP,KAAA,CAAM,OAAkB,GAAK,EAAA;AAC3B,IAAA,OAAA,CAAQ,uBAAyB,EAAA;AAAA,MAC/B,GAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAU,kBAAmB,EAAA;AAAA,KAC9B,CAAA,CAAA;AACD,IAAA,OAAA,CAAQ,oBAAoB,KAAS,CAAA,CAAA,CAAA;AACrC,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA;AAAA,MACJ,WAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,UAAA;AAAA,MACA,eAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,uBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,eAAA;AAAA,MAEA,cAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAAA;AAAA,MACA,mBAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,KACE,GAAA,OAAA,CAAQ,KAAO,EAAA,GAAA,CAAI,IAAI,CAAA,CAAA;AAE3B,IAAA,GAAA,CAAI,MAAO,CAAA;AAAA,MACT,cAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAAA;AAAA,MACA,mBAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAO,OAAA;AAAA,MACL,CAAA;AAAA,MACA,EAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAU,EAAA,EAAA;AAAA,MACV,UAAA;AAAA,MACA,YAAA;AAAA,MACA,cAAA;AAAA,MACA,UAAA;AAAA,MACA,eAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,uBAAA;AAAA,MACA,eAAA;AAAA,MACA,eAAA;AAAA,KACF,CAAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;;;
|
|
1
|
+
{"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-v2/src/tree.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), { [ns.m('highlight-current')]: highlightCurrent }]\"\n role=\"tree\"\n >\n <fixed-size-list\n v-if=\"isNotEmpty\"\n :class-name=\"ns.b('virtual-list')\"\n :data=\"flattenTree\"\n :total=\"flattenTree.length\"\n :height=\"height\"\n :item-size=\"itemSize\"\n :perf-mode=\"perfMode\"\n >\n <template #default=\"{ data, index, style }\">\n <el-tree-node\n :key=\"data[index].key\"\n :style=\"style\"\n :node=\"data[index]\"\n :expanded=\"isExpanded(data[index])\"\n :show-checkbox=\"showCheckbox\"\n :checked=\"isChecked(data[index])\"\n :indeterminate=\"isIndeterminate(data[index])\"\n :disabled=\"isDisabled(data[index])\"\n :current=\"isCurrent(data[index])\"\n :hidden-expand-icon=\"isForceHiddenExpandIcon(data[index])\"\n @click=\"handleNodeClick\"\n @toggle=\"toggleExpand\"\n @check=\"handleNodeCheck\"\n />\n </template>\n </fixed-size-list>\n <div v-else :class=\"ns.e('empty-block')\">\n <span :class=\"ns.e('empty-text')\">{{\n emptyText ?? t('el.tree.emptyText')\n }}</span>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, provide } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { formItemContextKey } from '@element-plus/tokens'\nimport { FixedSizeList } from '@element-plus/components/virtual-list'\nimport { useTree } from './composables/useTree'\nimport ElTreeNode from './tree-node.vue'\nimport { ROOT_TREE_INJECTION_KEY, treeEmits, treeProps } from './virtual-tree'\nimport type { TreeProps } from './types'\n\nexport default defineComponent({\n name: 'ElTreeV2',\n components: {\n ElTreeNode,\n FixedSizeList,\n },\n props: treeProps,\n emits: treeEmits,\n setup(props: TreeProps, ctx) {\n provide(ROOT_TREE_INJECTION_KEY, {\n ctx,\n props,\n instance: getCurrentInstance(),\n })\n provide(formItemContextKey, undefined)\n const { t } = useLocale()\n const ns = useNamespace('tree')\n const {\n flattenTree,\n isNotEmpty,\n toggleExpand,\n isExpanded,\n isIndeterminate,\n isChecked,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n toggleCheckbox,\n handleNodeClick,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n } = useTree(props, ctx.emit)\n\n ctx.expose({\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n })\n\n return {\n t,\n ns,\n flattenTree,\n itemSize: 26,\n isNotEmpty,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isIndeterminate,\n isChecked,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeCheck,\n }\n },\n})\n</script>\n"],"names":["_resolveComponent","_openBlock","_normalizeClass","_createBlock","_withCtx","_normalizeStyle","_createElementBlock","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;AAkDA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,UAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,UAAA;AAAA,IACA,aAAA;AAAA,GACF;AAAA,EACA,KAAO,EAAA,SAAA;AAAA,EACP,KAAO,EAAA,SAAA;AAAA,EACP,KAAA,CAAM,OAAkB,GAAK,EAAA;AAC3B,IAAA,OAAA,CAAQ,uBAAyB,EAAA;AAAA,MAC/B,GAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAU,kBAAmB,EAAA;AAAA,KAC9B,CAAA,CAAA;AACD,IAAA,OAAA,CAAQ,oBAAoB,KAAS,CAAA,CAAA,CAAA;AACrC,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA;AAAA,MACJ,WAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,UAAA;AAAA,MACA,eAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,uBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,eAAA;AAAA,MAEA,cAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAA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A,EAAA,IAAA,CAAA,eAAA;;;;AAQR,KAAA,EAAA,CAAA,EAAA,CAAA,YAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,WAAA,CAAA,CAAA,KAAAJ,SAAA,EAAA,EAAAK,kBAAA,CAAA,KAAA,EAAA;MAJO,GAAK,EAAA,CAAA;AAAM,MAAA,KAAA,EAAAJ,cAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,aAAA,CAAA,CAAA;OAGb;AAAA,MAFFK,kBAAO,CAAA,MAAA,EAAA;AAAI,QAAA,KAAA,EAAAL,qCACF,CAAA,CAAA;AAAA,OAAA,EAAAM,eAAA,CAAA,CAAA,EAAA,GAAA,IAAA,CAAA,SAAA,KAAA,IAAA,GAAA,EAAA,GAAA,IAAA,CAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,EAAA,CAAA,CAAA;;;;;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import './hooks/index.mjs';
|
|
|
7
7
|
import './tokens/index.mjs';
|
|
8
8
|
export { makeInstaller } from './make-installer.mjs';
|
|
9
9
|
export { default as dayjs } from 'dayjs';
|
|
10
|
-
export { affixEmits, affixProps } from './components/affix/src/
|
|
10
|
+
export { affixEmits, affixProps } from './components/affix/src/affix.mjs';
|
|
11
11
|
export { ElAffix } from './components/affix/index.mjs';
|
|
12
12
|
export { alertEffects, alertEmits, alertProps } from './components/alert/src/alert.mjs';
|
|
13
13
|
export { ElAlert } from './components/alert/index.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20220804";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220804'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var affix$1 = require('./src/
|
|
7
|
-
var affix = require('./src/
|
|
6
|
+
var affix$1 = require('./src/affix2.js');
|
|
7
|
+
var affix = require('./src/affix.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElAffix = install.withInstall(affix$1["default"]);
|
|
@@ -2,123 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var error = require('../../../utils/error.js');
|
|
13
|
-
var scroll = require('../../../utils/dom/scroll.js');
|
|
6
|
+
require('../../../constants/index.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
|
+
var core = require('@vueuse/core');
|
|
9
|
+
var event = require('../../../constants/event.js');
|
|
14
10
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
width: rootWidth,
|
|
33
|
-
top: rootTop,
|
|
34
|
-
bottom: rootBottom,
|
|
35
|
-
update: updateRoot
|
|
36
|
-
} = core.useElementBounding(root);
|
|
37
|
-
const targetRect = core.useElementBounding(target);
|
|
38
|
-
const fixed = vue.ref(false);
|
|
39
|
-
const scrollTop = vue.ref(0);
|
|
40
|
-
const transform = vue.ref(0);
|
|
41
|
-
const rootStyle = vue.computed(() => {
|
|
42
|
-
return {
|
|
43
|
-
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
44
|
-
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
const affixStyle = vue.computed(() => {
|
|
48
|
-
if (!fixed.value)
|
|
49
|
-
return {};
|
|
50
|
-
const offset = props.offset ? `${props.offset}px` : 0;
|
|
51
|
-
return {
|
|
52
|
-
height: `${rootHeight.value}px`,
|
|
53
|
-
width: `${rootWidth.value}px`,
|
|
54
|
-
top: props.position === "top" ? offset : "",
|
|
55
|
-
bottom: props.position === "bottom" ? offset : "",
|
|
56
|
-
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
57
|
-
zIndex: props.zIndex
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
const update = () => {
|
|
61
|
-
if (!scrollContainer.value)
|
|
62
|
-
return;
|
|
63
|
-
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
64
|
-
if (props.position === "top") {
|
|
65
|
-
if (props.target) {
|
|
66
|
-
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
67
|
-
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
68
|
-
transform.value = difference < 0 ? difference : 0;
|
|
69
|
-
} else {
|
|
70
|
-
fixed.value = props.offset > rootTop.value;
|
|
71
|
-
}
|
|
72
|
-
} else if (props.target) {
|
|
73
|
-
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
74
|
-
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
75
|
-
transform.value = difference < 0 ? -difference : 0;
|
|
76
|
-
} else {
|
|
77
|
-
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
const handleScroll = () => {
|
|
81
|
-
emit("scroll", {
|
|
82
|
-
scrollTop: scrollTop.value,
|
|
83
|
-
fixed: fixed.value
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
vue.watch(fixed, (val) => emit("change", val));
|
|
87
|
-
vue.onMounted(() => {
|
|
88
|
-
var _a;
|
|
89
|
-
if (props.target) {
|
|
90
|
-
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
91
|
-
if (!target.value)
|
|
92
|
-
error.throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
93
|
-
} else {
|
|
94
|
-
target.value = document.documentElement;
|
|
95
|
-
}
|
|
96
|
-
scrollContainer.value = scroll.getScrollContainer(root.value, true);
|
|
97
|
-
updateRoot();
|
|
98
|
-
});
|
|
99
|
-
core.useEventListener(scrollContainer, "scroll", handleScroll);
|
|
100
|
-
vue.watchEffect(update);
|
|
101
|
-
expose({
|
|
102
|
-
update
|
|
103
|
-
});
|
|
104
|
-
return (_ctx, _cache) => {
|
|
105
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
106
|
-
ref_key: "root",
|
|
107
|
-
ref: root,
|
|
108
|
-
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
109
|
-
style: vue.normalizeStyle(vue.unref(rootStyle))
|
|
110
|
-
}, [
|
|
111
|
-
vue.createElementVNode("div", {
|
|
112
|
-
class: vue.normalizeClass({ [vue.unref(ns).m("fixed")]: fixed.value }),
|
|
113
|
-
style: vue.normalizeStyle(vue.unref(affixStyle))
|
|
114
|
-
}, [
|
|
115
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
116
|
-
], 6)
|
|
117
|
-
], 6);
|
|
118
|
-
};
|
|
11
|
+
const affixProps = runtime.buildProps({
|
|
12
|
+
zIndex: {
|
|
13
|
+
type: runtime.definePropType([Number, String]),
|
|
14
|
+
default: 100
|
|
15
|
+
},
|
|
16
|
+
target: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
offset: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
position: {
|
|
25
|
+
type: String,
|
|
26
|
+
values: ["top", "bottom"],
|
|
27
|
+
default: "top"
|
|
119
28
|
}
|
|
120
29
|
});
|
|
121
|
-
|
|
30
|
+
const affixEmits = {
|
|
31
|
+
scroll: ({ scrollTop, fixed }) => core.isNumber(scrollTop) && core.isBoolean(fixed),
|
|
32
|
+
[event.CHANGE_EVENT]: (fixed) => core.isBoolean(fixed)
|
|
33
|
+
};
|
|
122
34
|
|
|
123
|
-
exports
|
|
35
|
+
exports.affixEmits = affixEmits;
|
|
36
|
+
exports.affixProps = affixProps;
|
|
124
37
|
//# sourceMappingURL=affix.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix.js","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix.js","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n target: {\n type: String,\n default: '',\n },\n offset: {\n type: Number,\n default: 0,\n },\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":["buildProps","definePropType","isNumber","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;;;AAOY,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAKC,aAAQ,CAAC,SAAS,CAAC,IAAIC,cAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAACC,kBAAY,GAAG,CAAC,KAAK,KAAKD,cAAS,CAAC,KAAK,CAAC;AAC7C;;;;;"}
|
|
@@ -2,36 +2,123 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
require('../../../constants/index.js');
|
|
7
|
-
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
5
|
+
var vue = require('vue');
|
|
8
6
|
var core = require('@vueuse/core');
|
|
9
|
-
|
|
7
|
+
require('../../../utils/index.js');
|
|
8
|
+
require('../../../hooks/index.js');
|
|
9
|
+
var affix = require('./affix.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var error = require('../../../utils/error.js');
|
|
13
|
+
var scroll = require('../../../utils/dom/scroll.js');
|
|
10
14
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
const __default__ = {
|
|
16
|
+
name: "ElAffix"
|
|
17
|
+
};
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: affix.affixProps,
|
|
21
|
+
emits: affix.affixEmits,
|
|
22
|
+
setup(__props, { expose, emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const COMPONENT_NAME = "ElAffix";
|
|
25
|
+
const ns = index.useNamespace("affix");
|
|
26
|
+
const target = vue.shallowRef();
|
|
27
|
+
const root = vue.shallowRef();
|
|
28
|
+
const scrollContainer = vue.shallowRef();
|
|
29
|
+
const { height: windowHeight } = core.useWindowSize();
|
|
30
|
+
const {
|
|
31
|
+
height: rootHeight,
|
|
32
|
+
width: rootWidth,
|
|
33
|
+
top: rootTop,
|
|
34
|
+
bottom: rootBottom,
|
|
35
|
+
update: updateRoot
|
|
36
|
+
} = core.useElementBounding(root);
|
|
37
|
+
const targetRect = core.useElementBounding(target);
|
|
38
|
+
const fixed = vue.ref(false);
|
|
39
|
+
const scrollTop = vue.ref(0);
|
|
40
|
+
const transform = vue.ref(0);
|
|
41
|
+
const rootStyle = vue.computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
44
|
+
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const affixStyle = vue.computed(() => {
|
|
48
|
+
if (!fixed.value)
|
|
49
|
+
return {};
|
|
50
|
+
const offset = props.offset ? `${props.offset}px` : 0;
|
|
51
|
+
return {
|
|
52
|
+
height: `${rootHeight.value}px`,
|
|
53
|
+
width: `${rootWidth.value}px`,
|
|
54
|
+
top: props.position === "top" ? offset : "",
|
|
55
|
+
bottom: props.position === "bottom" ? offset : "",
|
|
56
|
+
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
57
|
+
zIndex: props.zIndex
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
const update = () => {
|
|
61
|
+
if (!scrollContainer.value)
|
|
62
|
+
return;
|
|
63
|
+
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
64
|
+
if (props.position === "top") {
|
|
65
|
+
if (props.target) {
|
|
66
|
+
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
67
|
+
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
68
|
+
transform.value = difference < 0 ? difference : 0;
|
|
69
|
+
} else {
|
|
70
|
+
fixed.value = props.offset > rootTop.value;
|
|
71
|
+
}
|
|
72
|
+
} else if (props.target) {
|
|
73
|
+
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
74
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
75
|
+
transform.value = difference < 0 ? -difference : 0;
|
|
76
|
+
} else {
|
|
77
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const handleScroll = () => {
|
|
81
|
+
emit("scroll", {
|
|
82
|
+
scrollTop: scrollTop.value,
|
|
83
|
+
fixed: fixed.value
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
vue.watch(fixed, (val) => emit("change", val));
|
|
87
|
+
vue.onMounted(() => {
|
|
88
|
+
var _a;
|
|
89
|
+
if (props.target) {
|
|
90
|
+
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
91
|
+
if (!target.value)
|
|
92
|
+
error.throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
93
|
+
} else {
|
|
94
|
+
target.value = document.documentElement;
|
|
95
|
+
}
|
|
96
|
+
scrollContainer.value = scroll.getScrollContainer(root.value, true);
|
|
97
|
+
updateRoot();
|
|
98
|
+
});
|
|
99
|
+
core.useEventListener(scrollContainer, "scroll", handleScroll);
|
|
100
|
+
vue.watchEffect(update);
|
|
101
|
+
expose({
|
|
102
|
+
update
|
|
103
|
+
});
|
|
104
|
+
return (_ctx, _cache) => {
|
|
105
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
106
|
+
ref_key: "root",
|
|
107
|
+
ref: root,
|
|
108
|
+
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
109
|
+
style: vue.normalizeStyle(vue.unref(rootStyle))
|
|
110
|
+
}, [
|
|
111
|
+
vue.createElementVNode("div", {
|
|
112
|
+
class: vue.normalizeClass({ [vue.unref(ns).m("fixed")]: fixed.value }),
|
|
113
|
+
style: vue.normalizeStyle(vue.unref(affixStyle))
|
|
114
|
+
}, [
|
|
115
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
116
|
+
], 6)
|
|
117
|
+
], 6);
|
|
118
|
+
};
|
|
28
119
|
}
|
|
29
120
|
});
|
|
30
|
-
|
|
31
|
-
scroll: ({ scrollTop, fixed }) => core.isNumber(scrollTop) && core.isBoolean(fixed),
|
|
32
|
-
[event.CHANGE_EVENT]: (fixed) => core.isBoolean(fixed)
|
|
33
|
-
};
|
|
121
|
+
var Affix = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/affix/src/affix.vue"]]);
|
|
34
122
|
|
|
35
|
-
exports
|
|
36
|
-
exports.affixProps = affixProps;
|
|
123
|
+
exports["default"] = Affix;
|
|
37
124
|
//# sourceMappingURL=affix2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: 'ElAffix',\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root)\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? `${props.offset}px` : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n if (props.position === 'top') {\n if (props.target) {\n const difference =\n targetRect.bottom.value - props.offset - rootHeight.value\n fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootTop.value\n }\n } else if (props.target) {\n const difference =\n windowHeight.value -\n targetRect.top.value -\n props.offset -\n rootHeight.value\n fixed.value =\n windowHeight.value - props.offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - props.offset < rootBottom.value\n }\n}\n\nconst handleScroll = () => {\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit('change', val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n})\n</script>\n"],"names":["useNamespace","shallowRef","useWindowSize","useElementBounding","ref","computed","watch","onMounted","throwError","getScrollContainer","useEventListener","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,cAAA,GAAA,SAAA,CAAA;AAQA,IAAA,MAAA,EAAA,GAAAA,mBAAA,OAAA,CAAA,CAAA;AAEA,IAAA,MAAA,SAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAAA,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,kBAAAA,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,EAAA,MAAA,EAAA,YAAA,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