@opentinyvue/vue-cascader-node 3.24.0 → 3.25.0
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/lib/mobile-first.js +28 -6
- package/package.json +8 -8
package/lib/mobile-first.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { renderless, api } from '@opentinyvue/vue-renderless/cascader-node/vue';
|
|
2
2
|
import { defineComponent, $prefix, setup, $props } from '@opentinyvue/vue-common';
|
|
3
3
|
import { IconLoading, IconChevronRight } from '@opentinyvue/vue-icon';
|
|
4
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass,
|
|
4
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, toDisplayString, createVNode, createBlock, withCtx, createTextVNode, createCommentVNode } from 'vue';
|
|
5
5
|
|
|
6
6
|
function _createForOfIteratorHelperLoose(r, e) {
|
|
7
7
|
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -63,7 +63,16 @@ var _sfc_main = defineComponent({
|
|
|
63
63
|
name: $prefix + "CascaderNode",
|
|
64
64
|
components: {
|
|
65
65
|
IconLoading: IconLoading(),
|
|
66
|
-
IconChevronRight: IconChevronRight()
|
|
66
|
+
IconChevronRight: IconChevronRight(),
|
|
67
|
+
RenderNodeLabel: {
|
|
68
|
+
name: "AnyNode",
|
|
69
|
+
functional: true,
|
|
70
|
+
props: ["vnode"],
|
|
71
|
+
render: function render(h, ctx) {
|
|
72
|
+
var _ctx$props;
|
|
73
|
+
return h.vnode || ((_ctx$props = ctx.props) == null ? void 0 : _ctx$props.vnode);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
67
76
|
},
|
|
68
77
|
inheritAttrs: false,
|
|
69
78
|
emits: ["expand", "update:modelValue", "expand-change", "active-item-change", "change"],
|
|
@@ -86,6 +95,7 @@ var _sfc_main = defineComponent({
|
|
|
86
95
|
});
|
|
87
96
|
var _hoisted_1 = ["id"];
|
|
88
97
|
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
98
|
+
var _component_render_node_label = resolveComponent("render-node-label");
|
|
89
99
|
var _component_icon_loading = resolveComponent("icon-loading");
|
|
90
100
|
var _component_icon_chevron_right = resolveComponent("icon-chevron-right");
|
|
91
101
|
return openBlock(), createElementBlock("div", {
|
|
@@ -96,19 +106,31 @@ function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
|
96
106
|
return _ctx.handleNodeClick && _ctx.handleNodeClick.apply(_ctx, arguments);
|
|
97
107
|
}),
|
|
98
108
|
class: normalizeClass(_ctx.m(_ctx.gcls("cascader-node"), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.config.checkStrictly ? "is-selectable" : ""), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.inActivePath ? "in-active-path" : ""), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.inCheckedPath ? "in-checked-path" : ""), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.isChecked ? "in-active" : ""), _ctx.gcls(_ctx.state.isDisabled ? "cascader-node_disabled" : ""), _ctx.gcls(_ctx.state.isDisabled ? "in-active_disabled" : "")))
|
|
99
|
-
}, [
|
|
109
|
+
}, [typeof _ctx.state.nodeLabel === "string" ? (openBlock(), createElementBlock(
|
|
100
110
|
"span",
|
|
101
111
|
{
|
|
112
|
+
key: 0,
|
|
102
113
|
class: normalizeClass([_ctx.node ? _ctx.gcls("cascader-node__label_disabled") : ""])
|
|
103
114
|
},
|
|
104
115
|
toDisplayString(_ctx.state.nodeLabel),
|
|
105
116
|
3
|
|
106
117
|
/* TEXT, CLASS */
|
|
107
|
-
)
|
|
108
|
-
|
|
118
|
+
)) : (openBlock(), createElementBlock(
|
|
119
|
+
"span",
|
|
120
|
+
{
|
|
121
|
+
key: 1,
|
|
122
|
+
class: normalizeClass([_ctx.node ? _ctx.gcls("cascader-node__label_disabled") : ""])
|
|
123
|
+
},
|
|
124
|
+
[createVNode(_component_render_node_label, {
|
|
125
|
+
vnode: _ctx.state.nodeLabel
|
|
126
|
+
}, null, 8, ["vnode"])],
|
|
127
|
+
2
|
|
128
|
+
/* CLASS */
|
|
129
|
+
)), _ctx.node.loading ? (openBlock(), createBlock(_component_icon_loading, {
|
|
130
|
+
key: 2,
|
|
109
131
|
class: normalizeClass(_ctx.gcls("cascader-node__postfix"))
|
|
110
132
|
}, null, 8, ["class"])) : !_ctx.state.isLeaf ? (openBlock(), createBlock(_component_icon_chevron_right, {
|
|
111
|
-
key:
|
|
133
|
+
key: 3,
|
|
112
134
|
class: normalizeClass(_ctx.m(_ctx.gcls("cascader-node__postfix"), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.inActivePath ? "node-active" : ""), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.inCheckedPath ? "node-active" : ""), _ctx.gcls(!_ctx.state.isDisabled && _ctx.state.isChecked ? "node-active" : "")))
|
|
113
135
|
}, {
|
|
114
136
|
default: withCtx(function() {
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-cascader-node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.25.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"module": "./lib/index.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opentinyvue/utils": "~3.
|
|
12
|
-
"@opentinyvue/vue-checkbox": "~3.
|
|
13
|
-
"@opentinyvue/vue-common": "~3.
|
|
14
|
-
"@opentinyvue/vue-icon": "~3.
|
|
15
|
-
"@opentinyvue/vue-radio": "~3.
|
|
16
|
-
"@opentinyvue/vue-renderless": "~3.
|
|
17
|
-
"@opentinyvue/vue-theme": "~3.
|
|
11
|
+
"@opentinyvue/utils": "~3.25.0",
|
|
12
|
+
"@opentinyvue/vue-checkbox": "~3.25.0",
|
|
13
|
+
"@opentinyvue/vue-common": "~3.25.0",
|
|
14
|
+
"@opentinyvue/vue-icon": "~3.25.0",
|
|
15
|
+
"@opentinyvue/vue-radio": "~3.25.0",
|
|
16
|
+
"@opentinyvue/vue-renderless": "~3.25.0",
|
|
17
|
+
"@opentinyvue/vue-theme": "~3.25.0"
|
|
18
18
|
},
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"scripts": {
|