@toolspack/ttd-common 0.2.1 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolspack/ttd-common",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "main": "lib/ttd-common.umd.min.js",
6
6
  "scripts": {
@@ -18,7 +18,10 @@
18
18
  "less": "^3.8.1",
19
19
  "less-loader": "^4.1.0",
20
20
  "pdfjs-dist": "^2.2.228",
21
- "vue": "^2.6.11"
21
+ "node-sass": "^4.14.1",
22
+ "sass-loader": "^10.1.0",
23
+ "vue": "^2.6.11",
24
+ "vue-router": "^3.5.3"
22
25
  },
23
26
  "devDependencies": {
24
27
  "@vue/cli-plugin-babel": "~4.5.0",
@@ -28,10 +31,10 @@
28
31
  "babel-eslint": "^10.1.0",
29
32
  "babel-preset-es2015": "^6.24.1",
30
33
  "eslint": "^6.7.2",
31
- "vue-template-compiler": "^2.6.11",
32
34
  "eslint-plugin-import": "^2.22.1",
33
35
  "eslint-plugin-node": "^11.1.0",
34
36
  "eslint-plugin-promise": "^4.2.1",
35
- "eslint-plugin-vue": "^6.2.2"
37
+ "eslint-plugin-vue": "^6.2.2",
38
+ "vue-template-compiler": "^2.6.11"
36
39
  }
37
40
  }
package/src/App.vue CHANGED
@@ -2,6 +2,8 @@
2
2
  <div id="app">
3
3
  <el-button @click="viewImg">预览</el-button>
4
4
  <img :src="pdfurl+'&w=120'" />
5
+ <router-link to="/about">Go to Foo</router-link>
6
+ <router-view></router-view>
5
7
  </div>
6
8
  </template>
7
9
 
package/src/main.js CHANGED
@@ -6,6 +6,14 @@ import vkUI from './packages/index'
6
6
 
7
7
  import hevueImgPreview from './packages/img-view' // 引入
8
8
 
9
+ import router from './router/route'
10
+
11
+ // import './styles/element-variables.scss'
12
+ // import './styles/common.less'
13
+ // import './styles/common.scss'
14
+
15
+ import 'element-ui/lib/theme-chalk/index.css';
16
+
9
17
  Vue.config.productionTip = false;
10
18
  // import 'babel-polyfill'
11
19
  Vue.use(hevueImgPreview)
@@ -15,5 +23,6 @@ Vue.use(vkUI) // 注册
15
23
  Vue.use(EUI, { zIndex: 3000 })
16
24
 
17
25
  new Vue({
26
+ router,
18
27
  render: (h) => h(App),
19
28
  }).$mount('#app');
@@ -375,6 +375,7 @@ export default {
375
375
  console.log('OnClickPoint--', `nPageNo=${nPageNo}, x=${x}, y=${y}`);
376
376
  try {
377
377
  this.PDFCtrl.SignFile_KeyImage(nPageNo, x, y);
378
+ this.$emit('cfca-point', nPageNo, x, y)
378
379
  } catch (e) {
379
380
  const LastErrorDesc = this.PDFCtrl.GetLastErrorDesc();
380
381
  alert(LastErrorDesc);
@@ -30,7 +30,7 @@ if (typeof window !== 'undefined' && window.Vue) {
30
30
 
31
31
  export default {
32
32
  // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
33
- version: '0.1.9',
33
+ version: '0.2.2',
34
34
  install,
35
35
  // 以下是具体的组件列表
36
36
  TtdLabelMake,
@@ -6,7 +6,7 @@
6
6
  class="el-menu-vertical-demo title-con"
7
7
  menu-trigger="click"
8
8
  >
9
- <template v-for="(item, index) in opreaConfig">
9
+ <template v-for="(item, index) in operateConfig">
10
10
  <el-submenu :index="''+index" :key="index">
11
11
  <template slot="title">
12
12
  <span>{{item.typeName}}</span>
@@ -36,7 +36,7 @@
36
36
  export default {
37
37
  name: 'TtdLabelOperate',
38
38
  props: {
39
- opreaConfig: {
39
+ operateConfig: {
40
40
  // 可以打的标签
41
41
  type: [Array],
42
42
  default: () => [],
@@ -28,7 +28,7 @@
28
28
  <div v-if="item.labelType===1 && issize" v-size="handlerResize" class="resize-tag"></div>
29
29
  </labelItem>
30
30
  </template>
31
- <LabelProterty ref="proterty" @change="onChange" />
31
+ <LabelProterty ref="proterty" @change="onChange"></LabelProterty>
32
32
  </div>
33
33
  </template>
34
34
  <script>
@@ -0,0 +1,18 @@
1
+ import Vue from 'vue'
2
+ import VueRouter from 'vue-router';
3
+
4
+ import MakeLabel from '../views/MakeLabel.vue'
5
+ import About from '../views/About.vue'
6
+
7
+ const routes = [{
8
+ path: '/about',
9
+ component: About,
10
+ }, {
11
+ path: '/test',
12
+ component: MakeLabel,
13
+ }]
14
+ Vue.use(VueRouter)
15
+ export default new VueRouter({
16
+ mode: 'history',
17
+ routes,
18
+ })
@@ -0,0 +1,3 @@
1
+ $click-color: #2E6BE6;
2
+ $btn-color: #222222;
3
+ $base-color2: #41C89D;