ol-base-components 0.1.5 → 0.1.7

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": "ol-base-components",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <div id="app">
3
- <div>1111</div>
4
3
  <MyTable
5
4
  :paginations="paginations"
6
5
  :empty-img="tableData.emptyImg"
@@ -11,22 +10,14 @@
11
10
  @handleSizeChange="handleSizeChange"
12
11
  @handleindexChange="handleindexChange"
13
12
  ></MyTable>
14
- <el-button>默认按钮</el-button>
15
- <el-button type="primary">主要按钮</el-button>
16
- <el-button type="success">成功按钮</el-button>
17
- <el-button type="info">信息按钮</el-button>
18
- <el-button type="warning">警告按钮</el-button>
19
- <el-button type="danger">危险按钮</el-button>
20
13
  </div>
21
14
  </template>
22
15
 
23
16
  <script>
24
- // import HelloWorld from "./components/HelloWorld.vue";
25
17
  import MyTable from "@/package/table/src/index.vue";
26
18
  export default {
27
19
  name: "App",
28
20
  components: {
29
- // HelloWorld,
30
21
  MyTable,
31
22
  },
32
23
  data() {
@@ -3,19 +3,12 @@ import OlTable from "./table";
3
3
  const components = [OlTable];
4
4
 
5
5
  const install = function (Vue) {
6
- // 判断是否安装
7
- if (install.installed) {
8
- return;
9
- }
10
6
  // 遍历所有组件
11
7
  components.map((item) => {
12
- Vue.component(item.name, item);
8
+ Vue.component(`ol-${item.name}`, item);
13
9
  });
14
10
  };
15
11
  // 判断是否引入文件
16
- if (typeof window !== "undefined" && window.Vue) {
17
- install(window.Vue);
18
- }
19
12
  export default {
20
13
  install,
21
14
  ...components,
@@ -169,7 +169,7 @@
169
169
 
170
170
  </el-table-column>
171
171
  <div slot="empty" class="empty">
172
- <img v-if="tableData.rows.length == 0" :src="require('@/assets/nodata.jpg')" />
172
+ <img v-if="tableData.rows.length == 0" :src="nodata" />
173
173
  </div>
174
174
  </el-table>
175
175
  </div>
@@ -213,8 +213,9 @@
213
213
  </template>
214
214
  <script>
215
215
  import printTemplate from "./printTable.vue";
216
-
216
+ import nodata from "./nodata.jpg";
217
217
  export default {
218
+ name: "table",
218
219
  components: {
219
220
  printTemplate,
220
221
  // 函数式组件注册
@@ -316,6 +317,7 @@ export default {
316
317
  },
317
318
  data() {
318
319
  return {
320
+ nodata,
319
321
  tableRef: this.tableData.tableRef || "tableRef", // ref
320
322
  toggleRowFlage: this.tableData.toggleRowFlage || false, // 点击行高亮select标识
321
323
  // screenWidth: 0,
@@ -1,58 +0,0 @@
1
- <template>
2
- <div class="hello">
3
- <h1>{{ msg }}</h1>
4
- <p>
5
- For a guide and recipes on how to configure / customize this project,<br>
6
- check out the
7
- <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8
- </p>
9
- <h3>Installed CLI Plugins</h3>
10
- <ul>
11
- <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
12
- <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
13
- </ul>
14
- <h3>Essential Links</h3>
15
- <ul>
16
- <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
17
- <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
18
- <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
19
- <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
20
- <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
21
- </ul>
22
- <h3>Ecosystem</h3>
23
- <ul>
24
- <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
25
- <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
26
- <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
27
- <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
28
- <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
29
- </ul>
30
- </div>
31
- </template>
32
-
33
- <script>
34
- export default {
35
- name: 'HelloWorld',
36
- props: {
37
- msg: String
38
- }
39
- }
40
- </script>
41
-
42
- <!-- Add "scoped" attribute to limit CSS to this component only -->
43
- <style scoped>
44
- h3 {
45
- margin: 40px 0 0;
46
- }
47
- ul {
48
- list-style-type: none;
49
- padding: 0;
50
- }
51
- li {
52
- display: inline-block;
53
- margin: 0 10px;
54
- }
55
- a {
56
- color: #42b983;
57
- }
58
- </style>
File without changes