Skip to content

Commit

Permalink
Deploying to main from @ hellof2e/quark-design@f12f458 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanqi9675 committed Mar 18, 2024
1 parent 53a91f9 commit 400f6ec
Show file tree
Hide file tree
Showing 124 changed files with 58,078 additions and 3 deletions.
1 change: 1 addition & 0 deletions demo/assets/component-legacy.8af3f4c3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions demo/assets/component.4cce7b21.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { L as Locale, d as defineComponent } from "./mobile.500c689d.js";
const isFunction = (val) => typeof val === "function";
const getPropByPath = (obj, keyPath) => {
try {
return keyPath.split(".").reduce((prev, curr) => prev[curr], obj);
} catch (error) {
return "";
}
};
function createComponent(name) {
const componentName = "quark-" + name;
return {
componentName,
translate(keyPath, ...args) {
const languages = Locale.languages();
const text = getPropByPath(languages, `${name.replace("-", "")}.${keyPath}`) || getPropByPath(languages, keyPath);
return isFunction(text) ? text(...args) : text;
},
createDemo: function(_component) {
_component.baseName = name;
_component.name = "demo-" + name;
return defineComponent(_component);
}
};
}
export { createComponent as c };
1 change: 1 addition & 0 deletions demo/assets/demo-legacy.06c298cc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions demo/assets/demo-legacy.0acbab17.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 400f6ec

Please sign in to comment.