| | |
| | | const fuse = ref(undefined);
|
| | | const headerSearchSelectRef = ref(null);
|
| | | const router = useRouter();
|
| | | const routes = computed(() => usePermissionStore().routes);
|
| | | const routes = computed(() => usePermissionStore().defaultRoutes);
|
| | |
|
| | | function click() {
|
| | | show.value = !show.value
|
| | |
| | | }
|
| | | function change(val) {
|
| | | const path = val.path;
|
| | | const query = val.query;
|
| | | if (isHttp(path)) {
|
| | | // http(s):// 路径新窗口打开
|
| | | const pindex = path.indexOf("http");
|
| | | window.open(path.substr(pindex, path.length), "_blank");
|
| | | } else {
|
| | | router.push(path)
|
| | | if (query) {
|
| | | router.push({ path: path, query: JSON.parse(query) });
|
| | | } else {
|
| | | router.push(path)
|
| | | }
|
| | | }
|
| | |
|
| | | search.value = ''
|
| | |
| | | threshold: 0.4,
|
| | | location: 0,
|
| | | distance: 100,
|
| | | maxPatternLength: 32,
|
| | | minMatchCharLength: 1,
|
| | | keys: [{
|
| | | name: 'title',
|
| | |
| | | res.push(data)
|
| | | }
|
| | | }
|
| | | if (r.query) {
|
| | | data.query = r.query
|
| | | }
|
| | |
|
| | | // recursive child routes
|
| | | if (r.children) {
|