@fangzhongya/fang-ui 0.0.18 → 0.0.19
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/dist/components/cs-i18n/src/index.cjs +4 -8
- package/dist/components/cs-i18n/src/index.js +3 -7
- package/dist/components/cs-i18n/src/index.vue +2 -6
- package/dist/components/index.scss +2 -2
- package/dist/components/pagin/src/index.cjs +1 -1
- package/dist/components/pagin/src/index.js +1 -1
- package/dist/components/pagin/src/index.vue +2 -2
- package/dist/hooks/global-config/index.cjs +1 -1
- package/dist/hooks/global-config/index.d.ts +4 -1
- package/dist/hooks/global-config/index.js +1 -1
- package/dist/hooks/global-config/index.ts +20 -9
- package/dist/index.css +79 -0
- package/package.json +5 -5
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const data = require("./data.cjs");
|
|
5
|
-
const index$
|
|
5
|
+
const index$1 = require("../../../locale/index.cjs");
|
|
6
6
|
require("@fangzhongya/utils/basic/string/splitUpper");
|
|
7
7
|
require("@fangzhongya/utils/basic/array/isArray");
|
|
8
8
|
require("@fangzhongya/utils/basic/object/isObject");
|
|
@@ -15,7 +15,7 @@ require("@fangzhongya/utils/name/humpToLine");
|
|
|
15
15
|
require("@fangzhongya/utils/basic/object/deepCopy");
|
|
16
16
|
require("@fangzhongya/utils/basic/Array/toggleArray");
|
|
17
17
|
require("@fangzhongya/utils/basic/object/objValue");
|
|
18
|
-
const index$
|
|
18
|
+
const index$2 = require("../../../hooks/global-config/index.cjs");
|
|
19
19
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
20
20
|
const _hoisted_1 = ["onClick"];
|
|
21
21
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -23,16 +23,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
23
|
props: data.dataProps,
|
|
24
24
|
setup(__props) {
|
|
25
25
|
const cs = index.useCssName("cs-i18n");
|
|
26
|
-
const
|
|
27
|
-
const objconfig = vue.unref(config) || {};
|
|
28
|
-
const comlocales = index$2;
|
|
26
|
+
const comlocales = index$1;
|
|
29
27
|
const props = __props;
|
|
30
28
|
const list = Object.entries(comlocales.Common.value);
|
|
31
29
|
function onClick(item) {
|
|
32
30
|
const mc = lineToLargeHump.lineToLargeHump(item[0]);
|
|
33
|
-
|
|
34
|
-
objconfig.cssname = item[0];
|
|
35
|
-
index$1.setGlobalConfig(objconfig);
|
|
31
|
+
index$2.setGlobalConfig(mc, "locale");
|
|
36
32
|
}
|
|
37
33
|
return (_ctx, _cache) => {
|
|
38
34
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString } from "vue";
|
|
2
2
|
import { dataProps } from "./data.js";
|
|
3
3
|
import * as index from "../../../locale/index.js";
|
|
4
4
|
import "@fangzhongya/utils/basic/string/splitUpper";
|
|
@@ -13,7 +13,7 @@ import "@fangzhongya/utils/name/humpToLine";
|
|
|
13
13
|
import "@fangzhongya/utils/basic/object/deepCopy";
|
|
14
14
|
import "@fangzhongya/utils/basic/Array/toggleArray";
|
|
15
15
|
import "@fangzhongya/utils/basic/object/objValue";
|
|
16
|
-
import {
|
|
16
|
+
import { setGlobalConfig } from "../../../hooks/global-config/index.js";
|
|
17
17
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
18
18
|
const _hoisted_1 = ["onClick"];
|
|
19
19
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -21,16 +21,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
props: dataProps,
|
|
22
22
|
setup(__props) {
|
|
23
23
|
const cs = useCssName("cs-i18n");
|
|
24
|
-
const config = useGlobalConfig();
|
|
25
|
-
const objconfig = unref(config) || {};
|
|
26
24
|
const comlocales = index;
|
|
27
25
|
const props = __props;
|
|
28
26
|
const list = Object.entries(comlocales.Common.value);
|
|
29
27
|
function onClick(item) {
|
|
30
28
|
const mc = lineToLargeHump(item[0]);
|
|
31
|
-
|
|
32
|
-
objconfig.cssname = item[0];
|
|
33
|
-
setGlobalConfig(objconfig);
|
|
29
|
+
setGlobalConfig(mc, "locale");
|
|
34
30
|
}
|
|
35
31
|
return (_ctx, _cache) => {
|
|
36
32
|
return openBlock(), createElementBlock("div", {
|
|
@@ -19,11 +19,9 @@
|
|
|
19
19
|
import * as locale from '../../../locale/index';
|
|
20
20
|
import type { Locale } from '../../../types/locale';
|
|
21
21
|
import { lineToLargeHump } from '../../../utils/util';
|
|
22
|
-
import {
|
|
22
|
+
import { setGlobalConfig } from '../../../hooks/global-config';
|
|
23
23
|
import { useCssName } from '../../../hooks/cssname';
|
|
24
24
|
const cs = useCssName('cs-i18n');
|
|
25
|
-
const config = useGlobalConfig();
|
|
26
|
-
const objconfig = unref(config) || {};
|
|
27
25
|
|
|
28
26
|
const comlocales: {
|
|
29
27
|
[key: string]: Locale;
|
|
@@ -34,9 +32,7 @@
|
|
|
34
32
|
|
|
35
33
|
function onClick(item: [string, string]) {
|
|
36
34
|
const mc = lineToLargeHump(item[0]);
|
|
37
|
-
|
|
38
|
-
objconfig.cssname = item[0];
|
|
39
|
-
setGlobalConfig(objconfig);
|
|
35
|
+
setGlobalConfig(mc, 'locale');
|
|
40
36
|
}
|
|
41
37
|
</script>
|
|
42
38
|
<style lang="scss"></style>
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
@use './inputs/index.scss' as *;
|
|
25
25
|
@use './selects/index.scss' as *;
|
|
26
26
|
@use './switchs/index.scss' as *;
|
|
27
|
-
@use './text/index.scss' as *;
|
|
28
27
|
@use './el-tables/index.scss' as *;
|
|
29
28
|
@use './pagin/index.scss' as *;
|
|
30
29
|
@use './tables-pagin/index.scss' as *;
|
|
31
|
-
@use './tables/index.scss' as *;
|
|
30
|
+
@use './tables/index.scss' as *;
|
|
31
|
+
@use './vxe-tables/index.scss' as *;
|
|
@@ -40,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
40
|
if (props.total && props.paginat.pageSize) {
|
|
41
41
|
v = Math.ceil(props.total / props.paginat.pageSize);
|
|
42
42
|
}
|
|
43
|
-
return "当前第" + props.paginat.current + "页
|
|
43
|
+
return "当前第" + props.paginat.current + "页 共" + v + "页 每页" + props.paginat.pageSize + "条记录";
|
|
44
44
|
};
|
|
45
45
|
const onCurrentChange = (v) => {
|
|
46
46
|
console.log("current", v);
|
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
if (props.total && props.paginat.pageSize) {
|
|
39
39
|
v = Math.ceil(props.total / props.paginat.pageSize);
|
|
40
40
|
}
|
|
41
|
-
return "当前第" + props.paginat.current + "页
|
|
41
|
+
return "当前第" + props.paginat.current + "页 共" + v + "页 每页" + props.paginat.pageSize + "条记录";
|
|
42
42
|
};
|
|
43
43
|
const onCurrentChange = (v) => {
|
|
44
44
|
console.log("current", v);
|
|
@@ -3,5 +3,8 @@ import { MaybeRef } from '../../types/hooks';
|
|
|
3
3
|
import { DataProps } from '../../components/global-config/src/data';
|
|
4
4
|
export declare function useGlobalConfig<K extends keyof DataProps, D extends DataProps[K]>(key: K, defaultValue?: D): Ref<Exclude<DataProps[K], undefined> | D>;
|
|
5
5
|
export declare function useGlobalConfig(): Ref<DataProps>;
|
|
6
|
-
|
|
6
|
+
type V = DataProps | DataProps[keyof DataProps];
|
|
7
|
+
type K = keyof DataProps;
|
|
8
|
+
export declare function setGlobalConfig(obj: V, key: K): void;
|
|
7
9
|
export declare function provideGlobalConfig(config: MaybeRef<DataProps>, app?: App, global?: boolean): ComputedRef<Readonly<DataProps>>;
|
|
10
|
+
export {};
|
|
@@ -34,17 +34,28 @@ function setValue<T>(v: T[keyof T], k: keyof T, z: T): T {
|
|
|
34
34
|
z[k] = v;
|
|
35
35
|
return z;
|
|
36
36
|
}
|
|
37
|
+
// 代码打包有问题
|
|
38
|
+
// export function setGlobalConfig(
|
|
39
|
+
// obj: DataProps | DataProps[keyof DataProps],
|
|
40
|
+
// key?: keyof DataProps,
|
|
41
|
+
// ) {
|
|
42
|
+
// if (key) {
|
|
43
|
+
// globalConfig.value = setValue(
|
|
44
|
+
// obj as DataProps[keyof DataProps],
|
|
45
|
+
// key,
|
|
46
|
+
// globalConfig.value,
|
|
47
|
+
// );
|
|
48
|
+
// } else {
|
|
49
|
+
// globalConfig.value = obj as DataProps;
|
|
50
|
+
// }
|
|
51
|
+
// }
|
|
37
52
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
) {
|
|
53
|
+
type V = DataProps | DataProps[keyof DataProps];
|
|
54
|
+
type K = keyof DataProps;
|
|
55
|
+
|
|
56
|
+
export function setGlobalConfig(obj: V, key: K) {
|
|
42
57
|
if (key) {
|
|
43
|
-
globalConfig.value =
|
|
44
|
-
obj as DataProps[keyof DataProps],
|
|
45
|
-
key,
|
|
46
|
-
globalConfig.value,
|
|
47
|
-
);
|
|
58
|
+
globalConfig.value[key] = obj as any;
|
|
48
59
|
} else {
|
|
49
60
|
globalConfig.value = obj as DataProps;
|
|
50
61
|
}
|
package/dist/index.css
CHANGED
|
@@ -677,4 +677,83 @@
|
|
|
677
677
|
}
|
|
678
678
|
.tables-pag-paginat .el-pagination {
|
|
679
679
|
justify-content: flex-end;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.vtables {
|
|
683
|
+
width: 100%;
|
|
684
|
+
min-height: 100px;
|
|
685
|
+
position: relative;
|
|
686
|
+
flex: 1;
|
|
687
|
+
display: flex;
|
|
688
|
+
flex-direction: column;
|
|
689
|
+
}
|
|
690
|
+
.vtables-table {
|
|
691
|
+
background-color: transparent;
|
|
692
|
+
}
|
|
693
|
+
.vtables-table.is-absolute {
|
|
694
|
+
position: absolute;
|
|
695
|
+
top: 0;
|
|
696
|
+
right: 0;
|
|
697
|
+
bottom: 0;
|
|
698
|
+
left: 0;
|
|
699
|
+
}
|
|
700
|
+
.vtables-table .vxe-body--column {
|
|
701
|
+
overflow: hidden;
|
|
702
|
+
padding: 8px 0;
|
|
703
|
+
}
|
|
704
|
+
.vtables-table .col--checkbox .vxe-checkbox--label {
|
|
705
|
+
padding-left: 0;
|
|
706
|
+
}
|
|
707
|
+
.vtables .fv-custom-checkbox {
|
|
708
|
+
cursor: pointer;
|
|
709
|
+
position: relative;
|
|
710
|
+
}
|
|
711
|
+
.vtables .fv-custom-checkbox.is-disabled {
|
|
712
|
+
cursor: not-allowed;
|
|
713
|
+
}
|
|
714
|
+
.vtables .fv-custom-checkbox .el-checkbox__label {
|
|
715
|
+
color: var(--vxe-table-header-font-color);
|
|
716
|
+
font-weight: var(--vxe-table-header-font-weight);
|
|
717
|
+
}
|
|
718
|
+
.vtables .fv-custom-checkbox .fv-custom-checkbox-mask {
|
|
719
|
+
position: absolute;
|
|
720
|
+
top: 0;
|
|
721
|
+
right: 0;
|
|
722
|
+
bottom: 0;
|
|
723
|
+
left: 0;
|
|
724
|
+
z-index: 1;
|
|
725
|
+
opacity: 0;
|
|
726
|
+
}
|
|
727
|
+
.vtables .fv-custom-radio {
|
|
728
|
+
cursor: pointer;
|
|
729
|
+
position: relative;
|
|
730
|
+
}
|
|
731
|
+
.vtables .fv-custom-radio.is-disabled {
|
|
732
|
+
cursor: not-allowed;
|
|
733
|
+
}
|
|
734
|
+
.vtables .fv-custom-radio .el-radio {
|
|
735
|
+
height: auto;
|
|
736
|
+
}
|
|
737
|
+
.vtables .fv-custom-radio.center .el-radio {
|
|
738
|
+
text-align: center;
|
|
739
|
+
display: table-cell;
|
|
740
|
+
}
|
|
741
|
+
.vtables .fv-custom-radio.center .el-radio__label {
|
|
742
|
+
display: none;
|
|
743
|
+
}
|
|
744
|
+
.vtables .fv-custom-radio.right .el-radio {
|
|
745
|
+
text-align: right;
|
|
746
|
+
display: table-cell;
|
|
747
|
+
}
|
|
748
|
+
.vtables .fv-custom-radio.right .el-radio__label {
|
|
749
|
+
display: none;
|
|
750
|
+
}
|
|
751
|
+
.vtables .fv-custom-radio .fv-custom-radio-mask {
|
|
752
|
+
position: absolute;
|
|
753
|
+
top: 0;
|
|
754
|
+
right: 0;
|
|
755
|
+
bottom: 0;
|
|
756
|
+
left: 0;
|
|
757
|
+
z-index: 1;
|
|
758
|
+
opacity: 0;
|
|
680
759
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/fang-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "fang-ui",
|
|
7
7
|
"keywords": [
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"vue-tsc": "^3.0.3",
|
|
48
48
|
"vuedraggable": "4.1.0",
|
|
49
49
|
"vxe-table": "4.14.4",
|
|
50
|
+
"@fang-ui/icons": "0.0.1-0",
|
|
51
|
+
"@fang-ui/hooks": "0.0.1-0",
|
|
50
52
|
"@fang-ui/components": "0.0.1-0",
|
|
51
53
|
"@fang-ui/directives": "0.0.1-0",
|
|
52
|
-
"@fang-ui/hooks": "0.0.1-0",
|
|
53
|
-
"@fang-ui/icons": "0.0.1-0",
|
|
54
54
|
"@fang-ui/locale": "0.0.1-0",
|
|
55
55
|
"@fang-ui/theme": "0.0.1-0",
|
|
56
|
-
"@fang-ui/
|
|
57
|
-
"@fang-ui/
|
|
56
|
+
"@fang-ui/utils": "0.0.1-0",
|
|
57
|
+
"@fang-ui/types": "0.0.1-0"
|
|
58
58
|
},
|
|
59
59
|
"main": "./dist/index.cjs",
|
|
60
60
|
"module": "./dist/index.js",
|
|
File without changes
|