@nstc-business/tbm 0.0.1
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 +79 -0
- package/src/components/.keep +0 -0
- package/src/components/test/index.js +8 -0
- package/src/components/test/src/index.vue +11 -0
- package/src/index.js +24 -0
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nstc-business/tbm",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"serve": "vue-cli-service serve",
|
|
8
|
+
"test": "vue-cli-service serve --test",
|
|
9
|
+
"deadcode": "vue-cli-service serve --seecode",
|
|
10
|
+
"analy": "vue-cli-service build --analy",
|
|
11
|
+
"getI18n": "node ./node_modules/nstc-get-i18n",
|
|
12
|
+
"format": "prettier --write \"./**/*.{html,vue,ts,js,json,md}\"",
|
|
13
|
+
"build": "vue-cli-service build"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"axios": "^0.21.4",
|
|
20
|
+
"core-js": "^3.6.5",
|
|
21
|
+
"dayjs": "^1.10.7",
|
|
22
|
+
"el-table-draggable": "^1.4.4",
|
|
23
|
+
"element-ui": "^2.15.6",
|
|
24
|
+
"n20-common-lib": "2.7.57",
|
|
25
|
+
"qrcode": "^1.5.0",
|
|
26
|
+
"resize-detector": "^0.3.0",
|
|
27
|
+
"vue": "^2.6.11",
|
|
28
|
+
"vue-router": "^3.5.2",
|
|
29
|
+
"vuedraggable": "^2.24.3",
|
|
30
|
+
"vuex": "^3.6.2"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"src/components",
|
|
34
|
+
"src/index.js"
|
|
35
|
+
],
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
38
|
+
"@babel/plugin-transform-flow-comments": "^7.14.5",
|
|
39
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
40
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
41
|
+
"@vue/cli-service": "~4.5.0",
|
|
42
|
+
"@vue/compiler-sfc": "^3.0.0-rc.6",
|
|
43
|
+
"babel-eslint": "^10.1.0",
|
|
44
|
+
"babel-plugin-component": "^1.1.1",
|
|
45
|
+
"compression-webpack-plugin": "^3.1.0",
|
|
46
|
+
"copy-webpack-plugin": "^6.4.1",
|
|
47
|
+
"eslint": "^6.7.2",
|
|
48
|
+
"prettier": "^3.0.3",
|
|
49
|
+
"husky": "^8.0.0",
|
|
50
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
51
|
+
"less": "^3.12.2",
|
|
52
|
+
"nstc-gitinfo": "^0.0.9",
|
|
53
|
+
"nstc-get-i18n": "^0.0.3",
|
|
54
|
+
"less-loader": "^7.0.0",
|
|
55
|
+
"vue-template-compiler": "^2.6.11",
|
|
56
|
+
"webpack": "^4.46.0",
|
|
57
|
+
"webpack-bundle-analyzer": "^3.9.0",
|
|
58
|
+
"webpack-deadcode-plugin": "^0.1.15"
|
|
59
|
+
},
|
|
60
|
+
"eslintConfig": {
|
|
61
|
+
"root": true,
|
|
62
|
+
"env": {
|
|
63
|
+
"node": true
|
|
64
|
+
},
|
|
65
|
+
"extends": [
|
|
66
|
+
"plugin:vue/essential",
|
|
67
|
+
"eslint:recommended"
|
|
68
|
+
],
|
|
69
|
+
"parserOptions": {
|
|
70
|
+
"parser": "babel-eslint"
|
|
71
|
+
},
|
|
72
|
+
"rules": {}
|
|
73
|
+
},
|
|
74
|
+
"browserslist": [
|
|
75
|
+
"> 1%",
|
|
76
|
+
"last 2 versions",
|
|
77
|
+
"not dead"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
File without changes
|
package/src/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// 组件导入
|
|
2
|
+
import Test from './components/test/index.js'
|
|
3
|
+
|
|
4
|
+
const components = [Test]
|
|
5
|
+
|
|
6
|
+
const install = function (Vue, options = { prefix: '' }) {
|
|
7
|
+
components.forEach(component => {
|
|
8
|
+
let name = component.name
|
|
9
|
+
if (!name) return console.error('必须设置组件名称:', component)
|
|
10
|
+
name = options.prefix + name.replace(name[0], name[0].toUpperCase())
|
|
11
|
+
Vue.component(name, component)
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* istanbul ignore if */
|
|
16
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
17
|
+
install(window.Vue)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
version: '0.1.0',
|
|
22
|
+
install,
|
|
23
|
+
Test
|
|
24
|
+
}
|