@qynpm/ui 1.0.19 → 1.0.22

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.
Files changed (105) hide show
  1. package/README.md +453 -356
  2. package/dist/index.cjs +7 -2
  3. package/dist/index.mjs +33 -26
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +1 -1
  6. package/dist/qy-autocomplete/index.cjs +1 -1
  7. package/dist/qy-autocomplete/index.mjs +1 -1
  8. package/dist/qy-button/index.cjs +2 -0
  9. package/dist/qy-button/index.mjs +5 -0
  10. package/dist/qy-checkbox/index.cjs +1 -1
  11. package/dist/qy-checkbox/index.mjs +1 -1
  12. package/dist/qy-date-picker/index.cjs +1 -1
  13. package/dist/qy-date-picker/index.mjs +2 -2
  14. package/dist/qy-dialog/index.cjs +1 -1
  15. package/dist/qy-dialog/index.mjs +2 -2
  16. package/dist/qy-dropdown/index.cjs +2 -0
  17. package/dist/qy-dropdown/index.mjs +5 -0
  18. package/dist/qy-form-section/index.cjs +1 -1
  19. package/dist/qy-form-section/index.mjs +1 -1
  20. package/dist/qy-image/index.cjs +1 -1
  21. package/dist/qy-image/index.mjs +2 -2
  22. package/dist/qy-image-preview/index.cjs +1 -1
  23. package/dist/qy-image-preview/index.mjs +1 -1
  24. package/dist/qy-image-upload/index.cjs +1 -1
  25. package/dist/qy-image-upload/index.mjs +1 -1
  26. package/dist/qy-input/index.cjs +2 -1
  27. package/dist/qy-input/index.mjs +2 -1
  28. package/dist/qy-input-number/index.cjs +1 -1
  29. package/dist/qy-input-number/index.mjs +1 -1
  30. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  31. package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
  32. package/dist/qy-menu-actions/index.cjs +1 -1
  33. package/dist/qy-menu-actions/index.mjs +2 -2
  34. package/dist/qy-money-input/index.cjs +1 -1
  35. package/dist/qy-money-input/index.mjs +2 -2
  36. package/dist/qy-radio-group/index.cjs +1 -1
  37. package/dist/qy-radio-group/index.mjs +1 -1
  38. package/dist/qy-record-quote-search/index.cjs +1 -1
  39. package/dist/qy-record-quote-search/index.mjs +2 -2
  40. package/dist/qy-remark-image/index.cjs +1 -1
  41. package/dist/qy-remark-image/index.mjs +2 -2
  42. package/dist/qy-remote-select/index.cjs +1 -1
  43. package/dist/qy-remote-select/index.mjs +1 -1
  44. package/dist/qy-search-input/index.cjs +1 -1
  45. package/dist/qy-search-input/index.mjs +1 -1
  46. package/dist/qy-select/index.cjs +1 -1
  47. package/dist/qy-select/index.mjs +1 -1
  48. package/dist/qy-selection-dialog/index.cjs +1 -1
  49. package/dist/qy-selection-dialog/index.mjs +2 -2
  50. package/dist/qy-table-column-settings/index.cjs +1 -1
  51. package/dist/qy-table-column-settings/index.mjs +2 -2
  52. package/dist/qy-tree-select/index.cjs +1 -1
  53. package/dist/qy-tree-select/index.mjs +1 -1
  54. package/dist/qy-upload/index.cjs +1 -1
  55. package/dist/qy-upload/index.mjs +1 -1
  56. package/dist/shared/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  57. package/dist/shared/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  58. package/dist/shared/index-BMqHC4GE.mjs +4239 -0
  59. package/dist/shared/index-BO5aWk3f.cjs +1 -0
  60. package/dist/shared/index-BZ2L7Rch.cjs +1 -0
  61. package/dist/shared/index-BnMUdIAd.cjs +1 -0
  62. package/dist/shared/index-CRZsiNVW.cjs +1 -0
  63. package/dist/shared/index-CSxCewXP.mjs +127 -0
  64. package/dist/shared/index-CagHZ25z.mjs +162 -0
  65. package/dist/shared/index-Cuw6WFH3.cjs +1 -0
  66. package/dist/shared/{index-B4JNbDHG.mjs → index-D8iNLsjJ.mjs} +1 -1
  67. package/dist/shared/{index-BWIOoRpy.mjs → index-DaqN69ii.mjs} +1 -1
  68. package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +1 -0
  69. package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +152 -0
  70. package/dist/shared/install-CxBnxbuN.mjs +8 -0
  71. package/dist/shared/install-c8il9DQv.cjs +1 -0
  72. package/index.d.ts +45 -41
  73. package/package.json +218 -203
  74. package/qy-button/index.d.ts +34 -0
  75. package/qy-dropdown/index.d.ts +40 -0
  76. package/dist/shared/index-6peZjVxN.cjs +0 -1
  77. package/dist/shared/index-B0gL899c.mjs +0 -4428
  78. package/dist/shared/index-B7ZgDgHR.cjs +0 -1
  79. package/dist/shared/index-CQPIT5by.cjs +0 -1
  80. package/dist/shared/install-DMq9RQ-h.mjs +0 -15
  81. package/dist/shared/install-DNgKRKb2.cjs +0 -1
  82. package/qy-action-bar/index.js +0 -1
  83. package/qy-autocomplete/index.js +0 -1
  84. package/qy-checkbox/index.js +0 -1
  85. package/qy-date-picker/index.js +0 -1
  86. package/qy-dialog/index.js +0 -1
  87. package/qy-form-section/index.js +0 -1
  88. package/qy-image/index.js +0 -1
  89. package/qy-image-preview/index.js +0 -1
  90. package/qy-image-upload/index.js +0 -1
  91. package/qy-input/index.js +0 -1
  92. package/qy-input-number/index.js +0 -1
  93. package/qy-legacy-selection-dialog/index.js +0 -1
  94. package/qy-menu-actions/index.js +0 -7
  95. package/qy-money-input/index.js +0 -1
  96. package/qy-radio-group/index.js +0 -1
  97. package/qy-record-quote-search/index.js +0 -1
  98. package/qy-remark-image/index.js +0 -1
  99. package/qy-remote-select/index.js +0 -1
  100. package/qy-search-input/index.js +0 -1
  101. package/qy-select/index.js +0 -1
  102. package/qy-selection-dialog/index.js +0 -1
  103. package/qy-table-column-settings/index.js +0 -10
  104. package/qy-tree-select/index.js +0 -1
  105. package/qy-upload/index.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { ElPopover as I } from "element-plus/es";
