@gct-paas/core-web 0.0.1-dev.20 → 0.0.1-dev.21

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.
@@ -0,0 +1,47 @@
1
+ import { PropType } from 'vue';
2
+ import { IFormItemController, ISelectEditor } from '@gct-paas/core';
3
+ export declare const GctFormFieldSelect: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ c: {
5
+ type: PropType<IFormItemController>;
6
+ required: true;
7
+ };
8
+ model: {
9
+ type: PropType<ISelectEditor>;
10
+ required: true;
11
+ };
12
+ value: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ }>, {
17
+ ns: import('@gct-paas/core').Namespace;
18
+ visible: import('vue').Ref<boolean, boolean>;
19
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
20
+ c: {
21
+ type: PropType<IFormItemController>;
22
+ required: true;
23
+ };
24
+ model: {
25
+ type: PropType<ISelectEditor>;
26
+ required: true;
27
+ };
28
+ value: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ }>> & Readonly<{
33
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
34
+ }>, {
35
+ value: string;
36
+ }, {}, {
37
+ modal: import('vue').DefineComponent<{
38
+ value: boolean;
39
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
40
+ "update:value": (...args: any[]) => void;
41
+ }, string, import('vue').PublicProps, Readonly<{
42
+ value: boolean;
43
+ }> & Readonly<{
44
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
45
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
46
+ }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
47
+ export default GctFormFieldSelect;
@@ -0,0 +1,48 @@
1
+ import { defineComponent, createVNode, resolveComponent, createTextVNode, ref } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+ import './gct-form-field-select.scss';
4
+ import modal from './gct-model-select.vue';
5
+
6
+ "use strict";
7
+ const GctFormFieldSelect = /* @__PURE__ */ defineComponent({
8
+ name: "GctFormFieldSelect",
9
+ components: {
10
+ modal
11
+ },
12
+ props: {
13
+ c: {
14
+ type: Object,
15
+ required: true
16
+ },
17
+ model: {
18
+ type: Object,
19
+ required: true
20
+ },
21
+ value: {
22
+ type: String,
23
+ default: ""
24
+ }
25
+ },
26
+ emits: ["update:value"],
27
+ setup() {
28
+ const ns = useNamespace("gct-form-field-select");
29
+ const visible = ref(false);
30
+ return {
31
+ ns,
32
+ visible
33
+ };
34
+ },
35
+ render() {
36
+ return createVNode("div", null, [createVNode(resolveComponent("a-button"), {
37
+ "onClick": () => this.visible = true,
38
+ "block": true
39
+ }, {
40
+ default: () => [createTextVNode("\u9009\u62E9\u6A21\u578B\u5B57\u6BB5")]
41
+ }), createVNode(modal, {
42
+ "value": this.visible,
43
+ "onUpdate:value": ($event) => this.visible = $event
44
+ }, null)]);
45
+ }
46
+ });
47
+
48
+ export { GctFormFieldSelect, GctFormFieldSelect as default };
@@ -0,0 +1,13 @@
1
+ import { IEditorProvider } from '@gct-paas/core';
2
+ /**
3
+ * 纯预览编辑器
4
+ *
5
+ * @author zhanghanrui
6
+ * @date 2024-03-27 10:03:03
7
+ * @export
8
+ * @class FormSelectProvider
9
+ * @implements {IEditorProvider}
10
+ */
11
+ export declare class GctFormFieldSelectProvider implements IEditorProvider {
12
+ component: string;
13
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ class GctFormFieldSelectProvider {
3
+ component = "gct-form-field-select";
4
+ }
5
+
6
+ export { GctFormFieldSelectProvider };
@@ -0,0 +1,7 @@
1
+ @include b(gct-form-field-select) {
2
+ display: flex;
3
+
4
+ @include e(select) {
5
+ flex:1;
6
+ }
7
+ }
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <a-modal
3
+ v-model:visible="visible"
4
+ width="600px"
5
+ title="关联模型字段"
6
+ ok-text="确认"
7
+ cancel-text="取消"
8
+ @ok="handleOk"
9
+ >
10
+ <div>所属模型:公司</div>
11
+ <div class="gct-box">
12
+ <a-transfer
13
+ v-model:target-keys="targetKeys"
14
+ :locale="{
15
+ itemUnit: '项已选',
16
+ itemsUnit: '项未选',
17
+ searchPlaceholder: '请输入搜索内容',
18
+ }"
19
+ :data-source="mockData"
20
+ show-search
21
+ :filter-option="filterOption"
22
+ :render="item => item.title"
23
+ />
24
+ </div>
25
+ </a-modal>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { ref, computed } from 'vue';
30
+ const props = defineProps<{
31
+ value: boolean;
32
+ }>();
33
+
34
+ const emit = defineEmits(['update:value']);
35
+ const visible = computed({
36
+ get() {
37
+ return props.value;
38
+ },
39
+ set(v) {
40
+ emit('update:value', v);
41
+ },
42
+ });
43
+ const mockData = ref([
44
+ { key: 0, title: '公司名称' },
45
+ { key: 1, title: 'ID' },
46
+ { key: 2, title: '创建人' },
47
+ { key: 3, title: '创建部门' },
48
+ { key: 4, title: '修改时间' },
49
+ { key: 5, title: '修改人' },
50
+ { key: 6, title: '修改部门' },
51
+ ]);
52
+ const targetKeys = ref([]);
53
+ const filterOption = (inputValue: string, option: object[]) => {
54
+ console.log();
55
+ // return option.description.indexOf(inputValue) > -1;
56
+ };
57
+ function handleOk() {
58
+ visible.value = false;
59
+ }
60
+ </script>
61
+ <style lang="scss" scoped>
62
+ .gct-box {
63
+ margin-top: 16px;
64
+
65
+ ::v-deep .ant-transfer-list {
66
+ height: 340px;
67
+ width: 240px;
68
+ }
69
+ }
70
+ </style>
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ value: boolean;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ "update:value": (...args: any[]) => void;
6
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ install(app: import('vue').App): void;
3
+ };
4
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { widthEditorInstall, EditorTypeOld } from '@gct-paas/core';
2
+ import { GctFormFieldSelectProvider } from './gct-form-field-select.provider.mjs';
3
+ import { GctFormFieldSelect as GctFormFieldSelect$1 } from './gct-form-field-select.mjs';
4
+
5
+ "use strict";
6
+ var GctFormFieldSelect = widthEditorInstall(
7
+ EditorTypeOld.Field_SELECT,
8
+ () => new GctFormFieldSelectProvider(),
9
+ GctFormFieldSelect$1
10
+ );
11
+
12
+ export { GctFormFieldSelect as default };
@@ -26,7 +26,7 @@ const GctFormText = /* @__PURE__ */ defineComponent({
26
26
  };
27
27
  },
