jobdone-shared-files 0.0.1-beta.99 → 1.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.
@@ -114,6 +114,7 @@
114
114
  import { formatDate } from '../../../node_modules/jobdone-shared-files/common/format';
115
115
  import { onMounted, ref, computed, nextTick } from 'vue';
116
116
  import axios from 'axios';
117
+ import '../../bootstrap/js/dist/dropdown.js';
117
118
 
118
119
  export default {
119
120
  props: {
@@ -1,4 +1,4 @@
1
- import { Collapse } from 'bootstrap'
1
+ import Collapse from '../../../bootstrap/js/dist/collapse';
2
2
 
3
3
  export default {
4
4
  mounted(el) {
@@ -1,4 +1,4 @@
1
- import { Popover } from 'bootstrap'
1
+ import Popover from '../../../bootstrap/js/dist/popover';
2
2
 
3
3
  export default {
4
4
  mounted(el) {
@@ -0,0 +1,29 @@
1
+ function updateDom(el, binding) {
2
+ el.querySelectorAll('option').forEach(element => {
3
+ element.style.color = 'var(--bs-body-color)'
4
+ });
5
+
6
+ let excludeValue = binding.value.excludeOpt === binding.value.value ?? 'notExcludeValue'
7
+ // !! NOTE:用於placeholder是有值的情況......
8
+
9
+ let includeValue = binding.value.includeOpt?.includes(binding.value.value)
10
+ // !! NOTE:用於排除某些下拉選單要選用 0、null、undefined、false 等等值作為選項的情況
11
+
12
+ if (!excludeValue && (!!binding.value.value || includeValue)) {
13
+ el.classList.add(binding.value.selectingClass)
14
+ el.classList.remove(binding.value.unselectClass)
15
+ el.style.color = 'var(--bs-body-color) '
16
+ } else {
17
+ el.classList.add(binding.value.unselectClass)
18
+ el.classList.remove(binding.value.selectingClass)
19
+ el.style.color = 'var(--bs-input-placeholder-color) '
20
+ }
21
+ }
22
+ export default {
23
+ mounted(el, binding) {
24
+ updateDom(el, binding)
25
+ },
26
+ updated(el, binding) {
27
+ updateDom(el, binding)
28
+ }
29
+ }
@@ -1,4 +1,4 @@
1
- import { Tooltip } from 'bootstrap'
1
+ import Tooltip from '../../../bootstrap/js/dist/tooltip';
2
2
 
3
3
  export default {
4
4
  mounted(el) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jobdone-shared-files",
3
- "version": "0.0.1-beta.99",
3
+ "version": "1.0.1",
4
4
  "description": "Shared JS and SCSS for Jobdone Enterprise.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  "axios": "^1.2.2",
13
13
  "vue": "^3.2.45",
14
14
  "vue-loading-overlay": "^6.0.3",
15
- "bootstrap": "^5.3.0",
15
+ "bootstrap": "^5.3.2",
16
16
  "dayjs": "^1.11.7",
17
17
  "vue-easy-lightbox": "^1.16.0"
18
18
  }