mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
ui: optimize bundle
This commit is contained in:
1 parent
9c02ed4dd8
commit
5ae8258b8a
28 files changed
+57
-179
No files matched your search
@@ -1,6 +0,0 @@
|
||||
export default function cloneAttributes(from, to) {
|
||||
const attributes = from.prop('attributes');
|
||||
$.each(attributes, function () {
|
||||
to.attr(this.name, this.value);
|
||||
});
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
export default function parseQueryString(str) {
|
||||
const obj = {};
|
||||
(str || document.location.search)
|
||||
.replace(/(^\?)/, '')
|
||||
.split('&')
|
||||
.forEach((n) => {
|
||||
const [key, value] = n.split('=').map((v) => decodeURIComponent(v));
|
||||
obj[key] = value;
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
window.Hydro.utils.parseQueryString = parseQueryString;
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import $ from 'jquery';
|
||||
import { nanoid } from 'nanoid';
|
||||
import NProgress from 'nprogress';
|
||||
import Notification from 'vj/components/notification';
|
||||
import NProgress from 'vj/components/nprogress';
|
||||
import request from 'vj/utils/request';
|
||||
|
||||
const pjax = {};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
type Substitution = string | { templateRaw: true, html: string };
|
||||
type Substitution = string | number | { templateRaw: true, html: string };
|
||||
|
||||
export default function tpl(pieces: TemplateStringsArray, ...substitutions: Substitution[]) {
|
||||
let result = pieces[0];
|
||||
|
||||
Reference in new issue
Block a user