@jetlinks-web/components 3.1.2 → 3.1.3
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/es/Search/Item.js +2 -2
- package/es/Search/hooks/useRouteQuery.js +17 -0
- package/lib/Search/Item.js +2 -2
- package/lib/Search/hooks/useRouteQuery.js +17 -0
- package/package.json +170 -170
package/es/Search/Item.js
CHANGED
|
@@ -194,14 +194,14 @@ const __sfc_main__ = _defineComponent({
|
|
|
194
194
|
const isBtw = ['in', 'nin'].includes(termsModel.termType);
|
|
195
195
|
if (targetComponents.value.type === componentType.treeSelect) {
|
|
196
196
|
targetComponents.value.props = {
|
|
197
|
+
multiple: isBtw,
|
|
197
198
|
...targetComponents.value.props,
|
|
198
|
-
multiple: isBtw
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
else if (targetComponents.value.type === componentType.select) {
|
|
202
202
|
targetComponents.value.props = {
|
|
203
|
+
mode: isBtw ? 'multiple' : 'combobox',
|
|
203
204
|
...targetComponents.value.props,
|
|
204
|
-
mode: isBtw ? 'multiple' : 'combobox'
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
}, { immediate: true });
|
|
@@ -11,6 +11,23 @@ export var useRouteQuery = function useRouteQuery(name) {
|
|
|
11
11
|
var transformSet = function transformSet(value) {
|
|
12
12
|
return value;
|
|
13
13
|
};
|
|
14
|
+
// 在storybook环境中,router可能为undefined或null,需要进行类型检查
|
|
15
|
+
if (!router || !route) {
|
|
16
|
+
// 返回一个模拟的ref,避免在storybook中报错
|
|
17
|
+
return customRef(function (track, trigger) {
|
|
18
|
+
var value = undefined;
|
|
19
|
+
return {
|
|
20
|
+
get: function get() {
|
|
21
|
+
track();
|
|
22
|
+
return transformGet(value);
|
|
23
|
+
},
|
|
24
|
+
set: function set(v) {
|
|
25
|
+
value = transformSet(v);
|
|
26
|
+
trigger();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
14
31
|
if (!_queue.has(router)) _queue.set(router, new Map());
|
|
15
32
|
var _queriesQueue = _queue.get(router);
|
|
16
33
|
var query = route.query[name];
|
package/lib/Search/Item.js
CHANGED
|
@@ -194,14 +194,14 @@ const __sfc_main__ = _defineComponent({
|
|
|
194
194
|
const isBtw = ['in', 'nin'].includes(termsModel.termType);
|
|
195
195
|
if (targetComponents.value.type === componentType.treeSelect) {
|
|
196
196
|
targetComponents.value.props = {
|
|
197
|
+
multiple: isBtw,
|
|
197
198
|
...targetComponents.value.props,
|
|
198
|
-
multiple: isBtw
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
else if (targetComponents.value.type === componentType.select) {
|
|
202
202
|
targetComponents.value.props = {
|
|
203
|
+
mode: isBtw ? 'multiple' : 'combobox',
|
|
203
204
|
...targetComponents.value.props,
|
|
204
|
-
mode: isBtw ? 'multiple' : 'combobox'
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
}, { immediate: true });
|
|
@@ -18,6 +18,23 @@ var useRouteQuery = exports.useRouteQuery = function useRouteQuery(name) {
|
|
|
18
18
|
var transformSet = function transformSet(value) {
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
|
+
// 在storybook环境中,router可能为undefined或null,需要进行类型检查
|
|
22
|
+
if (!router || !route) {
|
|
23
|
+
// 返回一个模拟的ref,避免在storybook中报错
|
|
24
|
+
return (0, _vue.customRef)(function (track, trigger) {
|
|
25
|
+
var value = undefined;
|
|
26
|
+
return {
|
|
27
|
+
get: function get() {
|
|
28
|
+
track();
|
|
29
|
+
return transformGet(value);
|
|
30
|
+
},
|
|
31
|
+
set: function set(v) {
|
|
32
|
+
value = transformSet(v);
|
|
33
|
+
trigger();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
21
38
|
if (!_queue.has(router)) _queue.set(router, new Map());
|
|
22
39
|
var _queriesQueue = _queue.get(router);
|
|
23
40
|
var query = route.query[name];
|
package/package.json
CHANGED
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "3.1.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "es/index.js",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"jetlinks"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"markdown-it": "^
|
|
32
|
-
"markdown-it-
|
|
33
|
-
"markdown-it-
|
|
34
|
-
"markdown-it-
|
|
35
|
-
"markdown-it-
|
|
36
|
-
"markdown-it-
|
|
37
|
-
"markdown-it-
|
|
38
|
-
"markdown-it-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"@
|
|
48
|
-
"@babel/
|
|
49
|
-
"@babel/
|
|
50
|
-
"@babel/plugin-
|
|
51
|
-
"@babel/plugin-
|
|
52
|
-
"@babel/plugin-
|
|
53
|
-
"@babel/plugin-
|
|
54
|
-
"@babel/plugin-
|
|
55
|
-
"@babel/plugin-
|
|
56
|
-
"@babel/plugin-transform-
|
|
57
|
-
"@babel/
|
|
58
|
-
"@babel/
|
|
59
|
-
"@babel/
|
|
60
|
-
"@babel/
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jetlinks-web/components",
|
|
3
|
+
"version": "3.1.3",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"jetlinks",
|
|
9
|
+
"jetlinks-web",
|
|
10
|
+
"components",
|
|
11
|
+
"jetlinks-web/components",
|
|
12
|
+
"@jetlinks-web",
|
|
13
|
+
"@jetlinks-web/components"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
"lib",
|
|
17
|
+
"es"
|
|
18
|
+
],
|
|
19
|
+
"private": false,
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@vueuse/core": "^10.2.1",
|
|
24
|
+
"@vueuse/router": "^12.1.0",
|
|
25
|
+
"async-validator": "^4.2.5",
|
|
26
|
+
"markdown-it": "^14.1.0",
|
|
27
|
+
"markdown-it-abbr": "^2.0.0",
|
|
28
|
+
"markdown-it-anchor": "^9.1.0",
|
|
29
|
+
"markdown-it-deflist": "^3.0.0",
|
|
30
|
+
"markdown-it-emoji": "^3.0.0",
|
|
31
|
+
"markdown-it-footnote": "^4.0.0",
|
|
32
|
+
"markdown-it-highlightjs": "^4.1.0",
|
|
33
|
+
"markdown-it-ins": "^4.0.0",
|
|
34
|
+
"markdown-it-mark": "^4.0.0",
|
|
35
|
+
"markdown-it-sub": "^2.0.0",
|
|
36
|
+
"markdown-it-sup": "^2.0.0",
|
|
37
|
+
"markdown-it-task-lists": "^2.1.1",
|
|
38
|
+
"markdown-it-toc-done-right": "^4.2.0",
|
|
39
|
+
"resize-observer-polyfill": "^1.5.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@ant-design/icons-vue": "^7.0.1",
|
|
43
|
+
"@babel/cli": "^7.8.4",
|
|
44
|
+
"@babel/core": "^7.10.5",
|
|
45
|
+
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
|
46
|
+
"@babel/plugin-proposal-export-default-from": "^7.8.3",
|
|
47
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.12.1",
|
|
48
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
|
|
49
|
+
"@babel/plugin-proposal-optional-chaining": "^7.10.1",
|
|
50
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
51
|
+
"@babel/plugin-transform-member-expression-literals": "^7.8.3",
|
|
52
|
+
"@babel/plugin-transform-object-assign": "^7.8.3",
|
|
53
|
+
"@babel/plugin-transform-property-literals": "^7.8.3",
|
|
54
|
+
"@babel/plugin-transform-runtime": "^7.10.5",
|
|
55
|
+
"@babel/plugin-transform-template-literals": "^7.8.3",
|
|
56
|
+
"@babel/plugin-transform-typescript": "^7.12.1",
|
|
57
|
+
"@babel/polyfill": "^7.8.7",
|
|
58
|
+
"@babel/preset-env": "^7.9.6",
|
|
59
|
+
"@babel/preset-typescript": "^7.10.4",
|
|
60
|
+
"@babel/runtime": "^7.24.4",
|
|
61
|
+
"@commitlint/cli": "^17.4.2",
|
|
62
|
+
"@commitlint/config-conventional": "^17.4.2",
|
|
63
|
+
"@rollup/plugin-commonjs": "^22.0.1",
|
|
64
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
65
|
+
"@types/eslint": "^8.21.0",
|
|
66
|
+
"@types/lodash-es": "^4.17.6",
|
|
67
|
+
"@types/node": "^18.13.0",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.50.0",
|
|
70
|
+
"@vitejs/plugin-vue": "^2.3.3",
|
|
71
|
+
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
|
72
|
+
"@vue/babel-plugin-jsx": "^1.0.0",
|
|
73
|
+
"@vue/compiler-sfc": "^3.4.21",
|
|
74
|
+
"ant-design-vue": "^4.0.0",
|
|
75
|
+
"autoprefixer": "^10.2.0",
|
|
76
|
+
"babel-eslint": "^10.0.1",
|
|
77
|
+
"babel-loader": "^8.0.0",
|
|
78
|
+
"babel-plugin-import": "^1.1.1",
|
|
79
|
+
"babel-plugin-inline-import-data-uri": "^1.0.1",
|
|
80
|
+
"babel-plugin-istanbul": "^6.0.0",
|
|
81
|
+
"babel-plugin-transform-require-context": "^0.1.1",
|
|
82
|
+
"case-sensitive-paths-webpack-plugin": "^2.1.2",
|
|
83
|
+
"child_process": "^1.0.2",
|
|
84
|
+
"colorful": "^2.1.0",
|
|
85
|
+
"commander": "^6.1.0",
|
|
86
|
+
"commitlint": "^17.4.2",
|
|
87
|
+
"compute-scroll-into-view": "^3.0.0",
|
|
88
|
+
"css-loader": "^6.7.3",
|
|
89
|
+
"css-minimizer-webpack-plugin": "^3.0.0",
|
|
90
|
+
"dayjs": "^1.11.8",
|
|
91
|
+
"duplicate-package-checker-webpack-plugin": "^3.0.0",
|
|
92
|
+
"esbuild": "~0.12.29",
|
|
93
|
+
"esbuild-loader": "^2.18.0",
|
|
94
|
+
"escape-html": "^1.0.3",
|
|
95
|
+
"eslint": "^8.33.0",
|
|
96
|
+
"eslint-config-prettier": "^8.0.0",
|
|
97
|
+
"eslint-plugin-html": "^6.0.0",
|
|
98
|
+
"eslint-plugin-import": "^2.24.2",
|
|
99
|
+
"eslint-plugin-markdown": "^2.0.0",
|
|
100
|
+
"eslint-plugin-vue": "^8.1.1",
|
|
101
|
+
"fast-glob": "^3.2.12",
|
|
102
|
+
"glob": "^11.0.3",
|
|
103
|
+
"globby": "^11.1.0",
|
|
104
|
+
"gray-matter": "^4.0.3",
|
|
105
|
+
"gulp": "^4.0.2",
|
|
106
|
+
"gulp-babel": "^8.0.0",
|
|
107
|
+
"gulp-strip-code": "^0.1.4",
|
|
108
|
+
"gulp-typescript": "^6.0.0-alpha.1",
|
|
109
|
+
"is-windows": "^1.0.2",
|
|
110
|
+
"json5": "^2.2.3",
|
|
111
|
+
"less": "^4.1.3",
|
|
112
|
+
"less-loader": "^11.1.0",
|
|
113
|
+
"less-plugin-npm-import": "^2.1.0",
|
|
114
|
+
"less-vars-to-js": "^1.3.0",
|
|
115
|
+
"lint-staged": "^13.1.0",
|
|
116
|
+
"lru-cache": "^7.14.1",
|
|
117
|
+
"marked": "0.3.18",
|
|
118
|
+
"merge2": "^1.4.1",
|
|
119
|
+
"mini-css-extract-plugin": "^2.4.5",
|
|
120
|
+
"minimist": "^1.2.0",
|
|
121
|
+
"mkdirp": "^0.5.1",
|
|
122
|
+
"object-assign": "^4.1.1",
|
|
123
|
+
"postcss": "^8.2.12",
|
|
124
|
+
"postcss-loader": "^6.0.0",
|
|
125
|
+
"prettier": "^2.8.3",
|
|
126
|
+
"prismjs": "^1.29.0",
|
|
127
|
+
"remove-files-webpack-plugin": "^1.5.0",
|
|
128
|
+
"rollup-plugin-esbuild": "^4.9.1",
|
|
129
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
130
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
131
|
+
"slash": "^3.0.0",
|
|
132
|
+
"string-replace-loader": "^3.1.0",
|
|
133
|
+
"style-loader": "^3.3.1",
|
|
134
|
+
"sucrase": "^3.29.0",
|
|
135
|
+
"terser-webpack-plugin": "^5.1.1",
|
|
136
|
+
"through2": "^4.0.2",
|
|
137
|
+
"ts-loader": "^9.1.0",
|
|
138
|
+
"ts-morph": "^17.0.1",
|
|
139
|
+
"typescript": "^4.9.3",
|
|
140
|
+
"unplugin-vue-macros": "^0.11.2",
|
|
141
|
+
"unplugin-vue-setup-extend": "^0.3.5",
|
|
142
|
+
"url": "^0.11.0",
|
|
143
|
+
"url-loader": "^3.0.0",
|
|
144
|
+
"vite": "^4.0.0",
|
|
145
|
+
"vite-plugin-vue-setup-extend": "^0.4.0",
|
|
146
|
+
"vue": "^3.2.45",
|
|
147
|
+
"vue-loader": "^17.4.2",
|
|
148
|
+
"vue-eslint-parser": "^9.1.0",
|
|
149
|
+
"vue-router": "4",
|
|
150
|
+
"vue-tsc": "^1.0.11",
|
|
151
|
+
"webpack": "^5.75.0",
|
|
152
|
+
"webpack-bundle-analyzer": "^4.4.2",
|
|
153
|
+
"webpack-cli": "^4.6.0",
|
|
154
|
+
"webpack-dev-server": "^4.0.0",
|
|
155
|
+
"webpack-merge": "^5.0.0",
|
|
156
|
+
"webpackbar": "^5.0.2",
|
|
157
|
+
"@jetlinks-web/utils": "^1.2.12",
|
|
158
|
+
"@jetlinks-web/constants": "^1.0.9",
|
|
159
|
+
"@jetlinks-web/hooks": "^1.1.1"
|
|
160
|
+
},
|
|
161
|
+
"publishConfig": {
|
|
162
|
+
"registry": "https://registry.npmjs.org/",
|
|
163
|
+
"access": "public"
|
|
164
|
+
},
|
|
165
|
+
"scripts": {
|
|
166
|
+
"compile": "node tools/cli/run.js compile",
|
|
167
|
+
"dist": "node --max_old_space_size=8192 tools/cli/run.js dist",
|
|
168
|
+
"clean": "pnpm rimraf node_modules && pnpm rimraf .turbo"
|
|
169
|
+
}
|
|
170
|
+
}
|