xianniu-ui 0.3.12 → 0.3.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -109,9 +109,7 @@
109
109
  ></el-table-column>
110
110
  <el-table-column v-bind="$attrs" v-if="radio" width="40px" align="center">
111
111
  <template slot-scope="{ row }">
112
- <el-radio
113
- v-model="radioSelected"
114
- :label="row[idKey]"
112
+ <el-radio v-model="radioSelected" :label="row[idKey]"
115
113
  >&nbsp;</el-radio
116
114
  >
117
115
  </template>
@@ -122,10 +120,15 @@
122
120
  v-if="index && data.length"
123
121
  type="index"
124
122
  ></el-table-column>
125
-
126
- <template v-for="(item, idx) in columns">
127
- <column :key="idx" v-if="item.checked === true" v-bind="item"></column>
128
- </template>
123
+ <slot>
124
+ <template v-for="(item, idx) in columns">
125
+ <column
126
+ :key="idx"
127
+ v-if="item.checked === true"
128
+ v-bind="item"
129
+ ></column>
130
+ </template>
131
+ </slot>
129
132
  </el-table>
130
133
 
131
134
  <template v-if="!$utils.isEmpty(page)">
package/src/index.js CHANGED
@@ -12,7 +12,6 @@ import XnTree from '../packages/tree/index'
12
12
  import XnImport from '../packages/import/index'
13
13
  import XnExport from '../packages/export/index'
14
14
  import XnFooter from '../packages/footer/index'
15
- import XnDownload from '../packages/download/index'
16
15
 
17
16
  import Utils from 'xn-ui/src/utils/index'
18
17
  const doc = 'http://lzwr.gitee.io/xn-ui/#/'
@@ -29,8 +28,7 @@ const components = [
29
28
  XnTree,
30
29
  XnImport,
31
30
  XnExport,
32
- XnFooter,
33
- XnDownload
31
+ XnFooter
34
32
  ]
35
33
  const version = require('../package.json').version
36
34
  if (process.env.NODE_ENV && process.env.NODE_ENV === 'development') {
@@ -1,7 +0,0 @@
1
- import XnDownload from './main.vue'
2
-
3
- XnDownload.install = function (Vue) {
4
- Vue.component(XnDownload.name, XnDownload)
5
- }
6
-
7
- export default XnDownload
@@ -1,47 +0,0 @@
1
- <template>
2
- <el-link type="primary" icon="el-icon-download" @click="onDownload">{{
3
- name
4
- }}</el-link>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: "XnDownload",
10
- props: {
11
- url: {
12
- type: String,
13
- // default: "https://xianniu-file.oss-cn-beijing.aliyuncs.com/2022/10/28/a8b0cdfb63ce4a60981f4f5693f136a2.pdf",
14
- default:
15
- "https://xianniu-file.oss-cn-beijing.aliyuncs.com/2022/10/19/b2fc8900eac145a48d6f0b93ef1665fa.jpg",
16
- },
17
- name: {
18
- type: String,
19
- default: "下载文件1",
20
- },
21
- },
22
- created() {
23
- const arr = [{ num: 0.1 }, { num: 0.2 }];
24
- console.log("aaaaa", this.$math.sub(arr, "num"));
25
- console.log("aaaaa", this.$math.add(1, 2, 3, 4, 5, 345, 2, 23, 324, 5));
26
- },
27
- methods: {
28
- onDownload() {
29
- return new Promise((res, rej) => {
30
- try {
31
- const config = {
32
- url: this.url,
33
- name: this.name,
34
- };
35
- this.$utils.download(config);
36
- res();
37
- } catch (error) {
38
- rej();
39
- }
40
- });
41
- },
42
- },
43
- };
44
- </script>
45
-
46
- <style>
47
- </style>