@fmdeui/fmui 1.0.31 → 1.0.33
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/components/fm-layout/index.d.ts +5 -0
- package/es/components/fm-layout/src/index.vue.d.ts +2 -0
- package/es/components/fm-layout/src/navBars/topBar/user.vue.d.ts +0 -28
- package/{lib/defaults.css → es/index.css} +2 -2
- package/es/packages/components/fm-layout/src/index.vue2.mjs +3 -1
- package/es/packages/components/fm-layout/src/navBars/topBar/user.vue2.mjs +4 -13
- package/index.js +138 -262
- package/index.min.js +4 -4
- package/index.min.mjs +4 -4
- package/index.mjs +135 -259
- package/lib/components/fm-layout/index.d.ts +5 -0
- package/lib/components/fm-layout/src/index.vue.d.ts +2 -0
- package/lib/components/fm-layout/src/navBars/topBar/user.vue.d.ts +0 -28
- package/lib/packages/components/fm-layout/src/index.vue2.js +3 -1
- package/lib/packages/components/fm-layout/src/navBars/topBar/user.vue2.js +4 -13
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/f-layout.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/layout.scss +0 -25
- package/es/components/fm-layout/src/navBars/topBar/search.vue.d.ts +0 -7
- package/es/packages/components/fm-layout/src/navBars/topBar/search.vue.mjs +0 -5
- package/es/packages/components/fm-layout/src/navBars/topBar/search.vue2.mjs +0 -120
- package/lib/components/fm-layout/src/navBars/topBar/search.vue.d.ts +0 -7
- package/lib/packages/components/fm-layout/src/navBars/topBar/search.vue.js +0 -9
- package/lib/packages/components/fm-layout/src/navBars/topBar/search.vue2.js +0 -124
- /package/{es → lib}/version.css +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, nextTick } from 'vue';
|
|
2
|
-
import { useRouter } from 'vue-router';
|
|
3
|
-
import { useI18n } from 'vue-i18n';
|
|
4
|
-
import { storeToRefs } from 'pinia';
|
|
5
|
-
import '../../../../../stores/index.mjs';
|
|
6
|
-
import { useTagsViewRoutes } from '../../../../../stores/tagsViewRoutes.mjs';
|
|
7
|
-
|
|
8
|
-
const _hoisted_1 = { class: "layout-search-dialog" };
|
|
9
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
-
__name: "search",
|
|
11
|
-
setup(__props, { expose: __expose }) {
|
|
12
|
-
const storesTagsViewRoutes = useTagsViewRoutes();
|
|
13
|
-
const { tagsViewRoutes } = storeToRefs(storesTagsViewRoutes);
|
|
14
|
-
const layoutMenuAutocompleteRef = ref();
|
|
15
|
-
const { t } = useI18n();
|
|
16
|
-
const router = useRouter();
|
|
17
|
-
const state = reactive({
|
|
18
|
-
isShowSearch: false,
|
|
19
|
-
menuQuery: "",
|
|
20
|
-
tagsViewList: []
|
|
21
|
-
});
|
|
22
|
-
const openSearch = () => {
|
|
23
|
-
state.menuQuery = "";
|
|
24
|
-
state.isShowSearch = true;
|
|
25
|
-
initTageView();
|
|
26
|
-
nextTick(() => {
|
|
27
|
-
setTimeout(() => {
|
|
28
|
-
layoutMenuAutocompleteRef.value.focus();
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
const closeSearch = () => {
|
|
33
|
-
state.isShowSearch = false;
|
|
34
|
-
};
|
|
35
|
-
const menuSearch = (queryString, cb) => {
|
|
36
|
-
let results = queryString ? state.tagsViewList.filter(createFilter(queryString)) : state.tagsViewList;
|
|
37
|
-
cb(results);
|
|
38
|
-
};
|
|
39
|
-
const createFilter = (queryString) => {
|
|
40
|
-
return (restaurant) => {
|
|
41
|
-
return restaurant.path.toLowerCase().indexOf(queryString.toLowerCase()) > -1 || restaurant.meta.title.toLowerCase().indexOf(queryString.toLowerCase()) > -1 || t(restaurant.meta.title).indexOf(queryString.toLowerCase()) > -1;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
const initTageView = () => {
|
|
45
|
-
if (state.tagsViewList.length > 0) return false;
|
|
46
|
-
tagsViewRoutes.value.map((v) => {
|
|
47
|
-
var _a;
|
|
48
|
-
if (!((_a = v.meta) == null ? void 0 : _a.isHide) && v.type !== 1) state.tagsViewList.push({ ...v });
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
const onHandleSelect = (item) => {
|
|
52
|
-
var _a, _b, _c;
|
|
53
|
-
let { path, redirect } = item;
|
|
54
|
-
if (((_a = item.meta) == null ? void 0 : _a.isLink) && !((_b = item.meta) == null ? void 0 : _b.isIframe)) window.open((_c = item.meta) == null ? void 0 : _c.isLink);
|
|
55
|
-
else if (redirect) router.push(redirect);
|
|
56
|
-
else router.push(path);
|
|
57
|
-
closeSearch();
|
|
58
|
-
};
|
|
59
|
-
__expose({
|
|
60
|
-
openSearch
|
|
61
|
-
});
|
|
62
|
-
return (_ctx, _cache) => {
|
|
63
|
-
const _component_ele_Search = resolveComponent("ele-Search");
|
|
64
|
-
const _component_el_icon = resolveComponent("el-icon");
|
|
65
|
-
const _component_SvgIcon = resolveComponent("SvgIcon");
|
|
66
|
-
const _component_el_autocomplete = resolveComponent("el-autocomplete");
|
|
67
|
-
const _component_el_dialog = resolveComponent("el-dialog");
|
|
68
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
69
|
-
createVNode(_component_el_dialog, {
|
|
70
|
-
modelValue: state.isShowSearch,
|
|
71
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.isShowSearch = $event),
|
|
72
|
-
"destroy-on-close": "",
|
|
73
|
-
"show-close": false
|
|
74
|
-
}, {
|
|
75
|
-
footer: withCtx(() => [
|
|
76
|
-
createVNode(_component_el_autocomplete, {
|
|
77
|
-
modelValue: state.menuQuery,
|
|
78
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.menuQuery = $event),
|
|
79
|
-
"fetch-suggestions": menuSearch,
|
|
80
|
-
placeholder: _ctx.$t("message.user.searchPlaceholder"),
|
|
81
|
-
ref_key: "layoutMenuAutocompleteRef",
|
|
82
|
-
ref: layoutMenuAutocompleteRef,
|
|
83
|
-
onSelect: onHandleSelect,
|
|
84
|
-
"fit-input-width": true
|
|
85
|
-
}, {
|
|
86
|
-
prefix: withCtx(() => [
|
|
87
|
-
createVNode(_component_el_icon, { class: "el-input__icon" }, {
|
|
88
|
-
default: withCtx(() => [
|
|
89
|
-
createVNode(_component_ele_Search)
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
/* STABLE */
|
|
93
|
-
})
|
|
94
|
-
]),
|
|
95
|
-
default: withCtx(({ item }) => [
|
|
96
|
-
createElementVNode("div", null, [
|
|
97
|
-
createVNode(_component_SvgIcon, {
|
|
98
|
-
name: item.meta.icon,
|
|
99
|
-
class: "mr5"
|
|
100
|
-
}, null, 8, ["name"]),
|
|
101
|
-
createTextVNode(
|
|
102
|
-
" " + toDisplayString(_ctx.$t(item.meta.title)),
|
|
103
|
-
1
|
|
104
|
-
/* TEXT */
|
|
105
|
-
)
|
|
106
|
-
])
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
/* STABLE */
|
|
110
|
-
}, 8, ["modelValue", "placeholder"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
/* STABLE */
|
|
114
|
-
}, 8, ["modelValue"])
|
|
115
|
-
]);
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
export { _sfc_main as default };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare const _default: DefineComponent<{}, {
|
|
3
|
-
openSearch: () => void;
|
|
4
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
5
|
-
layoutMenuAutocompleteRef: unknown;
|
|
6
|
-
}, HTMLDivElement>;
|
|
7
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var search_vue_vue_type_script_setup_true_name_layoutBreadcrumbSearch_lang = require('./search.vue2.js');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.default = search_vue_vue_type_script_setup_true_name_layoutBreadcrumbSearch_lang.default;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vueRouter = require('vue-router');
|
|
7
|
-
var vueI18n = require('vue-i18n');
|
|
8
|
-
var pinia = require('pinia');
|
|
9
|
-
require('../../../../../stores/index.js');
|
|
10
|
-
var tagsViewRoutes = require('../../../../../stores/tagsViewRoutes.js');
|
|
11
|
-
|
|
12
|
-
const _hoisted_1 = { class: "layout-search-dialog" };
|
|
13
|
-
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
-
__name: "search",
|
|
15
|
-
setup(__props, { expose: __expose }) {
|
|
16
|
-
const storesTagsViewRoutes = tagsViewRoutes.useTagsViewRoutes();
|
|
17
|
-
const { tagsViewRoutes: tagsViewRoutes$1 } = pinia.storeToRefs(storesTagsViewRoutes);
|
|
18
|
-
const layoutMenuAutocompleteRef = vue.ref();
|
|
19
|
-
const { t } = vueI18n.useI18n();
|
|
20
|
-
const router = vueRouter.useRouter();
|
|
21
|
-
const state = vue.reactive({
|
|
22
|
-
isShowSearch: false,
|
|
23
|
-
menuQuery: "",
|
|
24
|
-
tagsViewList: []
|
|
25
|
-
});
|
|
26
|
-
const openSearch = () => {
|
|
27
|
-
state.menuQuery = "";
|
|
28
|
-
state.isShowSearch = true;
|
|
29
|
-
initTageView();
|
|
30
|
-
vue.nextTick(() => {
|
|
31
|
-
setTimeout(() => {
|
|
32
|
-
layoutMenuAutocompleteRef.value.focus();
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
const closeSearch = () => {
|
|
37
|
-
state.isShowSearch = false;
|
|
38
|
-
};
|
|
39
|
-
const menuSearch = (queryString, cb) => {
|
|
40
|
-
let results = queryString ? state.tagsViewList.filter(createFilter(queryString)) : state.tagsViewList;
|
|
41
|
-
cb(results);
|
|
42
|
-
};
|
|
43
|
-
const createFilter = (queryString) => {
|
|
44
|
-
return (restaurant) => {
|
|
45
|
-
return restaurant.path.toLowerCase().indexOf(queryString.toLowerCase()) > -1 || restaurant.meta.title.toLowerCase().indexOf(queryString.toLowerCase()) > -1 || t(restaurant.meta.title).indexOf(queryString.toLowerCase()) > -1;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
const initTageView = () => {
|
|
49
|
-
if (state.tagsViewList.length > 0) return false;
|
|
50
|
-
tagsViewRoutes$1.value.map((v) => {
|
|
51
|
-
var _a;
|
|
52
|
-
if (!((_a = v.meta) == null ? void 0 : _a.isHide) && v.type !== 1) state.tagsViewList.push({ ...v });
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
const onHandleSelect = (item) => {
|
|
56
|
-
var _a, _b, _c;
|
|
57
|
-
let { path, redirect } = item;
|
|
58
|
-
if (((_a = item.meta) == null ? void 0 : _a.isLink) && !((_b = item.meta) == null ? void 0 : _b.isIframe)) window.open((_c = item.meta) == null ? void 0 : _c.isLink);
|
|
59
|
-
else if (redirect) router.push(redirect);
|
|
60
|
-
else router.push(path);
|
|
61
|
-
closeSearch();
|
|
62
|
-
};
|
|
63
|
-
__expose({
|
|
64
|
-
openSearch
|
|
65
|
-
});
|
|
66
|
-
return (_ctx, _cache) => {
|
|
67
|
-
const _component_ele_Search = vue.resolveComponent("ele-Search");
|
|
68
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
69
|
-
const _component_SvgIcon = vue.resolveComponent("SvgIcon");
|
|
70
|
-
const _component_el_autocomplete = vue.resolveComponent("el-autocomplete");
|
|
71
|
-
const _component_el_dialog = vue.resolveComponent("el-dialog");
|
|
72
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
73
|
-
vue.createVNode(_component_el_dialog, {
|
|
74
|
-
modelValue: state.isShowSearch,
|
|
75
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.isShowSearch = $event),
|
|
76
|
-
"destroy-on-close": "",
|
|
77
|
-
"show-close": false
|
|
78
|
-
}, {
|
|
79
|
-
footer: vue.withCtx(() => [
|
|
80
|
-
vue.createVNode(_component_el_autocomplete, {
|
|
81
|
-
modelValue: state.menuQuery,
|
|
82
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.menuQuery = $event),
|
|
83
|
-
"fetch-suggestions": menuSearch,
|
|
84
|
-
placeholder: _ctx.$t("message.user.searchPlaceholder"),
|
|
85
|
-
ref_key: "layoutMenuAutocompleteRef",
|
|
86
|
-
ref: layoutMenuAutocompleteRef,
|
|
87
|
-
onSelect: onHandleSelect,
|
|
88
|
-
"fit-input-width": true
|
|
89
|
-
}, {
|
|
90
|
-
prefix: vue.withCtx(() => [
|
|
91
|
-
vue.createVNode(_component_el_icon, { class: "el-input__icon" }, {
|
|
92
|
-
default: vue.withCtx(() => [
|
|
93
|
-
vue.createVNode(_component_ele_Search)
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
/* STABLE */
|
|
97
|
-
})
|
|
98
|
-
]),
|
|
99
|
-
default: vue.withCtx(({ item }) => [
|
|
100
|
-
vue.createElementVNode("div", null, [
|
|
101
|
-
vue.createVNode(_component_SvgIcon, {
|
|
102
|
-
name: item.meta.icon,
|
|
103
|
-
class: "mr5"
|
|
104
|
-
}, null, 8, ["name"]),
|
|
105
|
-
vue.createTextVNode(
|
|
106
|
-
" " + vue.toDisplayString(_ctx.$t(item.meta.title)),
|
|
107
|
-
1
|
|
108
|
-
/* TEXT */
|
|
109
|
-
)
|
|
110
|
-
])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
/* STABLE */
|
|
114
|
-
}, 8, ["modelValue", "placeholder"])
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
/* STABLE */
|
|
118
|
-
}, 8, ["modelValue"])
|
|
119
|
-
]);
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
exports.default = _sfc_main;
|
/package/{es → lib}/version.css
RENAMED
|
File without changes
|