@truenewx/tnxvue3 2.6.0 → 2.6.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 +2 -2
- package/sample/App.vue +0 -19
- package/sample/main.js +0 -11
- package/sample/pages/index.vue +0 -79
- package/sample/pages/info.vue +0 -28
- package/sample/tnx.js +0 -31
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truenewx/tnxvue3",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "互联网技术解决方案:Vue3扩展支持",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"main": "
|
|
9
|
+
"main": "src/tnxvue.js",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"truenewx",
|
|
12
12
|
"tnxvue3",
|
package/sample/App.vue
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<page-index/>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import index from './pages/index.vue';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
name: 'App',
|
|
12
|
-
components: {
|
|
13
|
-
'page-index': index,
|
|
14
|
-
},
|
|
15
|
-
data() {
|
|
16
|
-
return {}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
package/sample/main.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '../../core/tnxcore.css';
|
|
2
|
-
import 'bootstrap/dist/css/bootstrap-reboot.min.css';
|
|
3
|
-
import 'bootstrap/dist/css/bootstrap-grid.min.css';
|
|
4
|
-
import 'bootstrap/dist/css/bootstrap-utilities.min.css';
|
|
5
|
-
import '../src/tnxvue.css';
|
|
6
|
-
import 'element-plus/dist/index.css';
|
|
7
|
-
import '../src/element-plus/tnxel.css';
|
|
8
|
-
import tnx from './tnx';
|
|
9
|
-
import App from './App.vue';
|
|
10
|
-
|
|
11
|
-
tnx.createVueInstance(App).mount('#app');
|
package/sample/pages/index.vue
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="container-xl mx-auto flex-h-center">
|
|
3
|
-
<div class="text-center">
|
|
4
|
-
<h1>{{ title }}</h1>
|
|
5
|
-
<p>首页</p>
|
|
6
|
-
<el-space wrap>
|
|
7
|
-
<el-button @click="showAlert">Alert</el-button>
|
|
8
|
-
<el-button @click="showSuccess">Success</el-button>
|
|
9
|
-
<el-button @click="showError">Error</el-button>
|
|
10
|
-
<el-button @click="showConfirm">Confirm</el-button>
|
|
11
|
-
<el-button @click="showToast">Toast</el-button>
|
|
12
|
-
<el-button @click="showLoading">Loading</el-button>
|
|
13
|
-
<el-button @click="showOpen">Open</el-button>
|
|
14
|
-
</el-space>
|
|
15
|
-
<div class="mt-5">
|
|
16
|
-
<tnxel-fss-upload type="UserHeadImage" v-model="storageUrl"/>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import {app, tnx} from '../tnx.js';
|
|
24
|
-
import info from './info.vue';
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
components: {
|
|
28
|
-
'tnxel-fss-upload': tnx.components.FssUpload,
|
|
29
|
-
},
|
|
30
|
-
data() {
|
|
31
|
-
return {
|
|
32
|
-
title: process.env.VUE_APP_TITLE,
|
|
33
|
-
storageUrl: null,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
created() {
|
|
37
|
-
app.rpc.loadConfig(process.env.VUE_APP_API_BASE_URL);
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
showAlert() {
|
|
41
|
-
tnx.alert('Hello World', function() {
|
|
42
|
-
console.info('Alerted');
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
showSuccess() {
|
|
46
|
-
tnx.success('提交成功,请等待组织管理员为你分配角色,获得组织角色后方可使用组织功能。', function() {
|
|
47
|
-
console.info('Successed');
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
showError() {
|
|
51
|
-
tnx.error('Hello World', function() {
|
|
52
|
-
console.info('Errored');
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
showConfirm() {
|
|
56
|
-
tnx.confirm('Hello World', function(yes) {
|
|
57
|
-
console.info(yes);
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
showToast() {
|
|
61
|
-
tnx.toast('操作成功', 200000, function() {
|
|
62
|
-
console.info('Toast closed.');
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
showLoading() {
|
|
66
|
-
tnx.showLoading('加载中');
|
|
67
|
-
setTimeout(function() {
|
|
68
|
-
tnx.closeLoading();
|
|
69
|
-
}, 2000);
|
|
70
|
-
},
|
|
71
|
-
showOpen() {
|
|
72
|
-
tnx.open(info, {
|
|
73
|
-
param: '- from params',
|
|
74
|
-
opener: this,
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
</script>
|
package/sample/pages/info.vue
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<p>Component: Hello World {{ param }}</p>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
props: ['param', 'opener'],
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
abc: 'abc',
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
methods: {
|
|
16
|
-
dialog() {
|
|
17
|
-
return {
|
|
18
|
-
title: '组件',
|
|
19
|
-
type: 'confirm',
|
|
20
|
-
click: this.toSubmit
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
toSubmit(yes, close) {
|
|
24
|
-
console.info(this.abc + ': ' + yes);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
</script>
|
package/sample/tnx.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// tnx.js
|
|
2
|
-
import tnxel from '../src/element-plus/tnxel';
|
|
3
|
-
|
|
4
|
-
export const tnx = tnxel;
|
|
5
|
-
export const util = tnx.util;
|
|
6
|
-
export const app = tnx.app;
|
|
7
|
-
|
|
8
|
-
app.rpc.toLogin = function (loginFormUrl, originalUrl) {
|
|
9
|
-
if (loginFormUrl) {
|
|
10
|
-
let alertable = originalUrl !== undefined;
|
|
11
|
-
const username = process.env.VUE_APP_LOGIN_USERNAME;
|
|
12
|
-
const password = process.env.VUE_APP_LOGIN_PASSWORD;
|
|
13
|
-
if (username && password) { // 将默认用户名密码插入到参数清单头部,以免被其它参数中的#影响而被忽略
|
|
14
|
-
const index = loginFormUrl.indexOf('?') + 1;
|
|
15
|
-
loginFormUrl = loginFormUrl.substr(0, index) + 'username=' + username + '&password='
|
|
16
|
-
+ password + '&' + loginFormUrl.substr(index);
|
|
17
|
-
alertable = false;
|
|
18
|
-
}
|
|
19
|
-
if (alertable) {
|
|
20
|
-
tnx.alert('尚未登录或登录会话已过期,需重新登录', function () {
|
|
21
|
-
window.location.href = loginFormUrl;
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
window.location.href = loginFormUrl;
|
|
25
|
-
}
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default tnx;
|