@shwfed/config 2.5.1 → 2.5.2
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/module.json +1 -1
- package/dist/preview/assets/{config-DKtPKn2s.js → config-BHInx1QR.js} +1 -1
- package/dist/preview/assets/{config-zxVo1EOM.js → config-BVTakYXq.js} +1 -1
- package/dist/preview/assets/{config-2hrRmW-I.js → config-Bo8qCYUr.js} +1 -1
- package/dist/preview/assets/{config-BsgSoDjY.js → config-CMWb8uI8.js} +1 -1
- package/dist/preview/assets/{config-DdgZWox9.js → config-CoykdrWz.js} +1 -1
- package/dist/preview/assets/{config-nsiwkAq8.js → config-D9Igjtte.js} +1 -1
- package/dist/preview/assets/{config-CaLzEMyt.js → config-DLuQtN-6.js} +1 -1
- package/dist/preview/assets/{config-BfzthOw9.js → config-DO6VRND9.js} +1 -1
- package/dist/preview/assets/{config-h_LH1CT_.js → config-Du8jTCck.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CLpbGZ37.js → definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js} +1 -1
- package/dist/preview/assets/{index-C5dK4QAf.js → index-CLhRphC4.js} +4 -4
- package/dist/preview/assets/index-DRXgXfoM.js +1 -0
- package/dist/preview/assets/{runtime-CEXA5ttw.js → runtime-BVShchDS.js} +1 -1
- package/dist/preview/assets/{runtime-BRWnAaFs.js → runtime-BnXLPPWc.js} +1 -1
- package/dist/preview/assets/{runtime-i3-6DCWP.js → runtime-Bs_EtAsE.js} +1 -1
- package/dist/preview/assets/{runtime-DZqXButD.js → runtime-CCBYA0xX.js} +1 -1
- package/dist/preview/assets/{runtime-BLhH77F7.js → runtime-Cxl0E6Hg.js} +1 -1
- package/dist/preview/assets/{runtime-527oKJb4.js → runtime-D7cNZpnE.js} +1 -1
- package/dist/preview/assets/{runtime-CZZWuLu9.js → runtime-DTC0oZPz.js} +1 -1
- package/dist/preview/assets/{runtime-MJo092Ed.js → runtime-as-8tVjx.js} +1 -1
- package/dist/preview/assets/{runtime-DOLtY37Y.js → runtime-ePHYJvDG.js} +1 -1
- package/dist/preview/index.html +1 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +15 -9
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +19 -10
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/config.vue +19 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +20 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +20 -11
- package/package.json +1 -1
- package/dist/preview/assets/index-C0NJ1FZp.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aO as e}from"./index-CLhRphC4.js";import{aP as r,aQ as s,aR as t}from"./index-CLhRphC4.js";export{r as TableConfig,s as createTableConfig,e as default,t as getColumnTechnicalKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,aq as f,as as r,au as u,e as d,u as m,al as l,am as p,ao as _,o as g}from"./index-
|
|
1
|
+
import{d as i,aq as f,as as r,au as u,e as d,u as m,al as l,am as p,ao as _,o as g}from"./index-CLhRphC4.js";import{_ as h}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";const B=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>l(n,{...p(o),...a}),s=f(()=>r(c(t.config.url),n=>u(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),d(h,{"action-id":e.buttonId,effect:m(s)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";import{d as n,e as a,u as c,o as f,at as i}from"./index-CLhRphC4.js";const _=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(o,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as E,aq as _,af as S,au as r,aE as m,aF as j,aG as v,e as x,u as B,al as L,am as b,ap as k,ao as C,o as R}from"./index-
|
|
1
|
+
import{d as E,aq as _,af as S,au as r,aE as m,aF as j,aG as v,e as x,u as B,al as L,am as b,ap as k,ao as C,o as R}from"./index-CLhRphC4.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";const O=E({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>L(e,{...b(g),...n}),l=k(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=_(()=>S(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}const a={json:yield*u.json()},i=o===void 0?"success":yield*j(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>v[i](s))}if(i==="success"||i==="info"){const h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),x(T,{"action-id":d.buttonId,effect:B(y)},null,8,["action-id","effect"]))}});export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,ae as i,e as l,u as p,$ as m,o as d,k as f,ah as _,ai as k,al as w,am as x,ao as g}from"./index-
|
|
1
|
+
import{d as u,ae as i,e as l,u as p,$ as m,o as d,k as f,ah as _,ai as k,al as w,am as x,ao as g}from"./index-CLhRphC4.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const o=n,{locale:s}=i(),t=g(),c=(e,a)=>w(e,{...x(t),...a}),r=m(()=>{const e=_(o.config.content,s.value)??"";return k(e,c)});return(e,a)=>(d(),l(p(f),{"data-slot":"buttons-markdown",source:r.value,class:"prose prose-sm prose-zinc px-1"},null,8,["source"]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,aq as p,ag as g,ar as a,as as m,ak as l,e as d,u as x,al as E,am as _,an as h,ao as C,ap as k,o as q}from"./index-
|
|
1
|
+
import{d as u,aq as p,ag as g,ar as a,as as m,ak as l,e as d,u as x,al as E,am as _,an as h,ao as C,ap as k,o as q}from"./index-CLhRphC4.js";import{_ as v}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";const R=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(o){const e=o,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=k(),t=h(),f=p(()=>{const n=t?g(()=>t()):a(!0);return m(n,s=>s?l(e.config.expression,i,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}):a(void 0))});return(n,s)=>(q(),d(v,{"action-id":o.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,ae as p,av as x,af as M,ah as c,aw as T,ax as N,e as b,w as d,u,a0 as k,a1 as w,ap as L,au as S,o as A,f as I,ay as z,g as f,az as F,aA as H,a7 as V,ao as $,aB as r,aC as m,aD as j}from"./index-
|
|
1
|
+
import{d as s,ae as p,av as x,af as M,ah as c,aw as T,ax as N,e as b,w as d,u,a0 as k,a1 as w,ap as L,au as S,o as A,f as I,ay as z,g as f,az as F,aA as H,a7 as V,ao as $,aB as r,aC as m,aD as j}from"./index-CLhRphC4.js";import{_ as K}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";const D=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(t){const n=t,{locale:l}=p(),v=e=>{},h=$(),i=w(r,void 0),g=L(),o=k(null),C=x(n.buttonId,{close:()=>S(()=>{o.value?.()})},g),y=s({name:"ModalBoundaryBridge",setup(e,{slots:a}){return H(h),m(j,C),i&&m(r,i),()=>a.default?.()}}),E=(e,a)=>V()?.(e,a),_=M(function*(){const e=c(n.config.modalTitle,l.value)??c(n.buttonTitle,l.value)??"",{modal:a,close:B}=yield*T({title:e,width:n.config.modalWidth});o.value=()=>N(B()),yield*a,o.value=null});return(e,a)=>(A(),b(K,{"action-id":t.buttonId,effect:u(_)},{default:d(()=>[I("div",{style:z(t.config.modalMinHeight?`min-height: ${t.config.modalMinHeight}`:void 0)},[f(u(y),null,{default:d(()=>[f(F,{"slot-value":t.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,aH as g,aq as A,as as y,aE as _,e as h,u as S,al as b,am as j,ap as k,aI as C,o as B,ao as E}from"./index-
|
|
1
|
+
import{d as l,aH as g,aq as A,as as y,aE as _,e as h,u as S,al as b,am as j,ap as k,aI as C,o as B,ao as E}from"./index-CLhRphC4.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),f=(e,t)=>b(e,{...j(i),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=k(),m=C((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return c(e)&&c(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(o.getAt(t),e[t]);o.setAt(t,a)}return _(u,s.config.onSuccess)}));return(e,t)=>(B(),h(I,{"action-id":r.buttonId,effect:S(d)},null,8,["action-id","effect"]))}});export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,ae as u,af as g,ag as m,ah as d,ai as p,aj as x,ak as k,e as E,u as _,al as h,am as w,an as C,ao as I,ap as j,o as v}from"./index-
|
|
1
|
+
import{d as l,ae as u,af as g,ag as m,ah as d,ai as p,aj as x,ak as k,e as E,u as _,al as h,am as w,an as C,ao as I,ap as j,o as v}from"./index-CLhRphC4.js";import{_ as y}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";const q=l({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const e=s,{locale:c}=u(),i=I(),t=(n,o)=>h(n,{...w(i),...o}),r=j(),a=C(),f=g(function*(){if(a&&!(yield*m(()=>a())))return;const n=d(e.config.markdown,c.value)??"",o=p(n,t);(yield*x({content:o,icon:e.config.icon,color:e.config.color}))||(yield*k(e.config.expression,t,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}))});return(n,o)=>(v(),E(y,{"action-id":s.buttonId,effect:_(f)},null,8,["action-id","effect"]))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./definition.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as s}from"./definition.vue_vue_type_script_setup_true_lang-CjPPVjHf.js";import{d as c,aq as o,aE as i,e as r,u as f,ap as u,o as p}from"./index-CLhRphC4.js";const g=c({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(m,d)=>(p(),r(s,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
|
package/dist/preview/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
`--primary`, the primary button variant renders as transparent. */
|
|
11
11
|
body { --primary: #009689; }
|
|
12
12
|
</style>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-CLhRphC4.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-nvAUAYGM.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue
CHANGED
|
@@ -65,7 +65,10 @@ const dateFormatExample = computed(() => {
|
|
|
65
65
|
</template>
|
|
66
66
|
{{ fieldTitle("title") }}
|
|
67
67
|
</FieldLabel>
|
|
68
|
-
<Locale
|
|
68
|
+
<Locale
|
|
69
|
+
:model-value="value.title"
|
|
70
|
+
@update:model-value="(v) => value = { ...value, title: v }"
|
|
71
|
+
/>
|
|
69
72
|
</Field>
|
|
70
73
|
<Field orientation="vertical">
|
|
71
74
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -82,8 +85,9 @@ const dateFormatExample = computed(() => {
|
|
|
82
85
|
{{ fieldTitle("tooltip") }}
|
|
83
86
|
</FieldLabel>
|
|
84
87
|
<Locale
|
|
85
|
-
|
|
88
|
+
:model-value="value.tooltip"
|
|
86
89
|
markdown
|
|
90
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
87
91
|
/>
|
|
88
92
|
</Field>
|
|
89
93
|
</div>
|
|
@@ -103,9 +107,10 @@ const dateFormatExample = computed(() => {
|
|
|
103
107
|
{{ fieldTitle("accessor") }}
|
|
104
108
|
</FieldLabel>
|
|
105
109
|
<Input
|
|
106
|
-
|
|
110
|
+
:model-value="value.accessor"
|
|
107
111
|
placeholder="如 row.joinDate"
|
|
108
112
|
class="font-mono text-xs"
|
|
113
|
+
@update:model-value="(v) => value = { ...value, accessor: v }"
|
|
109
114
|
/>
|
|
110
115
|
</Field>
|
|
111
116
|
<Field orientation="vertical">
|
|
@@ -124,9 +129,10 @@ const dateFormatExample = computed(() => {
|
|
|
124
129
|
</FieldLabel>
|
|
125
130
|
<InputGroup>
|
|
126
131
|
<InputGroupInput
|
|
127
|
-
|
|
132
|
+
:model-value="value.format"
|
|
128
133
|
placeholder="yyyy-MM-dd"
|
|
129
134
|
class="font-mono text-xs"
|
|
135
|
+
@update:model-value="(v) => value = { ...value, format: v }"
|
|
130
136
|
/>
|
|
131
137
|
<InputGroupAddon
|
|
132
138
|
v-if="dateFormatExample"
|
|
@@ -168,7 +174,7 @@ const dateFormatExample = computed(() => {
|
|
|
168
174
|
<DropdownMenuItem
|
|
169
175
|
v-for="opt in ALIGN_OPTIONS"
|
|
170
176
|
:key="opt.value"
|
|
171
|
-
@select="value
|
|
177
|
+
@select="value = { ...value, align: opt.value }"
|
|
172
178
|
>
|
|
173
179
|
<Icon :icon="opt.icon" />
|
|
174
180
|
{{ opt.label }}
|
|
@@ -180,13 +186,13 @@ const dateFormatExample = computed(() => {
|
|
|
180
186
|
:model-value="value.size"
|
|
181
187
|
:disabled="value.grow"
|
|
182
188
|
:min="0"
|
|
183
|
-
@update:model-value="(v) => value
|
|
189
|
+
@update:model-value="(v) => value = { ...value, size: v }"
|
|
184
190
|
/>
|
|
185
191
|
<InputGroupAddon align="inline-end">
|
|
186
192
|
<InputGroupButton
|
|
187
193
|
:variant="value.grow ? 'primary' : 'ghost'"
|
|
188
194
|
size="xs"
|
|
189
|
-
@click="value
|
|
195
|
+
@click="value = { ...value, grow: !value.grow }"
|
|
190
196
|
>
|
|
191
197
|
<Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
|
|
192
198
|
{{ fieldTitle("grow") }}
|
|
@@ -218,13 +224,13 @@ const dateFormatExample = computed(() => {
|
|
|
218
224
|
<InputGroupInput
|
|
219
225
|
:model-value="value.sortKey"
|
|
220
226
|
placeholder="例:created_at"
|
|
221
|
-
@update:model-value="(v) => value
|
|
227
|
+
@update:model-value="(v) => value = { ...value, sortKey: v || void 0 }"
|
|
222
228
|
/>
|
|
223
229
|
<InputGroupAddon align="inline-end">
|
|
224
230
|
<InputGroupButton
|
|
225
231
|
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
226
232
|
size="xs"
|
|
227
|
-
@click="value
|
|
233
|
+
@click="value = { ...value, enableSorting: !value.enableSorting }"
|
|
228
234
|
>
|
|
229
235
|
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
230
236
|
{{ fieldTitle("enableSorting") }}
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue
CHANGED
|
@@ -38,8 +38,12 @@ const currentAlignIcon = computed(
|
|
|
38
38
|
const colorModel = computed({
|
|
39
39
|
get: () => value.value.color ?? "",
|
|
40
40
|
set: (v) => {
|
|
41
|
-
if (v === "")
|
|
42
|
-
|
|
41
|
+
if (v === "") {
|
|
42
|
+
const { color: _drop, ...rest } = value.value;
|
|
43
|
+
value.value = rest;
|
|
44
|
+
} else {
|
|
45
|
+
value.value = { ...value.value, color: v };
|
|
46
|
+
}
|
|
43
47
|
}
|
|
44
48
|
});
|
|
45
49
|
const ROW_VARS = {
|
|
@@ -65,7 +69,10 @@ const ROW_VARS = {
|
|
|
65
69
|
</template>
|
|
66
70
|
{{ fieldTitle("title") }}
|
|
67
71
|
</FieldLabel>
|
|
68
|
-
<Locale
|
|
72
|
+
<Locale
|
|
73
|
+
:model-value="value.title"
|
|
74
|
+
@update:model-value="(v) => value = { ...value, title: v }"
|
|
75
|
+
/>
|
|
69
76
|
</Field>
|
|
70
77
|
<Field orientation="vertical">
|
|
71
78
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -82,8 +89,9 @@ const ROW_VARS = {
|
|
|
82
89
|
{{ fieldTitle("tooltip") }}
|
|
83
90
|
</FieldLabel>
|
|
84
91
|
<Locale
|
|
85
|
-
|
|
92
|
+
:model-value="value.tooltip"
|
|
86
93
|
markdown
|
|
94
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
87
95
|
/>
|
|
88
96
|
</Field>
|
|
89
97
|
</div>
|
|
@@ -103,9 +111,10 @@ const ROW_VARS = {
|
|
|
103
111
|
{{ fieldTitle("accessor") }}
|
|
104
112
|
</FieldLabel>
|
|
105
113
|
<ExpressionEditor
|
|
106
|
-
|
|
114
|
+
:model-value="value.accessor"
|
|
107
115
|
placeholder="如 "fluent:checkmark-circle-20-regular""
|
|
108
116
|
:extra-vars="ROW_VARS"
|
|
117
|
+
@update:model-value="(v) => value = { ...value, accessor: v }"
|
|
109
118
|
/>
|
|
110
119
|
</Field>
|
|
111
120
|
<Field orientation="vertical">
|
|
@@ -138,7 +147,7 @@ const ROW_VARS = {
|
|
|
138
147
|
<DropdownMenuItem
|
|
139
148
|
v-for="opt in ALIGN_OPTIONS"
|
|
140
149
|
:key="opt.value"
|
|
141
|
-
@select="value
|
|
150
|
+
@select="value = { ...value, align: opt.value }"
|
|
142
151
|
>
|
|
143
152
|
<Icon :icon="opt.icon" />
|
|
144
153
|
{{ opt.label }}
|
|
@@ -150,13 +159,13 @@ const ROW_VARS = {
|
|
|
150
159
|
:model-value="value.size"
|
|
151
160
|
:disabled="value.grow"
|
|
152
161
|
:min="0"
|
|
153
|
-
@update:model-value="(v) => value
|
|
162
|
+
@update:model-value="(v) => value = { ...value, size: v }"
|
|
154
163
|
/>
|
|
155
164
|
<InputGroupAddon align="inline-end">
|
|
156
165
|
<InputGroupButton
|
|
157
166
|
:variant="value.grow ? 'primary' : 'ghost'"
|
|
158
167
|
size="xs"
|
|
159
|
-
@click="value
|
|
168
|
+
@click="value = { ...value, grow: !value.grow }"
|
|
160
169
|
>
|
|
161
170
|
<Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
|
|
162
171
|
{{ fieldTitle("grow") }}
|
|
@@ -209,13 +218,13 @@ const ROW_VARS = {
|
|
|
209
218
|
<InputGroupInput
|
|
210
219
|
:model-value="value.sortKey"
|
|
211
220
|
placeholder="例:created_at"
|
|
212
|
-
@update:model-value="(v) => value
|
|
221
|
+
@update:model-value="(v) => value = { ...value, sortKey: v || void 0 }"
|
|
213
222
|
/>
|
|
214
223
|
<InputGroupAddon align="inline-end">
|
|
215
224
|
<InputGroupButton
|
|
216
225
|
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
217
226
|
size="xs"
|
|
218
|
-
@click="value
|
|
227
|
+
@click="value = { ...value, enableSorting: !value.enableSorting }"
|
|
219
228
|
>
|
|
220
229
|
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
221
230
|
{{ fieldTitle("enableSorting") }}
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/config.vue
CHANGED
|
@@ -36,8 +36,12 @@ const currentAlignIcon = computed(
|
|
|
36
36
|
const copyExpressionModel = computed({
|
|
37
37
|
get: () => value.value.copyExpression ?? "",
|
|
38
38
|
set: (v) => {
|
|
39
|
-
if (v === "")
|
|
40
|
-
|
|
39
|
+
if (v === "") {
|
|
40
|
+
const { copyExpression: _drop, ...rest } = value.value;
|
|
41
|
+
value.value = rest;
|
|
42
|
+
} else {
|
|
43
|
+
value.value = { ...value.value, copyExpression: v };
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
});
|
|
43
47
|
</script>
|
|
@@ -59,7 +63,10 @@ const copyExpressionModel = computed({
|
|
|
59
63
|
</template>
|
|
60
64
|
{{ fieldTitle("title") }}
|
|
61
65
|
</FieldLabel>
|
|
62
|
-
<Locale
|
|
66
|
+
<Locale
|
|
67
|
+
:model-value="value.title"
|
|
68
|
+
@update:model-value="(v) => value = { ...value, title: v }"
|
|
69
|
+
/>
|
|
63
70
|
</Field>
|
|
64
71
|
<Field orientation="vertical">
|
|
65
72
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -76,8 +83,9 @@ const copyExpressionModel = computed({
|
|
|
76
83
|
{{ fieldTitle("tooltip") }}
|
|
77
84
|
</FieldLabel>
|
|
78
85
|
<Locale
|
|
79
|
-
|
|
86
|
+
:model-value="value.tooltip"
|
|
80
87
|
markdown
|
|
88
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
81
89
|
/>
|
|
82
90
|
</Field>
|
|
83
91
|
</div>
|
|
@@ -112,7 +120,7 @@ const copyExpressionModel = computed({
|
|
|
112
120
|
<DropdownMenuItem
|
|
113
121
|
v-for="opt in ALIGN_OPTIONS"
|
|
114
122
|
:key="opt.value"
|
|
115
|
-
@select="value
|
|
123
|
+
@select="value = { ...value, align: opt.value }"
|
|
116
124
|
>
|
|
117
125
|
<Icon :icon="opt.icon" />
|
|
118
126
|
{{ opt.label }}
|
|
@@ -124,13 +132,13 @@ const copyExpressionModel = computed({
|
|
|
124
132
|
:model-value="value.size"
|
|
125
133
|
:disabled="value.grow"
|
|
126
134
|
:min="0"
|
|
127
|
-
@update:model-value="(v) => value
|
|
135
|
+
@update:model-value="(v) => value = { ...value, size: v }"
|
|
128
136
|
/>
|
|
129
137
|
<InputGroupAddon align="inline-end">
|
|
130
138
|
<InputGroupButton
|
|
131
139
|
:variant="value.grow ? 'primary' : 'ghost'"
|
|
132
140
|
size="xs"
|
|
133
|
-
@click="value
|
|
141
|
+
@click="value = { ...value, grow: !value.grow }"
|
|
134
142
|
>
|
|
135
143
|
<Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
|
|
136
144
|
{{ fieldTitle("grow") }}
|
|
@@ -174,7 +182,10 @@ const copyExpressionModel = computed({
|
|
|
174
182
|
</template>
|
|
175
183
|
{{ fieldTitle("markdown") }}
|
|
176
184
|
</FieldLabel>
|
|
177
|
-
<Locale
|
|
185
|
+
<Locale
|
|
186
|
+
:model-value="value.markdown"
|
|
187
|
+
@update:model-value="(v) => value = { ...value, markdown: v }"
|
|
188
|
+
/>
|
|
178
189
|
</Field>
|
|
179
190
|
</div>
|
|
180
191
|
</template>
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue
CHANGED
|
@@ -56,12 +56,13 @@ const currentPreserveModeLabel = computed(
|
|
|
56
56
|
() => PRESERVE_MODE_OPTIONS.find((o) => o.value === (value.value.preserveMode ?? "round"))?.label
|
|
57
57
|
);
|
|
58
58
|
function onPreserveDigitsChange(v) {
|
|
59
|
-
value.value
|
|
59
|
+
const next = { ...value.value, preserveDigits: v };
|
|
60
60
|
if (v === void 0) {
|
|
61
|
-
|
|
62
|
-
} else if (
|
|
63
|
-
|
|
61
|
+
next.preserveMode = void 0;
|
|
62
|
+
} else if (next.preserveMode === void 0) {
|
|
63
|
+
next.preserveMode = "round";
|
|
64
64
|
}
|
|
65
|
+
value.value = next;
|
|
65
66
|
}
|
|
66
67
|
</script>
|
|
67
68
|
|
|
@@ -82,7 +83,10 @@ function onPreserveDigitsChange(v) {
|
|
|
82
83
|
</template>
|
|
83
84
|
{{ fieldTitle("title") }}
|
|
84
85
|
</FieldLabel>
|
|
85
|
-
<Locale
|
|
86
|
+
<Locale
|
|
87
|
+
:model-value="value.title"
|
|
88
|
+
@update:model-value="(v) => value = { ...value, title: v }"
|
|
89
|
+
/>
|
|
86
90
|
</Field>
|
|
87
91
|
<Field orientation="vertical">
|
|
88
92
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -99,8 +103,9 @@ function onPreserveDigitsChange(v) {
|
|
|
99
103
|
{{ fieldTitle("tooltip") }}
|
|
100
104
|
</FieldLabel>
|
|
101
105
|
<Locale
|
|
102
|
-
|
|
106
|
+
:model-value="value.tooltip"
|
|
103
107
|
markdown
|
|
108
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
104
109
|
/>
|
|
105
110
|
</Field>
|
|
106
111
|
</div>
|
|
@@ -120,9 +125,10 @@ function onPreserveDigitsChange(v) {
|
|
|
120
125
|
{{ fieldTitle("accessor") }}
|
|
121
126
|
</FieldLabel>
|
|
122
127
|
<Input
|
|
123
|
-
|
|
128
|
+
:model-value="value.accessor"
|
|
124
129
|
placeholder="如 row.salary"
|
|
125
130
|
class="font-mono text-xs"
|
|
131
|
+
@update:model-value="(v) => value = { ...value, accessor: v }"
|
|
126
132
|
/>
|
|
127
133
|
</Field>
|
|
128
134
|
<Field orientation="vertical">
|
|
@@ -155,7 +161,7 @@ function onPreserveDigitsChange(v) {
|
|
|
155
161
|
<DropdownMenuItem
|
|
156
162
|
v-for="opt in ALIGN_OPTIONS"
|
|
157
163
|
:key="opt.value"
|
|
158
|
-
@select="value
|
|
164
|
+
@select="value = { ...value, align: opt.value }"
|
|
159
165
|
>
|
|
160
166
|
<Icon :icon="opt.icon" />
|
|
161
167
|
{{ opt.label }}
|
|
@@ -167,13 +173,13 @@ function onPreserveDigitsChange(v) {
|
|
|
167
173
|
:model-value="value.size"
|
|
168
174
|
:disabled="value.grow"
|
|
169
175
|
:min="0"
|
|
170
|
-
@update:model-value="(v) => value
|
|
176
|
+
@update:model-value="(v) => value = { ...value, size: v }"
|
|
171
177
|
/>
|
|
172
178
|
<InputGroupAddon align="inline-end">
|
|
173
179
|
<InputGroupButton
|
|
174
180
|
:variant="value.grow ? 'primary' : 'ghost'"
|
|
175
181
|
size="xs"
|
|
176
|
-
@click="value
|
|
182
|
+
@click="value = { ...value, grow: !value.grow }"
|
|
177
183
|
>
|
|
178
184
|
<Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
|
|
179
185
|
{{ fieldTitle("grow") }}
|
|
@@ -197,7 +203,7 @@ function onPreserveDigitsChange(v) {
|
|
|
197
203
|
</FieldLabel>
|
|
198
204
|
<Select
|
|
199
205
|
:model-value="value.displayMode ?? 'plain'"
|
|
200
|
-
@update:model-value="(v) => value
|
|
206
|
+
@update:model-value="(v) => value = { ...value, displayMode: v }"
|
|
201
207
|
>
|
|
202
208
|
<SelectTrigger class="w-full">
|
|
203
209
|
<SelectValue />
|
|
@@ -254,7 +260,7 @@ function onPreserveDigitsChange(v) {
|
|
|
254
260
|
<DropdownMenuItem
|
|
255
261
|
v-for="opt in PRESERVE_MODE_OPTIONS"
|
|
256
262
|
:key="opt.value"
|
|
257
|
-
@select="value
|
|
263
|
+
@select="value = { ...value, preserveMode: opt.value }"
|
|
258
264
|
>
|
|
259
265
|
{{ opt.label }}
|
|
260
266
|
</DropdownMenuItem>
|
|
@@ -287,13 +293,13 @@ function onPreserveDigitsChange(v) {
|
|
|
287
293
|
<InputGroupInput
|
|
288
294
|
:model-value="value.sortKey"
|
|
289
295
|
placeholder="例:created_at"
|
|
290
|
-
@update:model-value="(v) => value
|
|
296
|
+
@update:model-value="(v) => value = { ...value, sortKey: v || void 0 }"
|
|
291
297
|
/>
|
|
292
298
|
<InputGroupAddon align="inline-end">
|
|
293
299
|
<InputGroupButton
|
|
294
300
|
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
295
301
|
size="xs"
|
|
296
|
-
@click="value
|
|
302
|
+
@click="value = { ...value, enableSorting: !value.enableSorting }"
|
|
297
303
|
>
|
|
298
304
|
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
299
305
|
{{ fieldTitle("enableSorting") }}
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue
CHANGED
|
@@ -50,8 +50,12 @@ const DISPLAY_MODE_OPTIONS = [
|
|
|
50
50
|
const copyExpressionModel = computed({
|
|
51
51
|
get: () => value.value.copyExpression ?? "",
|
|
52
52
|
set: (v) => {
|
|
53
|
-
if (v === "")
|
|
54
|
-
|
|
53
|
+
if (v === "") {
|
|
54
|
+
const { copyExpression: _drop, ...rest } = value.value;
|
|
55
|
+
value.value = rest;
|
|
56
|
+
} else {
|
|
57
|
+
value.value = { ...value.value, copyExpression: v };
|
|
58
|
+
}
|
|
55
59
|
}
|
|
56
60
|
});
|
|
57
61
|
</script>
|
|
@@ -73,7 +77,10 @@ const copyExpressionModel = computed({
|
|
|
73
77
|
</template>
|
|
74
78
|
{{ fieldTitle("title") }}
|
|
75
79
|
</FieldLabel>
|
|
76
|
-
<Locale
|
|
80
|
+
<Locale
|
|
81
|
+
:model-value="value.title"
|
|
82
|
+
@update:model-value="(v) => value = { ...value, title: v }"
|
|
83
|
+
/>
|
|
77
84
|
</Field>
|
|
78
85
|
<Field orientation="vertical">
|
|
79
86
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -90,8 +97,9 @@ const copyExpressionModel = computed({
|
|
|
90
97
|
{{ fieldTitle("tooltip") }}
|
|
91
98
|
</FieldLabel>
|
|
92
99
|
<Locale
|
|
93
|
-
|
|
100
|
+
:model-value="value.tooltip"
|
|
94
101
|
markdown
|
|
102
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
95
103
|
/>
|
|
96
104
|
</Field>
|
|
97
105
|
</div>
|
|
@@ -111,9 +119,10 @@ const copyExpressionModel = computed({
|
|
|
111
119
|
{{ fieldTitle("accessor") }}
|
|
112
120
|
</FieldLabel>
|
|
113
121
|
<Input
|
|
114
|
-
|
|
122
|
+
:model-value="value.accessor"
|
|
115
123
|
placeholder="如 row.user.name"
|
|
116
124
|
class="font-mono text-xs"
|
|
125
|
+
@update:model-value="(v) => value = { ...value, accessor: v }"
|
|
117
126
|
/>
|
|
118
127
|
</Field>
|
|
119
128
|
<Field orientation="vertical">
|
|
@@ -146,7 +155,7 @@ const copyExpressionModel = computed({
|
|
|
146
155
|
<DropdownMenuItem
|
|
147
156
|
v-for="opt in ALIGN_OPTIONS"
|
|
148
157
|
:key="opt.value"
|
|
149
|
-
@select="value
|
|
158
|
+
@select="value = { ...value, align: opt.value }"
|
|
150
159
|
>
|
|
151
160
|
<Icon :icon="opt.icon" />
|
|
152
161
|
{{ opt.label }}
|
|
@@ -158,13 +167,13 @@ const copyExpressionModel = computed({
|
|
|
158
167
|
:model-value="value.size"
|
|
159
168
|
:disabled="value.grow"
|
|
160
169
|
:min="0"
|
|
161
|
-
@update:model-value="(v) => value
|
|
170
|
+
@update:model-value="(v) => value = { ...value, size: v }"
|
|
162
171
|
/>
|
|
163
172
|
<InputGroupAddon align="inline-end">
|
|
164
173
|
<InputGroupButton
|
|
165
174
|
:variant="value.grow ? 'primary' : 'ghost'"
|
|
166
175
|
size="xs"
|
|
167
|
-
@click="value
|
|
176
|
+
@click="value = { ...value, grow: !value.grow }"
|
|
168
177
|
>
|
|
169
178
|
<Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
|
|
170
179
|
{{ fieldTitle("grow") }}
|
|
@@ -209,7 +218,7 @@ const copyExpressionModel = computed({
|
|
|
209
218
|
</FieldLabel>
|
|
210
219
|
<Select
|
|
211
220
|
:model-value="value.displayMode ?? 'plain'"
|
|
212
|
-
@update:model-value="(v) => value
|
|
221
|
+
@update:model-value="(v) => value = { ...value, displayMode: v }"
|
|
213
222
|
>
|
|
214
223
|
<SelectTrigger class="w-full">
|
|
215
224
|
<SelectValue />
|
|
@@ -249,13 +258,13 @@ const copyExpressionModel = computed({
|
|
|
249
258
|
<InputGroupInput
|
|
250
259
|
:model-value="value.sortKey"
|
|
251
260
|
placeholder="例:created_at"
|
|
252
|
-
@update:model-value="(v) => value
|
|
261
|
+
@update:model-value="(v) => value = { ...value, sortKey: v || void 0 }"
|
|
253
262
|
/>
|
|
254
263
|
<InputGroupAddon align="inline-end">
|
|
255
264
|
<InputGroupButton
|
|
256
265
|
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
257
266
|
size="xs"
|
|
258
|
-
@click="value
|
|
267
|
+
@click="value = { ...value, enableSorting: !value.enableSorting }"
|
|
259
268
|
>
|
|
260
269
|
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
261
270
|
{{ fieldTitle("enableSorting") }}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aO as e}from"./index-C5dK4QAf.js";import{aP as r,aQ as s,aR as t}from"./index-C5dK4QAf.js";export{r as TableConfig,s as createTableConfig,e as default,t as getColumnTechnicalKey};
|