@dt-frames/ui 1.0.8 → 1.0.9

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/es/index.js CHANGED
@@ -6339,7 +6339,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6339
6339
  var index = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render]]);
6340
6340
  function useFetch(api, baseUrl = "") {
6341
6341
  function fetch(params = {}) {
6342
- let type = "post", header = {}, model = {}, _api = "";
6342
+ let type, header = {}, model = {}, _api = "";
6343
6343
  if (isString(api)) {
6344
6344
  _api = baseUrl + api;
6345
6345
  } else {
@@ -6349,7 +6349,7 @@ function useFetch(api, baseUrl = "") {
6349
6349
  model = api.model;
6350
6350
  }
6351
6351
  return new Promise((resolve, reject) => {
6352
- http[type](_api, Object.assign({}, model, params), {
6352
+ http[type || "post"](_api, Object.assign({}, model, params), {
6353
6353
  ...header,
6354
6354
  ...{ onlyData: false }
6355
6355
  }).then((data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-frames/ui",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "keywords": [
5
5
  "ui",
6
6
  "dt-ui"
@@ -6,7 +6,7 @@ export function useFetch(api: string | ApiType, baseUrl: string = '') {
6
6
  * handleParams 记录返回的值
7
7
  */
8
8
  function fetch(params: Recordable = { }) {
9
- let type = 'post', header = { }, model = {}, _api = ''
9
+ let type, header = { }, model = {}, _api = ''
10
10
  if(isString( api )) {
11
11
  _api = baseUrl + api
12
12
  } else {
@@ -17,7 +17,7 @@ export function useFetch(api: string | ApiType, baseUrl: string = '') {
17
17
  }
18
18
 
19
19
  return new Promise(( resolve, reject ) => {
20
- http[type]( _api, Object.assign({}, model, params), {
20
+ http[type || 'post']( _api, Object.assign({}, model, params), {
21
21
  ...header,
22
22
  ...{ onlyData: false }
23
23
  }).then(
@@ -1,11 +1,9 @@
1
1
  <script lang="tsx">
2
2
  import { getDictValueByCode, isFunction, isObject, Recordable, formatNumber, isVnode } from '@dt-frames/core'
3
3
  import dayjs from 'dayjs'
4
- import { defineComponent, PropType, unref, ref, h, toRaw, render as render1, resolveComponent, resolveDynamicComponent, createVNode } from 'vue'
4
+ import { defineComponent, PropType, unref, ref, render as render1, createVNode, computed } from 'vue'
5
5
  import { BasicColumn } from '../types/table.type'
6
6
 
7
- import { Switch } from 'ant-design-vue'
8
-
9
7
  export default defineComponent({
10
8
  name: 'TableFormat',
11
9
  props: {