28
28
  render() {
29
- return createVNode(resolveComponent("a-select"), mergeProps({
29
+ return createVNode(resolveComponent("a-input"), mergeProps({
30
30
  "value": this.val,
31
31
  "onUpdate:value": ($event) => this.val = $event
32
32
  }, this.model.props || {}, {
@@ -7,6 +7,7 @@ import GctFormNumber, { oldNumberCom } from './gct-form-number/index.mjs';
7
7
  import GctFormPicker from './gct-form-picker/index.mjs';
8
8
  import GctFormSelect from './gct-form-select/index.mjs';
9
9
  import GctFormModalSelect from './gct-form-modal-select/index.mjs';
10
+ import GctFormFieldSelect from './gct-form-field-select/index.mjs';
10
11
  import GctFormSpan from './gct-form-span/index.mjs';
11
12
  import GctFormSwitch, { oldSwitchCom } from './gct-form-switch/index.mjs';
12
13
  import GctFormText, { oldTextCom } from './gct-form-text/index.mjs';
@@ -29,6 +30,7 @@ var Editor = {
29
30
  app.use(GctFormPicker);
30
31
  app.use(GctFormSelect);
31
32
  app.use(GctFormModalSelect);
33
+ app.use(GctFormFieldSelect);
32
34
  app.use(GctFormSpan);
33
35
  app.use(GctFormSwitch);
34
36
  app.use(GctFormText);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core-web",
3
- "version": "0.0.1-dev.20",
3
+ "version": "0.0.1-dev.21",
4
4
  "type": "module",
5
5
  "description": "paas 平台网页端核心包",
6
6
  "main": "dist/index.min.cjs",
@@ -44,7 +44,7 @@
44
44
  "gen-api:platform": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=platform -t ../cli/hbs-temp -o ./src/service/gct-platform && prettier './src/service/gct-platform' --write"
45
45
  },
46
46
  "dependencies": {
47
- "@gct-paas/core": "0.0.1-dev.20",
47
+ "@gct-paas/core": "0.0.1-dev.21",
48
48
  "@monaco-editor/loader": "^1.5.0",
49
49
  "ant-design-vue": "3.2.20",
50
50
  "lodash-es": "^4.17.21",
@@ -53,12 +53,12 @@
53
53
  "vue3-colorpicker": "^2.3.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@gct-paas/build": "0.0.1-dev.20",
57
- "@gct-paas/scss": "0.0.1-dev.20",
56
+ "@gct-paas/build": "0.0.1-dev.21",
57
+ "@gct-paas/scss": "0.0.1-dev.21",
58
58
  "sass": "^1.85.1"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "vue": "^3.x"
62
62
  },
63
- "gitHead": "9266f204c9c400c60c3aeffe6981eed0992fc243"
63
+ "gitHead": "37b40934f0d80ca67b4dba1c0259e8ca02f9dba5"
64
64
  }