@gct-paas/design-web 0.1.4-dev.11 → 0.1.4-dev.12
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/index.esm.min.js +775 -0
- package/dist/index.min.css +2 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +7 -8
- package/es/components/I18nSelect/index.mjs +7 -0
- package/es/components/I18nSelect/src/i18n-modal.vue.mjs +5 -151
- package/es/components/I18nSelect/src/i18n-modal.vue_vue_type_script_setup_true_lang.mjs +128 -0
- package/es/components/I18nSelect/src/i18n-select-btn.vue.mjs +7 -7
- package/es/components/I18nSelect/src/i18n-select-btn.vue_vue_type_script_setup_true_name_i18n-select-btn_lang.mjs +116 -0
- package/es/components/I18nSelect/src/i18n-select-container.vue.mjs +7 -7
- package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_script_setup_true_name_i18n-select-container_lang.mjs +217 -0
- package/es/components/I18nSelect/src/i18n-select-input-form.vue.mjs +5 -57
- package/es/components/I18nSelect/src/i18n-select-input-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs +56 -0
- package/es/components/I18nSelect/src/i18n-select-input.vue.mjs +7 -7
- package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +125 -0
- package/es/components/I18nSelect/src/i18n-select-modal.vue.mjs +5 -21
- package/es/components/I18nSelect/src/i18n-select-modal.vue_vue_type_script_setup_true_lang.mjs +19 -0
- package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.mjs +5 -57
- package/es/components/I18nSelect/src/i18n-select-textarea-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs +56 -0
- package/es/components/I18nSelect/src/i18n-select-textarea.vue.mjs +7 -7
- package/es/components/I18nSelect/src/i18n-select-textarea.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +86 -0
- package/es/components/I18nSelect/src/useI18nSelect.mjs +43 -48
- package/es/components/index.mjs +8 -0
- package/es/index.mjs +14 -15
- package/package.json +8 -8
- package/dist/index.esm.min.mjs +0 -836
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
- package/es/components/I18nSelect/src/i18n-modal.vue2.mjs +0 -5
- package/es/components/I18nSelect/src/i18n-select-btn.vue2.mjs +0 -138
- package/es/components/I18nSelect/src/i18n-select-container.vue2.mjs +0 -250
- package/es/components/I18nSelect/src/i18n-select-input-form.vue2.mjs +0 -5
- package/es/components/I18nSelect/src/i18n-select-input.vue2.mjs +0 -129
- package/es/components/I18nSelect/src/i18n-select-modal.vue2.mjs +0 -5
- package/es/components/I18nSelect/src/i18n-select-textarea-form.vue2.mjs +0 -5
- package/es/components/I18nSelect/src/i18n-select-textarea.vue2.mjs +0 -93
- /package/es/components/I18nSelect/src/{i18n-select-btn.css → i18n-select-btn.vue_vue_type_style_index_0_scoped_dc8ffb2c_lang.css} +0 -0
- /package/es/components/I18nSelect/src/{i18n-select-container.css → i18n-select-container.vue_vue_type_style_index_0_scoped_0160ed5e_lang.css} +0 -0
- /package/es/components/I18nSelect/src/{i18n-select-input.css → i18n-select-input.vue_vue_type_style_index_0_scoped_412e1309_lang.css} +0 -0
- /package/es/components/I18nSelect/src/{i18n-select-textarea.css → i18n-select-textarea.vue_vue_type_style_index_0_scoped_cd95c416_lang.css} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import i18n_select_btn_default from "./i18n-select-btn.vue.mjs";
|
|
2
|
+
import { computed, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, ref, resolveComponent } from "vue";
|
|
3
|
+
import { isEmpty, omit } from "lodash-es";
|
|
4
|
+
//#region src/components/I18nSelect/src/i18n-select-textarea.vue?vue&type=script&setup=true&name=i18n-select-input&lang.ts
|
|
5
|
+
var _hoisted_1 = { class: "inline-block w100% relative" };
|
|
6
|
+
var i18n_select_textarea_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "i18n-select-textarea",
|
|
8
|
+
props: {
|
|
9
|
+
attr: {},
|
|
10
|
+
inputExtraProps: {},
|
|
11
|
+
i18nConfig: {},
|
|
12
|
+
i18nText: {},
|
|
13
|
+
placeholderText: {},
|
|
14
|
+
rows: {},
|
|
15
|
+
style: {}
|
|
16
|
+
},
|
|
17
|
+
emits: [
|
|
18
|
+
"update:i18nText",
|
|
19
|
+
"update:i18nConfig",
|
|
20
|
+
"on-i18n-select",
|
|
21
|
+
"clickOutside",
|
|
22
|
+
"focus"
|
|
23
|
+
],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const inputValue = computed({
|
|
28
|
+
get() {
|
|
29
|
+
return props.i18nText ?? "";
|
|
30
|
+
},
|
|
31
|
+
set(value) {
|
|
32
|
+
emit("update:i18nText", value);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const i18nConfigState = computed(() => {
|
|
36
|
+
if (isEmpty(props.i18nConfig)) return {};
|
|
37
|
+
if (typeof props.i18nConfig === "string") return JSON.parse(props.i18nConfig) ?? {};
|
|
38
|
+
return props.i18nConfig ?? {};
|
|
39
|
+
});
|
|
40
|
+
const i18nValue = computed(() => {
|
|
41
|
+
return i18nConfigState.value?.[props.attr];
|
|
42
|
+
});
|
|
43
|
+
const handleSelectI18n = (params) => {
|
|
44
|
+
if (params) {
|
|
45
|
+
if (isEmpty(inputValue.value)) emit("update:i18nText", params.i18nTitle);
|
|
46
|
+
emit("update:i18nConfig", JSON.stringify(isEmpty(params) ? omit(i18nConfigState.value, props.attr) : {
|
|
47
|
+
...i18nConfigState.value,
|
|
48
|
+
[props.attr]: params.i18nKey
|
|
49
|
+
}));
|
|
50
|
+
emit("on-i18n-select", params);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const inputRef = ref();
|
|
54
|
+
const handleFocus = () => {
|
|
55
|
+
emit("focus", inputRef.value);
|
|
56
|
+
};
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
const _component_a_textarea = resolveComponent("a-textarea");
|
|
59
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_a_textarea, mergeProps({
|
|
60
|
+
ref_key: "inputRef",
|
|
61
|
+
ref: inputRef,
|
|
62
|
+
value: inputValue.value,
|
|
63
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
64
|
+
placeholder: __props.placeholderText
|
|
65
|
+
}, __props.inputExtraProps, {
|
|
66
|
+
style: {
|
|
67
|
+
resize: "none",
|
|
68
|
+
...__props.style
|
|
69
|
+
},
|
|
70
|
+
onFocus: handleFocus
|
|
71
|
+
}), null, 16, [
|
|
72
|
+
"value",
|
|
73
|
+
"placeholder",
|
|
74
|
+
"style"
|
|
75
|
+
]), createVNode(i18n_select_btn_default, {
|
|
76
|
+
"i18n-value": i18nValue.value,
|
|
77
|
+
"simple-btn": true,
|
|
78
|
+
type: "text",
|
|
79
|
+
onOnSelectI18n: handleSelectI18n,
|
|
80
|
+
onClosed: _cache[1] || (_cache[1] = ($event) => emit("clickOutside"))
|
|
81
|
+
}, null, 8, ["i18n-value"])]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
//#endregion
|
|
86
|
+
export { i18n_select_textarea_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default as default };
|
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import i18n_select_modal_default from "./i18n-select-modal.vue.mjs";
|
|
2
|
+
import { createApp, ref, unref } from "vue";
|
|
3
|
+
import { has } from "lodash-es";
|
|
4
|
+
//#region src/components/I18nSelect/src/useI18nSelect.ts
|
|
5
5
|
function useI18nSelect() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
open,
|
|
47
|
-
close
|
|
48
|
-
};
|
|
6
|
+
let app = null;
|
|
7
|
+
let instance = null;
|
|
8
|
+
const i18nModalKey = ref("");
|
|
9
|
+
function open(params) {
|
|
10
|
+
let props;
|
|
11
|
+
let target = document.body;
|
|
12
|
+
if (has(params, "target") || has(params, "props")) {
|
|
13
|
+
const options = params;
|
|
14
|
+
props = options.props || {};
|
|
15
|
+
target = options.target || document.body;
|
|
16
|
+
} else props = params;
|
|
17
|
+
i18nModalKey.value = props.i18nModalKey || `i18n-select-modal-${Math.random().toString(16).substring(8)}`;
|
|
18
|
+
const propsData = {
|
|
19
|
+
...props,
|
|
20
|
+
destroyCallback: () => close(props?.destroyCallback),
|
|
21
|
+
i18nModalKey: unref(i18nModalKey)
|
|
22
|
+
};
|
|
23
|
+
if (!app) {
|
|
24
|
+
const container = document.createElement("div");
|
|
25
|
+
container.id = unref(i18nModalKey);
|
|
26
|
+
unref(target)?.appendChild(container);
|
|
27
|
+
app = createApp(i18n_select_modal_default, propsData);
|
|
28
|
+
instance = app.mount(container);
|
|
29
|
+
}
|
|
30
|
+
instance?.open();
|
|
31
|
+
}
|
|
32
|
+
function close(callback) {
|
|
33
|
+
if (typeof callback === "function") callback();
|
|
34
|
+
document.querySelector(`#${unref(i18nModalKey)}`).remove();
|
|
35
|
+
if (app) {
|
|
36
|
+
app.unmount();
|
|
37
|
+
app = null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
open,
|
|
42
|
+
close
|
|
43
|
+
};
|
|
49
44
|
}
|
|
50
|
-
|
|
45
|
+
//#endregion
|
|
51
46
|
export { useI18nSelect };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./I18nSelect/src/i18n-modal.vue.mjs";
|
|
2
|
+
import "./I18nSelect/src/useI18nSelect.mjs";
|
|
3
|
+
import "./I18nSelect/src/i18n-select-btn.vue.mjs";
|
|
4
|
+
import "./I18nSelect/src/i18n-select-input.vue.mjs";
|
|
5
|
+
import "./I18nSelect/src/i18n-select-input-form.vue.mjs";
|
|
6
|
+
import "./I18nSelect/src/i18n-select-textarea.vue.mjs";
|
|
7
|
+
import "./I18nSelect/src/i18n-select-textarea-form.vue.mjs";
|
|
8
|
+
import "./I18nSelect/index.mjs";
|
package/es/index.mjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export { index as default };
|
|
1
|
+
import i18n_modal_default from "./components/I18nSelect/src/i18n-modal.vue.mjs";
|
|
2
|
+
import { useI18nSelect } from "./components/I18nSelect/src/useI18nSelect.mjs";
|
|
3
|
+
import i18n_select_btn_default from "./components/I18nSelect/src/i18n-select-btn.vue.mjs";
|
|
4
|
+
import i18n_select_input_default from "./components/I18nSelect/src/i18n-select-input.vue.mjs";
|
|
5
|
+
import i18n_select_input_form_default from "./components/I18nSelect/src/i18n-select-input-form.vue.mjs";
|
|
6
|
+
import i18n_select_textarea_default from "./components/I18nSelect/src/i18n-select-textarea.vue.mjs";
|
|
7
|
+
import i18n_select_textarea_form_default from "./components/I18nSelect/src/i18n-select-textarea-form.vue.mjs";
|
|
8
|
+
import "./components/index.mjs";
|
|
9
|
+
//#region src/index.ts
|
|
10
|
+
var src_default = { install(app) {
|
|
11
|
+
console.log("Design Web install", app);
|
|
12
|
+
} };
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i18n_modal_default as I18Modal, i18n_select_btn_default as I18nSelectBtn, i18n_select_input_default as I18nSelectInput, i18n_select_input_form_default as I18nSelectInputForm, i18n_select_textarea_default as I18nSelectTextarea, i18n_select_textarea_form_default as I18nSelectTextareaForm, src_default as default, useI18nSelect };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design-web",
|
|
3
|
-
"version": "0.1.4-dev.
|
|
3
|
+
"version": "0.1.4-dev.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面移动端底包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ant-design/icons-vue": "^6.1.0",
|
|
46
46
|
"@gct-paas/api": "^0.1.1",
|
|
47
|
-
"@gct-paas/core": "0.1.4-dev.
|
|
48
|
-
"@gct-paas/core-web": "0.1.4-dev.
|
|
49
|
-
"@gct-paas/design": "0.1.4-dev.
|
|
50
|
-
"@gct-paas/schema": "0.1.4-dev.
|
|
51
|
-
"@gct-paas/scss": "0.1.4-dev.
|
|
47
|
+
"@gct-paas/core": "0.1.4-dev.12",
|
|
48
|
+
"@gct-paas/core-web": "0.1.4-dev.12",
|
|
49
|
+
"@gct-paas/design": "0.1.4-dev.12",
|
|
50
|
+
"@gct-paas/schema": "0.1.4-dev.12",
|
|
51
|
+
"@gct-paas/scss": "0.1.4-dev.12",
|
|
52
52
|
"@vueuse/core": "^14.1.0",
|
|
53
53
|
"ant-design-vue": "3.2.20",
|
|
54
54
|
"vue": "^3.5.29"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@gct-paas/build": "^0.1.
|
|
57
|
+
"@gct-paas/build": "^0.1.6-dev.1",
|
|
58
58
|
"sass": "^1.97.3"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "0a7f1a0388cb21eb1c3a4868b14d664a5a3152ed"
|
|
61
61
|
}
|