2
2
  import { defineComponent as E, computed as h, ref as w, onBeforeUnmount as $, openBlock as r, createElementBlock as s, normalizeClass as q, createBlock as D, withCtx as T, createElementVNode as c, Fragment as C, renderList as M, normalizeStyle as A, createCommentVNode as m, toDisplayString as y } from "vue";
3
- import { _ as N } from "./install-DMq9RQ-h.mjs";
3
+ import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
4
  const P = { class: "qy-menu-actions__panel" }, U = ["disabled", "data-action-key", "onClick"], W = {
5
5
  key: 0,
6
6
  class: "qy-menu-actions__loading"
@@ -1,6 +1,6 @@
1
1
  import { ElDialog as G, ElTable as H, ElTableColumn as J, ElInput as M, ElSwitch as O, ElButton as P } from "element-plus/es";
2
2
  import { defineComponent as X, ref as S, watch as Y, computed as $, openBlock as C, createBlock as B, withCtx as i, createElementVNode as l, createVNode as o, normalizeClass as Z, toDisplayString as E, createElementBlock as T, createCommentVNode as I, createTextVNode as D } from "vue";
3
- import { _ as ee } from "./install-DMq9RQ-h.mjs";
3
+ import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
4
  const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column-settings__table-wrap" }, ne = ["data-testid", "onClick"], se = {
5
5
  class: "qy-table-column-settings__side",
6
6
  "data-testid": "settings-side-actions"
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),T=require("element-plus"),A=t.defineComponent({name:"QyInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"}},emits:["update:modelValue","input","change","focus","blur","clear","enter"],setup(d,{expose:p,emit:m}){const o=d,u=m,v=t.useAttrs(),l=t.ref(null),i=t.ref(a(o.modelValue)),r=t.ref("none"),h=t.computed(()=>a(o.modelValue));t.watch(()=>o.modelValue,e=>{i.value=a(e)});function a(e){return e==null?"":String(e)}function V(e){return o.removeSpace?e.replace(/\s+/g,""):e}function f(e,n){return o.trimMode!==n?e:e.trim()}function c(e){return V(a(e))}function s(e){i.value=e,u("update:modelValue",e)}function g(e){const n=c(e);if(n===""&&r.value==="clear"){r.value="update",i.value="";return}s(n),r.value=n===""?"update":"none"}function x(e){i.value=a(e),u("input",a(e))}function y(e){const n=f(c(e),"change");if(n===""&&r.value!=="none"){u("change",n);return}n!==a(o.modelValue)&&s(n),u("change",n)}function S(e){u("focus",e)}function C(e){const n=f(i.value,"blur");n!==a(o.modelValue)&&s(n),u("blur",e)}function $(){r.value==="none"&&s(""),r.value="clear",u("clear")}function k(e){u("enter",e)}function w(){var e,n;(n=(e=l.value)==null?void 0:e.focus)==null||n.call(e)}function I(){var e,n;(n=(e=l.value)==null?void 0:e.blur)==null||n.call(e)}function b(){var e,n;(n=(e=l.value)==null?void 0:e.select)==null||n.call(e)}function z(){var e,n;(n=(e=l.value)==null?void 0:e.clear)==null||n.call(e)}function B(){var e,n;(n=(e=l.value)==null?void 0:e.resizeTextarea)==null||n.call(e)}function q(){var e;return((e=l.value)==null?void 0:e.input)||null}function M(){var e;return((e=l.value)==null?void 0:e.textarea)||null}return p({focus:w,blur:I,select:b,clear:z,resizeTextarea:B,getNativeInput:q,getTextarea:M}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(T.ElInput),t.mergeProps({ref_key:"inputRef",ref:l,class:"qy-input"},t.unref(v),{"model-value":h.value,"onUpdate:modelValue":g,onInput:x,onChange:y,onFocus:S,onBlur:C,onClear:$,onKeydown:t.withKeys(k,["enter"])}),t.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prepend")]),key:"2"}:void 0,e.$slots.append?{name:"append",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"append")]),key:"3"}:void 0]),1040,["model-value"]))}});exports._sfc_main=A;
@@ -0,0 +1,152 @@
1
+ import { defineComponent as F, useAttrs as K, ref as c, computed as R, watch as U, openBlock as N, createBlock as P, unref as m, mergeProps as Q, withKeys as _, createSlots as j, withCtx as s, renderSlot as f } from "vue";
2
+ import { ElInput as D } from "element-plus";
3
+ const J = /* @__PURE__ */ F({
4
+ name: "QyInput",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ modelValue: { default: "" },
9
+ removeSpace: { type: Boolean, default: !1 },
10
+ trimMode: { default: "none" }
11
+ },
12
+ emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "enter"],
13
+ setup(v, { expose: h, emit: V }) {
14
+ const l = v, t = V, g = K(), u = c(null), r = c(a(l.modelValue)), o = c("none"), y = R(() => a(l.modelValue));
15
+ U(
16
+ () => l.modelValue,
17
+ (e) => {
18
+ r.value = a(e);
19
+ }
20
+ );
21
+ function a(e) {
22
+ return e == null ? "" : String(e);
23
+ }
24
+ function x(e) {
25
+ return l.removeSpace ? e.replace(/\s+/g, "") : e;
26
+ }
27
+ function p(e, n) {
28
+ return l.trimMode !== n ? e : e.trim();
29
+ }
30
+ function d(e) {
31
+ return x(a(e));
32
+ }
33
+ function i(e) {
34
+ r.value = e, t("update:modelValue", e);
35
+ }
36
+ function $(e) {
37
+ const n = d(e);
38
+ if (n === "" && o.value === "clear") {
39
+ o.value = "update", r.value = "";
40
+ return;
41
+ }
42
+ i(n), o.value = n === "" ? "update" : "none";
43
+ }
44
+ function k(e) {
45
+ r.value = a(e), t("input", a(e));
46
+ }
47
+ function S(e) {
48
+ const n = p(d(e), "change");
49
+ if (n === "" && o.value !== "none") {
50
+ t("change", n);
51
+ return;
52
+ }
53
+ n !== a(l.modelValue) && i(n), t("change", n);
54
+ }
55
+ function C(e) {
56
+ t("focus", e);
57
+ }
58
+ function I(e) {
59
+ const n = p(r.value, "blur");
60
+ n !== a(l.modelValue) && i(n), t("blur", e);
61
+ }
62
+ function b() {
63
+ o.value === "none" && i(""), o.value = "clear", t("clear");
64
+ }
65
+ function z(e) {
66
+ t("enter", e);
67
+ }
68
+ function B() {
69
+ var e, n;
70
+ (n = (e = u.value) == null ? void 0 : e.focus) == null || n.call(e);
71
+ }
72
+ function w() {
73
+ var e, n;
74
+ (n = (e = u.value) == null ? void 0 : e.blur) == null || n.call(e);
75
+ }
76
+ function M() {
77
+ var e, n;
78
+ (n = (e = u.value) == null ? void 0 : e.select) == null || n.call(e);
79
+ }
80
+ function T() {
81
+ var e, n;
82
+ (n = (e = u.value) == null ? void 0 : e.clear) == null || n.call(e);
83
+ }
84
+ function q() {
85
+ var e, n;
86
+ (n = (e = u.value) == null ? void 0 : e.resizeTextarea) == null || n.call(e);
87
+ }
88
+ function A() {
89
+ var e;
90
+ return ((e = u.value) == null ? void 0 : e.input) || null;
91
+ }
92
+ function E() {
93
+ var e;
94
+ return ((e = u.value) == null ? void 0 : e.textarea) || null;
95
+ }
96
+ return h({
97
+ // 暴露 Element Plus 常用输入框方法,方便业务弹窗做聚焦、选中和 textarea 重算高度。
98
+ focus: B,
99
+ blur: w,
100
+ select: M,
101
+ clear: T,
102
+ resizeTextarea: q,
103
+ getNativeInput: A,
104
+ getTextarea: E
105
+ }), (e, n) => (N(), P(m(D), Q({
106
+ ref_key: "inputRef",
107
+ ref: u,
108
+ class: "qy-input"
109
+ }, m(g), {
110
+ "model-value": y.value,
111
+ "onUpdate:modelValue": $,
112
+ onInput: k,
113
+ onChange: S,
114
+ onFocus: C,
115
+ onBlur: I,
116
+ onClear: b,
117
+ onKeydown: _(z, ["enter"])
118
+ }), j({ _: 2 }, [
119
+ e.$slots.prefix ? {
120
+ name: "prefix",
121
+ fn: s(() => [
122
+ f(e.$slots, "prefix")
123
+ ]),
124
+ key: "0"
125
+ } : void 0,
126
+ e.$slots.suffix ? {
127
+ name: "suffix",
128
+ fn: s(() => [
129
+ f(e.$slots, "suffix")
130
+ ]),
131
+ key: "1"
132
+ } : void 0,
133
+ e.$slots.prepend ? {
134
+ name: "prepend",
135
+ fn: s(() => [
136
+ f(e.$slots, "prepend")
137
+ ]),
138
+ key: "2"
139
+ } : void 0,
140
+ e.$slots.append ? {
141
+ name: "append",
142
+ fn: s(() => [
143
+ f(e.$slots, "append")
144
+ ]),
145
+ key: "3"
146
+ } : void 0
147
+ ]), 1040, ["model-value"]));
148
+ }
149
+ });
150
+ export {
151
+ J as _
152
+ };
@@ -0,0 +1,8 @@
1
+ function a(r, i = r == null ? void 0 : r.name) {
2
+ return i && (r.install = (l) => {
3
+ l.component(i, r);
4
+ }), r;
5
+ }
6
+ export {
7
+ a as w
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";function s(i,l=i==null?void 0:i.name){return l&&(i.install=r=>{r.component(l,i)}),i}exports.withInstall=s;
package/index.d.ts CHANGED
@@ -1,26 +1,28 @@
1
1
  import type { App, Plugin } from 'vue'
2
2
 
3
3
  // 根入口类型声明,对应 @qynpm/ui 的命名导出和 app.use(QyUI) 整包注册。
4
- export const QyUpload: Plugin
5
- export const QyImage: Plugin
6
- export const QyImagePreview: Plugin
7
- export const QyImageUpload: Plugin
4
+ export const QyUpload: Plugin
5
+ export const QyImage: Plugin
6
+ export const QyImagePreview: Plugin
7
+ export const QyImageUpload: Plugin
8
8
  export const QyDialog: Plugin
9
+ export const QyButton: Plugin
10
+ export const QyDropdown: Plugin
9
11
  export const QyInput: Plugin
10
12
  export const QyInputNumber: Plugin
11
- export const QyMoneyInput: Plugin
12
- export const QyDatePicker: Plugin
13
- export const QyCheckbox: Plugin
14
- export const QyAutocomplete: Plugin
15
- export const QyMenuActions: Plugin
16
- export const QyTableColumnSettings: Plugin
17
- export const QyRadioGroup: Plugin
13
+ export const QyMoneyInput: Plugin
14
+ export const QyDatePicker: Plugin
15
+ export const QyCheckbox: Plugin
16
+ export const QyAutocomplete: Plugin
17
+ export const QyMenuActions: Plugin
18
+ export const QyTableColumnSettings: Plugin
19
+ export const QyRadioGroup: Plugin
18
20
  export const QyRemoteSelect: Plugin
19
- export const QySearchInput: Plugin
20
- export const QyRecordQuoteSearch: Plugin
21
- export const QySelect: Plugin
22
- export const QyTreeSelect: Plugin
23
- export const QySelectionDialog: Plugin
21
+ export const QySearchInput: Plugin
22
+ export const QyRecordQuoteSearch: Plugin
23
+ export const QySelect: Plugin
24
+ export const QyTreeSelect: Plugin
25
+ export const QySelectionDialog: Plugin
24
26
  export const QyLegacySelectionDialog: Plugin
25
27
  export const QyFormSection: Plugin
26
28
  export const QyActionBar: Plugin
@@ -30,38 +32,40 @@ export function parseRemarkText(remarkText: string): {
30
32
  text: string
31
33
  }
32
34
  export function formatRemarkText(text: string): string
33
- export function parseRemarkWithImage(text: string, imageUrl?: string): string
34
- export function openQyImagePreview(options: {
35
- url?: string
36
- urlList?: string[]
37
- initialIndex?: number
38
- hideOnClickModal?: boolean
39
- }): {
40
- close(): void
41
- }
35
+ export function parseRemarkWithImage(text: string, imageUrl?: string): string
36
+ export function openQyImagePreview(options: {
37
+ url?: string
38
+ urlList?: string[]
39
+ initialIndex?: number
40
+ hideOnClickModal?: boolean
41
+ }): {
42
+ close(): void
43
+ }
42
44
 
43
45
  declare const _default: Plugin & {
44
46
  install(app: App): void
45
- QyUpload: typeof QyUpload
46
- QyImage: typeof QyImage
47
- QyImagePreview: typeof QyImagePreview
48
- QyImageUpload: typeof QyImageUpload
47
+ QyUpload: typeof QyUpload
48
+ QyImage: typeof QyImage
49
+ QyImagePreview: typeof QyImagePreview
50
+ QyImageUpload: typeof QyImageUpload
49
51
  QyDialog: typeof QyDialog
52
+ QyButton: typeof QyButton
53
+ QyDropdown: typeof QyDropdown
50
54
  QyInput: typeof QyInput
51
55
  QyInputNumber: typeof QyInputNumber
52
- QyMoneyInput: typeof QyMoneyInput
53
- QyDatePicker: typeof QyDatePicker
54
- QyCheckbox: typeof QyCheckbox
55
- QyAutocomplete: typeof QyAutocomplete
56
- QyMenuActions: typeof QyMenuActions
57
- QyTableColumnSettings: typeof QyTableColumnSettings
58
- QyRadioGroup: typeof QyRadioGroup
56
+ QyMoneyInput: typeof QyMoneyInput
57
+ QyDatePicker: typeof QyDatePicker
58
+ QyCheckbox: typeof QyCheckbox
59
+ QyAutocomplete: typeof QyAutocomplete
60
+ QyMenuActions: typeof QyMenuActions
61
+ QyTableColumnSettings: typeof QyTableColumnSettings
62
+ QyRadioGroup: typeof QyRadioGroup
59
63
  QyRemoteSelect: typeof QyRemoteSelect
60
- QySearchInput: typeof QySearchInput
61
- QyRecordQuoteSearch: typeof QyRecordQuoteSearch
62
- QySelect: typeof QySelect
63
- QyTreeSelect: typeof QyTreeSelect
64
- QySelectionDialog: typeof QySelectionDialog
64
+ QySearchInput: typeof QySearchInput
65
+ QyRecordQuoteSearch: typeof QyRecordQuoteSearch
66
+ QySelect: typeof QySelect
67
+ QyTreeSelect: typeof QyTreeSelect
68
+ QySelectionDialog: typeof QySelectionDialog
65
69
  QyLegacySelectionDialog: typeof QyLegacySelectionDialog
66
70
  QyFormSection: typeof QyFormSection
67
71
  QyActionBar: typeof QyActionBar