@scenetechnology/cj_element_table 0.0.5 → 0.0.6

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/dist/demo.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><meta charset="utf-8"><title>cj_element_table demo</title><script src="./cj_element_table.umd.js"></script><script>console.log(cj_element_table)</script>
1
+ <!doctype html><meta charset="utf-8"><title>cj_element_table demo</title><script src="./cj_element_table.umd.js"></script><link rel="stylesheet" href="./cj_element_table.css"><script>console.log(cj_element_table)</script>
package/package.json CHANGED
@@ -1,43 +1,42 @@
1
- {
2
- "name": "@scenetechnology/cj_element_table",
3
- "version": "0.0.5",
4
- "private": false,
5
- "description": "element plus 3.0 表格组件",
6
- "main": "dist/cj_element_table.umd.min.js",
7
- "scripts": {
8
- "serve": "vue-cli-service serve",
9
- "build": "vue-cli-service build",
10
- "lint": "vue-cli-service lint",
11
- "build:lib": "vue-cli-service build --target lib ./packages/index.js --name cj_element_table packages/index.js"
12
- },
13
- "dependencies": {
14
- "axios": "^1.8.4",
15
- "babel-plugin-transform-remove-strict-mode": "^0.0.2",
16
- "element-plus": "^2.9.7",
17
- "exceljs": "^4.4.0",
18
- "file-saver": "^2.0.5",
19
- "less": "^4.3.0",
20
- "less-loader": "^12.2.0",
21
- "pinia": "^3.0.1",
22
- "vue": "^3.2.13",
23
- "vue-router": "^4.5.0",
24
- "vue-types": "^6.0.0",
25
- "web-storage-cache": "^1.1.1"
26
- },
27
- "devDependencies": {
28
- "@babel/core": "^7.26.10",
29
- "@typescript-eslint/eslint-plugin": "^5.4.0",
30
- "@typescript-eslint/parser": "^5.4.0",
31
- "@vitejs/plugin-vue-jsx": "^4.1.2",
32
- "@vue/babel-plugin-jsx": "^1.4.0",
33
- "@vue/babel-preset-app": "^5.0.8",
34
- "@vue/cli-plugin-babel": "^5.0.8",
35
- "@vue/cli-plugin-eslint": "~5.0.0",
36
- "@vue/cli-plugin-typescript": "~5.0.0",
37
- "@vue/cli-service": "~5.0.0",
38
- "@vue/eslint-config-typescript": "^9.1.0",
39
- "eslint": "^7.32.0",
40
- "eslint-plugin-vue": "^8.0.3",
41
- "typescript": "~4.9.5"
42
- }
43
- }
1
+ {
2
+ "name": "@scenetechnology/cj_element_table",
3
+ "version": "0.0.6",
4
+ "private": false,
5
+ "description": "element plus 3.0 表格组件",
6
+ "main": "dist/cj_element_table.umd.min.js",
7
+ "scripts": {
8
+ "serve": "vue-cli-service serve",
9
+ "build": "vue-cli-service build",
10
+ "lint": "vue-cli-service lint",
11
+ "build:lib": "vue-cli-service build --target lib --name cj_element_table packages/index.js"
12
+ },
13
+ "dependencies": {
14
+ "axios": "^1.8.4",
15
+ "element-plus": "^2.9.7",
16
+ "exceljs": "^4.4.0",
17
+ "file-saver": "^2.0.5",
18
+ "less": "^4.3.0",
19
+ "less-loader": "^12.2.0",
20
+ "pinia": "^3.0.1",
21
+ "vue": "^3.2.13",
22
+ "vue-router": "^4.5.0",
23
+ "vue-types": "^6.0.0",
24
+ "web-storage-cache": "^1.1.1"
25
+ },
26
+ "devDependencies": {
27
+ "@babel/core": "^7.26.10",
28
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
29
+ "@typescript-eslint/parser": "^5.4.0",
30
+ "@vitejs/plugin-vue-jsx": "^4.1.2",
31
+ "@vue/babel-plugin-jsx": "^1.4.0",
32
+ "@vue/babel-preset-app": "^5.0.8",
33
+ "@vue/cli-plugin-babel": "^5.0.8",
34
+ "@vue/cli-plugin-eslint": "~5.0.0",
35
+ "@vue/cli-plugin-typescript": "~5.0.0",
36
+ "@vue/cli-service": "~5.0.0",
37
+ "@vue/eslint-config-typescript": "^9.1.0",
38
+ "eslint": "^7.32.0",
39
+ "eslint-plugin-vue": "^8.0.3",
40
+ "typescript": "~4.9.5"
41
+ }
42
+ }
package/packages/index.js CHANGED
@@ -1,12 +1,12 @@
1
- // 引入组件
1
+ // // 引入组件
2
2
  import cj_element_table from './components/index.vue'
