sun-biz 0.0.4-beta.14 → 0.0.4-beta.15

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.
@@ -3,3 +3,4 @@ export { default as FlagSelect } from './flag-select/index.vue';
3
3
  export { default as HospitalSelect } from './hospital-select/index.vue';
4
4
  export { default as TagSelect } from './tag-select/index.vue';
5
5
  export { default as UserSelect } from './user-select/index.vue';
6
+ export type { TagGroupInfo } from './tag-select/api.ts';
@@ -5,7 +5,7 @@ interface TagInfo {
5
5
  tagId: string;
6
6
  tagNameDisplay: string;
7
7
  sort: number;
8
- tagList?: {
8
+ tagCssList?: {
9
9
  tagCssId: string;
10
10
  cssTypeCode: string;
11
11
  cssTypeDesc: string;
@@ -4517,6 +4517,7 @@ const TAG_MARGIN = 1; // 1rem
4517
4517
  bizId: {
4518
4518
  default: ''
4519
4519
  },
4520
+ tagList: {},
4520
4521
  disabled: {
4521
4522
  type: Boolean,
4522
4523
  default: false
@@ -4533,7 +4534,7 @@ const TAG_MARGIN = 1; // 1rem
4533
4534
  const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
4534
4535
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
4535
4536
  const props = __props;
4536
- const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
4537
+ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
4537
4538
  const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
4538
4539
  const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
4539
4540
  const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
@@ -4551,8 +4552,8 @@ const TAG_MARGIN = 1; // 1rem
4551
4552
  group.tagList.forEach((tag)=>{
4552
4553
  map.set(tag.tagId, {
4553
4554
  tagNameDisplay: tag.tagNameDisplay,
4554
- background: (tag?.tagList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
4555
- color: (tag?.tagList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
4555
+ background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
4556
+ color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
4556
4557
  });
4557
4558
  });
4558
4559
  });
@@ -4633,6 +4634,7 @@ const TAG_MARGIN = 1; // 1rem
4633
4634
  selectVisible.value = false;
4634
4635
  };
4635
4636
  async function fetchData() {
4637
+ if (!props.bizIdTypeCode) return;
4636
4638
  loading.value = true;
4637
4639
  let [, result] = await queryTagGroupByExampleV1({
4638
4640
  bizIdTypeCode: props.bizIdTypeCode,
@@ -4658,6 +4660,9 @@ const TAG_MARGIN = 1; // 1rem
4658
4660
  if (containerRef.value) calcMaxNum(containerRef.value);
4659
4661
  }
4660
4662
  });
4663
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
4664
+ tableData.value = props.tagList || [];
4665
+ });
4661
4666
  /**
4662
4667
  *
4663
4668
  * @param value 下拉框选择
@@ -4680,6 +4685,10 @@ const TAG_MARGIN = 1; // 1rem
4680
4685
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
4681
4686
  ] : []).slice(0, realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
4682
4687
  key: item,
4688
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
4689
+ background: allTagsMap.value.get(item)?.background,
4690
+ color: allTagsMap.value.get(item)?.color
4691
+ }),
4683
4692
  closable: !props.disabled,
4684
4693
  class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
4685
4694
  'mr-4'
@@ -4693,6 +4702,7 @@ const TAG_MARGIN = 1; // 1rem
4693
4702
  ]),
4694
4703
  _: 2
4695
4704
  }, 1032, [
4705
+ "style",
4696
4706
  "closable",
4697
4707
  "size",
4698
4708
  "onClose"
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './components/print/index.ts';
6
6
  export * from './components/invoice/index.ts';
7
7
  export { Title } from './components/title';
8
8
  export { DictSelect, FlagSelect, HospitalSelect, TagSelect, UserSelect, } from './components/biz-select';
9
+ export type { TagGroupInfo } from './components/biz-select';
9
10
  export { CopyTextWithTooltip } from './components/copy-text-with-tooltip';
10
11
  export { FormDesignRender } from './components/form-design-render';
11
12
  export { ProDialog } from './components/pro-dialog';
package/dist/index.js CHANGED
@@ -5009,6 +5009,7 @@ const TAG_MARGIN = 1; // 1rem
5009
5009
  bizId: {
5010
5010
  default: ''
5011
5011
  },
5012
+ tagList: {},
5012
5013
  disabled: {
5013
5014
  type: Boolean,
5014
5015
  default: false
@@ -5025,7 +5026,7 @@ const TAG_MARGIN = 1; // 1rem
5025
5026
  const attrs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs)();
5026
5027
  const loading = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(true);
5027
5028
  const props = __props;
5028
- const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
5029
+ const tableData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(props.tagList || []);
5029
5030
  const selectValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)('');
5030
5031
  const selectVisible = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
5031
5032
  const SelectRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
@@ -5043,8 +5044,8 @@ const TAG_MARGIN = 1; // 1rem
5043
5044
  group.tagList.forEach((tag)=>{
5044
5045
  map.set(tag.tagId, {
5045
5046
  tagNameDisplay: tag.tagNameDisplay,
5046
- background: (tag?.tagList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
5047
- color: (tag?.tagList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
5047
+ background: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === BACKGROUND_COLOR)?.cssValue || '',
5048
+ color: (tag?.tagCssList || []).find((item)=>item.cssTypeCode === FONT_COLOR)?.cssValue || ''
5048
5049
  });
5049
5050
  });
5050
5051
  });
@@ -5125,6 +5126,7 @@ const TAG_MARGIN = 1; // 1rem
5125
5126
  selectVisible.value = false;
5126
5127
  };
5127
5128
  async function fetchData() {
5129
+ if (!props.bizIdTypeCode) return;
5128
5130
  loading.value = true;
5129
5131
  let [, result] = await queryTagGroupByExampleV1({
5130
5132
  bizIdTypeCode: props.bizIdTypeCode,
@@ -5150,6 +5152,9 @@ const TAG_MARGIN = 1; // 1rem
5150
5152
  if (containerRef.value) calcMaxNum(containerRef.value);
5151
5153
  }
5152
5154
  });
5155
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.tagList, ()=>{
5156
+ tableData.value = props.tagList || [];
5157
+ });
5153
5158
  /**
5154
5159
  *
5155
5160
  * @param value 下拉框选择
@@ -5172,6 +5177,10 @@ const TAG_MARGIN = 1; // 1rem
5172
5177
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(attrs).modelValue
5173
5178
  ] : []).slice(0, realMaxNum.value), (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTag), {
5174
5179
  key: item,
5180
+ style: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeStyle)({
5181
+ background: allTagsMap.value.get(item)?.background,
5182
+ color: allTagsMap.value.get(item)?.color
5183
+ }),
5175
5184
  closable: !props.disabled,
5176
5185
  class: (0, __WEBPACK_EXTERNAL_MODULE_vue__.normalizeClass)([
5177
5186
  'mr-4'
@@ -5185,6 +5194,7 @@ const TAG_MARGIN = 1; // 1rem
5185
5194
  ]),
5186
5195
  _: 2
5187
5196
  }, 1032, [
5197
+ "style",
5188
5198
  "closable",
5189
5199
  "size",
5190
5200
  "onClose"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.4-beta.14",
3
+ "version": "0.0.4-beta.15",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  "src/*",