ui-process-h5 0.1.0
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/index.vue +0 -0
- package/package.json +14 -0
- package/src/plugin/commonfs/index.js +5 -0
- package/src/plugin/directive/index.js +23 -0
- package/src/plugin/index.js +23 -0
package/index.vue
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-process-h5",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main":"./src/plugin/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"serve": "vue-cli-service serve",
|
|
8
|
+
"build": "vue-cli-service build",
|
|
9
|
+
"lint": "vue-cli-service lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"vue-demi": "^0.14.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { isVue3 } from "vue-demi";
|
|
7
|
+
const dire2 = {
|
|
8
|
+
bind(el, binding) {
|
|
9
|
+
el.addEventListener("click", () => {
|
|
10
|
+
console.log("=====>dire2", binding);
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const dire3 = {
|
|
16
|
+
beforeMount(el, binding) {
|
|
17
|
+
el.addEventListener("click", () => {
|
|
18
|
+
console.log("=====>dire3", binding);
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default isVue3 ? dire3 : dire2;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isVue3 } from "vue-demi";
|
|
2
|
+
import dire from "./directive/index";
|
|
3
|
+
import checkPlugin from "./commonfs/index";
|
|
4
|
+
|
|
5
|
+
const ins2 = {
|
|
6
|
+
install(Vue) {
|
|
7
|
+
Vue.directive("process", dire);
|
|
8
|
+
Vue.prototype.$process = (params = {}) => {
|
|
9
|
+
checkPlugin(params);
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const ins3 = {
|
|
15
|
+
install(app) {
|
|
16
|
+
app.directive("process", dire);
|
|
17
|
+
app.config.globalProperties.$process = (params = {}) => {
|
|
18
|
+
checkPlugin(params);
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default isVue3 ? ins3 : ins2;
|