3
3
 
4
- // 导出组件
5
- export { cj_element_table }
4
+ export const install = (app) => {
5
+ app.component('cj_element_table', cj_element_table)
6
+ }
6
7
 
7
- // 导出Vue插件
8
8
  export default {
9
- install: (app) => {
10
- app.component(cj_element_table.name || 'cj-element-table', cj_element_table)
11
- }
9
+ version: '0.0.6',
10
+ install,
11
+ cj_element_table,
12
12
  }
package/public/index.html CHANGED
@@ -1,17 +1,17 @@
1
- <!DOCTYPE html>
2
- <html lang="">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
- <title><%= htmlWebpackPlugin.options.title %></title>
9
- </head>
10
- <body>
11
- <noscript>
12
- <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
- </noscript>
14
- <div id="app"></div>
15
- <!-- built files will be auto injected -->
16
- </body>
17
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
+ <title><%= htmlWebpackPlugin.options.title %></title>
9
+ </head>
10
+ <body>
11
+ <noscript>
12
+ <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
+ </noscript>
14
+ <div id="app"></div>
15
+ <!-- built files will be auto injected -->
16
+ </body>
17
+ </html>
@@ -14,15 +14,9 @@ import { ElMessage } from 'element-plus'
14
14
 
15
15
  const { result_code, base_url } = config
16
16
 
17
- let requestUrl = ''
18
- if (process.env.NODE_ENV == 'development') {
19
- requestUrl = base_url.base
20
- }else{
21
- requestUrl = base_url.pro
22
- }
23
17
  // 要修改
24
- export const PATH_URL = requestUrl
25
- // export const PATH_URL = '192.168.1.229:92'
18
+ // export const PATH_URL = base_url[import.meta.env.VITE_API_BASEPATH as keyof typeof base_url]
19
+ export const PATH_URL = '192.168.1.229:92'
26
20
 
27
21
  // import { resetRouter } from '@/router'
28
22
  // import { useRouter } from 'vue-router'
package/src/main.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { createApp } from 'vue'
2
- import App from './App.vue'
3
- import ElementPlus from 'element-plus'
4
- import 'element-plus/dist/index.css'
5
- import zhCn from 'element-plus/es/locale/lang/zh-cn'
6
- // import router from './router'
7
-
8
- const app = createApp(App)
9
- app.use(ElementPlus, {
10
- locale: zhCn,
11
- })
12
- // app.use(router)
13
- app.mount('#app')
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import ElementPlus from 'element-plus'
4
+ import 'element-plus/dist/index.css'
5
+ import zhCn from 'element-plus/es/locale/lang/zh-cn'
6
+ // import router from './router'
7
+
8
+ const app = createApp(App)
9
+ app.use(ElementPlus, {
10
+ locale: zhCn,
11
+ })
12
+ // app.use(router)
13
+ app.mount('#app')
package/vue.config.js CHANGED
@@ -4,36 +4,21 @@ module.exports = {
4
4
  lintOnSave: false,
5
5
  pages: {
6
6
  index: {
7
+ // 修改项目入口文件
7
8
  entry: 'src/main.ts',
8
9
  template: 'public/index.html',
9
10
  filename: 'index.html'
10
11
  }
11
12
  },
12
- // 扩展 webpack 配置
13
+ // 扩展 webpack 配置,使 packages 加入编译
13
14
  chainWebpack: config => {
14
15
  config.module
15
- .rule('js')
16
- .include.add(resolve(__dirname, 'packages')).end()
17
- .use('babel')
18
- .loader('babel-loader')
19
- .tap(options => {
20
- return options
21
- })
22
-
23
- // 处理组件中的样式
24
- config.module
25
- .rule('css')
26
- .include.add(resolve(__dirname, 'packages')).end()
27
-
28
- config.module
29
- .rule('scss')
30
- .include.add(resolve(__dirname, 'packages')).end()
31
- },
32
- // 库模式配置
33
- css: { extract: false },
34
- configureWebpack: {
35
- output: {
36
- libraryExport: 'default'
37
- }
16
+ .rule('js')
17
+ .include.add(resolve(__dirname, 'packages')).end()
18
+ .use('babel')
19
+ .loader('babel-loader')
20
+ .tap(options => {
21
+ return options
22
+ })
38
23
  }
39
24
  }
package/.bablerc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "plugins": ["transform-remove-strict-mode"]
3
- }